32#include FT_LCD_FILTER_H
33#include FT_INTERNAL_MEMORY_H
34#include FT_INTERNAL_GLYPH_LOADER_H
35#include FT_INTERNAL_DRIVER_H
36#include FT_INTERNAL_AUTOHINT_H
37#include FT_INTERNAL_SERVICE_H
38#include FT_INTERNAL_PIC_H
39#include FT_INTERNAL_CALC_H
41#ifdef FT_CONFIG_OPTION_INCREMENTAL
42#include FT_INCREMENTAL_H
71#define FT_MIN( a, b ) ( (a) < (b) ? (a) : (b) )
72#define FT_MAX( a, b ) ( (a) > (b) ? (a) : (b) )
74#define FT_ABS( a ) ( (a) < 0 ? -(a) : (a) )
81#define FT_HYPOT( x, y ) \
84 x > y ? x + ( 3 * y >> 3 ) \
85 : y + ( 3 * x >> 3 ) )
88#define FT_PAD_FLOOR( x, n ) ( (x) & ~FT_TYPEOF( x )( (n) - 1 ) )
89#define FT_PAD_ROUND( x, n ) FT_PAD_FLOOR( (x) + (n) / 2, n )
90#define FT_PAD_CEIL( x, n ) FT_PAD_FLOOR( (x) + (n) - 1, n )
92#define FT_PIX_FLOOR( x ) ( (x) & ~FT_TYPEOF( x )63 )
93#define FT_PIX_ROUND( x ) FT_PIX_FLOOR( (x) + 32 )
94#define FT_PIX_CEIL( x ) FT_PIX_FLOOR( (x) + 63 )
98#define FT_PAD_ROUND_LONG( x, n ) FT_PAD_FLOOR( ADD_LONG( (x), (n) / 2 ), \
100#define FT_PAD_CEIL_LONG( x, n ) FT_PAD_FLOOR( ADD_LONG( (x), (n) - 1 ), \
102#define FT_PIX_ROUND_LONG( x ) FT_PIX_FLOOR( ADD_LONG( (x), 32 ) )
103#define FT_PIX_CEIL_LONG( x ) FT_PIX_FLOOR( ADD_LONG( (x), 63 ) )
105#define FT_PAD_ROUND_INT32( x, n ) FT_PAD_FLOOR( ADD_INT32( (x), (n) / 2 ), \
107#define FT_PAD_CEIL_INT32( x, n ) FT_PAD_FLOOR( ADD_INT32( (x), (n) - 1 ), \
109#define FT_PIX_ROUND_INT32( x ) FT_PIX_FLOOR( ADD_INT32( (x), 32 ) )
110#define FT_PIX_CEIL_INT32( x ) FT_PIX_FLOOR( ADD_INT32( (x), 63 ) )
118#define ft_isdigit( x ) ( ( (unsigned)(x) - '0' ) < 10U )
120#define ft_isxdigit( x ) ( ( (unsigned)(x) - '0' ) < 10U || \
121 ( (unsigned)(x) - 'a' ) < 6U || \
122 ( (unsigned)(x) - 'A' ) < 6U )
125#define ft_isupper( x ) ( ( (unsigned)(x) - 'A' ) < 26U )
126#define ft_islower( x ) ( ( (unsigned)(x) - 'a' ) < 26U )
128#define ft_isalpha( x ) ( ft_isupper( x ) || ft_islower( x ) )
129#define ft_isalnum( x ) ( ft_isdigit( x ) || ft_isalpha( x ) )
159#define FT_CMAP( x ) ( (FT_CMap)( x ) )
162#define FT_CMAP_PLATFORM_ID( x ) FT_CMAP( x )->charmap.platform_id
163#define FT_CMAP_ENCODING_ID( x ) FT_CMAP( x )->charmap.encoding_id
164#define FT_CMAP_ENCODING( x ) FT_CMAP( x )->charmap.encoding
165#define FT_CMAP_FACE( x ) FT_CMAP( x )->charmap.face
178 FT_UInt32 char_code );
182 FT_UInt32 *achar_code );
188 FT_UInt32 variant_selector );
193 FT_UInt32 variant_selector );
196 (*FT_CMap_VariantListFunc)(
FT_CMap cmap,
200 (*FT_CMap_CharVariantListFunc)(
FT_CMap cmap,
202 FT_UInt32 char_code );
205 (*FT_CMap_VariantCharListFunc)(
FT_CMap cmap,
207 FT_UInt32 variant_selector );
231#ifndef FT_CONFIG_OPTION_PIC
233#define FT_DECLARE_CMAP_CLASS( class_ ) \
234 FT_CALLBACK_TABLE const FT_CMap_ClassRec class_;
236#define FT_DEFINE_CMAP_CLASS( \
247 variantchar_list_ ) \
248 FT_CALLBACK_TABLE_DEF \
249 const FT_CMap_ClassRec class_ = \
265#define FT_DECLARE_CMAP_CLASS( class_ ) \
267 FT_Init_Class_ ## class_( FT_Library library, \
268 FT_CMap_ClassRec* clazz );
270#define FT_DEFINE_CMAP_CLASS( \
281 variantchar_list_ ) \
283 FT_Init_Class_ ## class_( FT_Library library, \
284 FT_CMap_ClassRec* clazz ) \
286 FT_UNUSED( library ); \
288 clazz->size = size_; \
289 clazz->init = init_; \
290 clazz->done = done_; \
291 clazz->char_index = char_index_; \
292 clazz->char_next = char_next_; \
293 clazz->char_var_index = char_var_index_; \
294 clazz->char_var_default = char_var_default_; \
295 clazz->variant_list = variant_list_; \
296 clazz->charvariant_list = charvariant_list_; \
297 clazz->variantchar_list = variantchar_list_; \
321#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
412#ifdef FT_CONFIG_OPTION_INCREMENTAL
419#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
421 FT_Bitmap_LcdFilterFunc lcd_filter_func;
463#define FT_GLYPH_OWN_BITMAP 0x1U
543#define FT_MODULE( x ) ( (FT_Module)(x) )
545#define FT_MODULE_CLASS( x ) FT_MODULE( x )->clazz
546#define FT_MODULE_LIBRARY( x ) FT_MODULE( x )->library
547#define FT_MODULE_MEMORY( x ) FT_MODULE( x )->memory
550#define FT_MODULE_IS_DRIVER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
551 FT_MODULE_FONT_DRIVER )
553#define FT_MODULE_IS_RENDERER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
556#define FT_MODULE_IS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
559#define FT_MODULE_IS_STYLER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
562#define FT_DRIVER_IS_SCALABLE( x ) ( FT_MODULE_CLASS( x )->module_flags & \
563 FT_MODULE_DRIVER_SCALABLE )
565#define FT_DRIVER_USES_OUTLINES( x ) !( FT_MODULE_CLASS( x )->module_flags & \
566 FT_MODULE_DRIVER_NO_OUTLINES )
568#define FT_DRIVER_HAS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
569 FT_MODULE_DRIVER_HAS_HINTER )
571#define FT_DRIVER_HINTS_LIGHTLY( x ) ( FT_MODULE_CLASS( x )->module_flags & \
572 FT_MODULE_DRIVER_HINTS_LIGHTLY )
598 const char* mod_name );
602 const char* service_id,
605#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
630#define FT_FACE( x ) ( (FT_Face)(x) )
631#define FT_SIZE( x ) ( (FT_Size)(x) )
632#define FT_SLOT( x ) ( (FT_GlyphSlot)(x) )
634#define FT_FACE_DRIVER( x ) FT_FACE( x )->driver
635#define FT_FACE_LIBRARY( x ) FT_FACE_DRIVER( x )->root.library
636#define FT_FACE_MEMORY( x ) FT_FACE( x )->memory
637#define FT_FACE_STREAM( x ) FT_FACE( x )->stream
639#define FT_SIZE_FACE( x ) FT_SIZE( x )->face
640#define FT_SLOT_FACE( x ) FT_SLOT( x )->face
642#define FT_FACE_SLOT( x ) FT_FACE( x )->glyph
643#define FT_FACE_SIZE( x ) FT_FACE( x )->size
689#define FT_REQUEST_WIDTH( req ) \
690 ( (req)->horiResolution \
691 ? ( (req)->width * (FT_Pos)(req)->horiResolution + 36 ) / 72 \
694#define FT_REQUEST_HEIGHT( req ) \
695 ( (req)->vertResolution \
696 ? ( (req)->height * (FT_Pos)(req)->vertResolution + 36 ) / 72 \
765#define FT_RENDERER( x ) ( (FT_Renderer)(x) )
766#define FT_GLYPH( x ) ( (FT_Glyph)(x) )
767#define FT_BITMAP_GLYPH( x ) ( (FT_BitmapGlyph)(x) )
768#define FT_OUTLINE_GLYPH( x ) ( (FT_OutlineGlyph)(x) )
799#define FT_DRIVER( x ) ( (FT_Driver)(x) )
802#define FT_DRIVER_CLASS( x ) FT_DRIVER( x )->clazz
852#define FT_DEBUG_HOOK_TRUETYPE 0
933#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
935 FT_Bitmap_LcdFilterFunc lcd_filter_func;
938#ifdef FT_CONFIG_OPTION_PIC
939 FT_PIC_Container pic_container;
971#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM
1011#ifndef FT_NO_DEFAULT_RASTER
1045#ifndef FT_CONFIG_OPTION_PIC
1047#define FT_DEFINE_OUTLINE_FUNCS( \
1055 static const FT_Outline_Funcs class_ = \
1067#define FT_DEFINE_OUTLINE_FUNCS( \
1076 Init_Class_ ## class_( FT_Outline_Funcs* clazz ) \
1078 clazz->move_to = move_to_; \
1079 clazz->line_to = line_to_; \
1080 clazz->conic_to = conic_to_; \
1081 clazz->cubic_to = cubic_to_; \
1082 clazz->shift = shift_; \
1083 clazz->delta = delta_; \
1104#ifndef FT_CONFIG_OPTION_PIC
1106#define FT_DEFINE_RASTER_FUNCS( \
1114 const FT_Raster_Funcs class_ = \
1126#define FT_DEFINE_RASTER_FUNCS( \
1135 FT_Init_Class_ ## class_( FT_Raster_Funcs* clazz ) \
1137 clazz->glyph_format = glyph_format_; \
1138 clazz->raster_new = raster_new_; \
1139 clazz->raster_reset = raster_reset_; \
1140 clazz->raster_set_mode = raster_set_mode_; \
1141 clazz->raster_render = raster_render_; \
1142 clazz->raster_done = raster_done_; \
1164#ifndef FT_CONFIG_OPTION_PIC
1166#define FT_DEFINE_GLYPH( \
1176 FT_CALLBACK_TABLE_DEF \
1177 const FT_Glyph_Class class_ = \
1191#define FT_DEFINE_GLYPH( \
1202 FT_Init_Class_ ## class_( FT_Glyph_Class* clazz ) \
1204 clazz->glyph_size = size_; \
1205 clazz->glyph_format = format_; \
1206 clazz->glyph_init = init_; \
1207 clazz->glyph_done = done_; \
1208 clazz->glyph_copy = copy_; \
1209 clazz->glyph_transform = transform_; \
1210 clazz->glyph_bbox = bbox_; \
1211 clazz->glyph_prepare = prepare_; \
1254#ifndef FT_CONFIG_OPTION_PIC
1256#define FT_DECLARE_RENDERER( class_ ) \
1257 FT_EXPORT_VAR( const FT_Renderer_Class ) class_;
1259#define FT_DEFINE_RENDERER( \
1276 FT_CALLBACK_TABLE_DEF \
1277 const FT_Renderer_Class class_ = \
1279 FT_DEFINE_ROOT_MODULE( flags_, \
1300#define FT_DECLARE_RENDERER( class_ ) FT_DECLARE_MODULE( class_ )
1302#define FT_DEFINE_RENDERER( \
1320 FT_Destroy_Class_ ## class_( FT_Library library, \
1321 FT_Module_Class* clazz ) \
1323 FT_Renderer_Class* rclazz = (FT_Renderer_Class*)clazz; \
1324 FT_Memory memory = library->memory; \
1327 class_ ## _pic_free( library ); \
1329 FT_FREE( rclazz ); \
1334 FT_Create_Class_ ## class_( FT_Library library, \
1335 FT_Module_Class** output_class ) \
1337 FT_Renderer_Class* clazz = NULL; \
1339 FT_Memory memory = library->memory; \
1342 if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) ) \
1345 error = class_ ## _pic_init( library ); \
1352 FT_DEFINE_ROOT_MODULE( flags_, \
1362 clazz->glyph_format = glyph_format_; \
1364 clazz->render_glyph = render_glyph_; \
1365 clazz->transform_glyph = transform_glyph_; \
1366 clazz->get_glyph_cbox = get_glyph_cbox_; \
1367 clazz->set_mode = set_mode_; \
1369 clazz->raster_class = raster_class_; \
1371 *output_class = (FT_Module_Class*)clazz; \
1382#ifdef FT_CONFIG_OPTION_PIC
1466#ifndef FT_CONFIG_OPTION_PIC
1468#define FT_DECLARE_MODULE( class_ ) \
1470 const FT_Module_Class class_;
1472#define FT_DEFINE_ROOT_MODULE( \
1497#define FT_DEFINE_MODULE( \
1508 FT_CALLBACK_TABLE_DEF \
1509 const FT_Module_Class class_ = \
1528#define FT_DECLARE_MODULE( class_ ) \
1530 FT_Create_Class_ ## class_( FT_Library library, \
1531 FT_Module_Class** output_class ); \
1533 FT_Destroy_Class_ ## class_( FT_Library library, \
1534 FT_Module_Class* clazz );
1536#define FT_DEFINE_ROOT_MODULE( \
1546 clazz->root.module_flags = flags_; \
1547 clazz->root.module_size = size_; \
1548 clazz->root.module_name = name_; \
1549 clazz->root.module_version = version_; \
1550 clazz->root.module_requires = requires_; \
1552 clazz->root.module_interface = interface_; \
1554 clazz->root.module_init = init_; \
1555 clazz->root.module_done = done_; \
1556 clazz->root.get_interface = get_interface_;
1558#define FT_DEFINE_MODULE( \
1570 FT_Destroy_Class_ ## class_( FT_Library library, \
1571 FT_Module_Class* clazz ) \
1573 FT_Memory memory = library->memory; \
1576 class_ ## _pic_free( library ); \
1583 FT_Create_Class_ ## class_( FT_Library library, \
1584 FT_Module_Class** output_class ) \
1586 FT_Memory memory = library->memory; \
1587 FT_Module_Class* clazz = NULL; \
1591 if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) ) \
1593 error = class_ ## _pic_init( library ); \
1600 clazz->module_flags = flags_; \
1601 clazz->module_size = size_; \
1602 clazz->module_name = name_; \
1603 clazz->module_version = version_; \
1604 clazz->module_requires = requires_; \
1606 clazz->module_interface = interface_; \
1608 clazz->module_init = init_; \
1609 clazz->module_done = done_; \
1610 clazz->get_interface = get_interface_; \
1612 *output_class = clazz; \
_STLP_MOVE_TO_STD_NAMESPACE void _STLP_CALL advance(_InputIterator &__i, _Distance __n)
static LPCWSTR LPCWSTR module_name
FT_BEGIN_HEADER struct FT_Glyph_Metrics_ FT_Glyph_Metrics
enum FT_Render_Mode_ FT_Render_Mode
typedefFT_BEGIN_HEADER struct FT_Glyph_Class_ FT_Glyph_Class
#define FT_Raster_Render_Func
struct FT_RasterRec_ * FT_Raster
enum FT_Glyph_Format_ FT_Glyph_Format
FT_BEGIN_HEADER typedef signed long FT_Pos
FT_Byte FT_LcdFiveTapFilter[FT_LCD_FILTER_FIVE_TAPS]
void(* FT_DebugHook_Func)(void *arg)
FT_UInt(* FT_CMap_CharNextFunc)(FT_CMap cmap, FT_UInt32 *achar_code)
struct FT_ModuleRec_ FT_ModuleRec
struct FT_Slot_InternalRec_ FT_GlyphSlot_InternalRec
FT_Match_Size(FT_Face face, FT_Size_Request req, FT_Bool ignore_width, FT_ULong *size_index)
struct FT_LibraryRec_ FT_LibraryRec
ft_synthesize_vertical_metrics(FT_Glyph_Metrics *metrics, FT_Pos advance)
FT_Select_Metrics(FT_Face face, FT_ULong strike_index)
FT_UInt(* FT_CMap_CharVarIndexFunc)(FT_CMap cmap, FT_CMap unicode_cmap, FT_UInt32 char_code, FT_UInt32 variant_selector)
ft_glyphslot_preset_bitmap(FT_GlyphSlot slot, FT_Render_Mode mode, const FT_Vector *origin)
FT_Bool(* FT_CMap_CharVarIsDefaultFunc)(FT_CMap cmap, FT_UInt32 char_code, FT_UInt32 variant_selector)
ft_glyphslot_free_bitmap(FT_GlyphSlot slot)
struct FT_DriverRec_ FT_DriverRec
struct FT_Size_InternalRec_ FT_Size_InternalRec
FT_CMap_Done(FT_CMap cmap)
FT_New_GlyphSlot(FT_Face face, FT_GlyphSlot *aslot)
FT_UInt32 *(* FT_CMap_CharVariantListFunc)(FT_CMap cmap, FT_Memory mem, FT_UInt32 char_code)
FT_Request_Metrics(FT_Face face, FT_Size_Request req)
struct FT_CMap_ClassRec_ FT_CMap_ClassRec
ft_module_get_service(FT_Module module, const char *service_id, FT_Bool global)
FT_UInt(* FT_Face_GetGlyphNameIndexFunc)(FT_Face face, FT_String *glyph_name)
struct FT_CMapRec_ FT_CMapRec
FT_CMap_New(FT_CMap_Class clazz, FT_Pointer init_data, FT_CharMap charmap, FT_CMap *acmap)
FT_Render_Glyph_Internal(FT_Library library, FT_GlyphSlot slot, FT_Render_Mode render_mode)
struct FT_CMapRec_ * FT_CMap
FT_Get_Module_Interface(FT_Library library, const char *mod_name)
FT_UInt32 *(* FT_CMap_VariantCharListFunc)(FT_CMap cmap, FT_Memory mem, FT_UInt32 variant_selector)
FT_Done_Memory(FT_Memory memory)
FT_UInt32 *(* FT_CMap_VariantListFunc)(FT_CMap cmap, FT_Memory mem)
struct FT_Face_InternalRec_ FT_Face_InternalRec
FT_Error(* FT_CMap_InitFunc)(FT_CMap cmap, FT_Pointer init_data)
ft_lcd_padding(FT_Pos *Min, FT_Pos *Max, FT_GlyphSlot slot)
FT_Done_GlyphSlot(FT_GlyphSlot slot)
struct FT_RendererRec_ FT_RendererRec
FT_Lookup_Renderer(FT_Library library, FT_Glyph_Format format, FT_ListNode *node)
ft_glyphslot_alloc_bitmap(FT_GlyphSlot slot, FT_ULong size)
ft_glyphslot_set_bitmap(FT_GlyphSlot slot, FT_Byte *buffer)
void(* FT_CMap_DoneFunc)(FT_CMap cmap)
const struct FT_CMap_ClassRec_ * FT_CMap_Class
FT_UInt(* FT_CMap_CharIndexFunc)(FT_CMap cmap, FT_UInt32 char_code)
FT_Error(* FT_Face_GetGlyphNameFunc)(FT_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max)
FT_Error(* FT_Renderer_RenderFunc)(FT_Renderer renderer, FT_GlyphSlot slot, FT_Render_Mode mode, const FT_Vector *origin)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLenum GLuint GLint GLenum face
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
static char memory[1024 *256]
FT_CMap_CharNextFunc char_next
FT_CMap_CharVariantListFunc charvariant_list
FT_CMap_CharVarIndexFunc char_var_index
FT_CMap_VariantCharListFunc variantchar_list
FT_CMap_CharVarIsDefaultFunc char_var_default
FT_CMap_CharIndexFunc char_index
FT_CMap_VariantListFunc variant_list
FT_GlyphLoader glyph_loader
FT_Char no_stem_darkening
FT_Matrix transform_matrix
FT_Vector transform_delta
FT_ServiceCacheRec services
FT_DebugHook_Func debug_hooks[4]
FT_Module modules[FT_MAX_MODULES]
FT_Renderer_RenderFunc render
FT_Renderer_Class * clazz
FT_Glyph_Class glyph_class
FT_Glyph_Format glyph_format
FT_Raster_Render_Func raster_render
FT_Size_Metrics autohint_metrics
FT_Render_Mode autohint_mode
FT_Bool glyph_transformed