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 40 #ifdef FT_CONFIG_OPTION_INCREMENTAL 41 #include FT_INCREMENTAL_H 70 #define FT_MIN( a, b ) ( (a) < (b) ? (a) : (b) ) 71 #define FT_MAX( a, b ) ( (a) > (b) ? (a) : (b) ) 73 #define FT_ABS( a ) ( (a) < 0 ? -(a) : (a) ) 76 #define FT_PAD_FLOOR( x, n ) ( (x) & ~((n)-1) ) 77 #define FT_PAD_ROUND( x, n ) FT_PAD_FLOOR( (x) + ((n)/2), n ) 78 #define FT_PAD_CEIL( x, n ) FT_PAD_FLOOR( (x) + ((n)-1), n ) 80 #define FT_PIX_FLOOR( x ) ( (x) & ~63 ) 81 #define FT_PIX_ROUND( x ) FT_PIX_FLOOR( (x) + 32 ) 82 #define FT_PIX_CEIL( x ) FT_PIX_FLOOR( (x) + 63 ) 98 #define ft_isdigit( x ) ( ( (unsigned)(x) - '0' ) < 10U ) 100 #define ft_isxdigit( x ) ( ( (unsigned)(x) - '0' ) < 10U || \ 101 ( (unsigned)(x) - 'a' ) < 6U || \ 102 ( (unsigned)(x) - 'A' ) < 6U ) 105 #define ft_isupper( x ) ( ( (unsigned)(x) - 'A' ) < 26U ) 106 #define ft_islower( x ) ( ( (unsigned)(x) - 'a' ) < 26U ) 108 #define ft_isalpha( x ) ( ft_isupper( x ) || ft_islower( x ) ) 109 #define ft_isalnum( x ) ( ft_isdigit( x ) || ft_isalpha( x ) ) 139 #define FT_CMAP( x ) ((FT_CMap)( x )) 142 #define FT_CMAP_PLATFORM_ID( x ) FT_CMAP( x )->charmap.platform_id 143 #define FT_CMAP_ENCODING_ID( x ) FT_CMAP( x )->charmap.encoding_id 144 #define FT_CMAP_ENCODING( x ) FT_CMAP( x )->charmap.encoding 145 #define FT_CMAP_FACE( x ) FT_CMAP( x )->charmap.face 166 FT_CMap unicode_cmap,
176 (*FT_CMap_VariantListFunc)( FT_CMap cmap,
180 (*FT_CMap_CharVariantListFunc)( FT_CMap cmap,
185 (*FT_CMap_VariantCharListFunc)( FT_CMap cmap,
210 #ifndef FT_CONFIG_OPTION_PIC 212 #define FT_DECLARE_CMAP_CLASS( class_ ) \ 213 FT_CALLBACK_TABLE const FT_CMap_ClassRec class_; 215 #define FT_DEFINE_CMAP_CLASS( \ 226 variantchar_list_ ) \ 227 FT_CALLBACK_TABLE_DEF \ 228 const FT_CMap_ClassRec class_ = \ 244 #define FT_DECLARE_CMAP_CLASS( class_ ) \ 246 FT_Init_Class_ ## class_( FT_Library library, \ 247 FT_CMap_ClassRec* clazz ); 249 #define FT_DEFINE_CMAP_CLASS( \ 260 variantchar_list_ ) \ 262 FT_Init_Class_ ## class_( FT_Library library, \ 263 FT_CMap_ClassRec* clazz ) \ 265 FT_UNUSED( library ); \ 267 clazz->size = size_; \ 268 clazz->init = init_; \ 269 clazz->done = done_; \ 270 clazz->char_index = char_index_; \ 271 clazz->char_next = char_next_; \ 272 clazz->char_var_index = char_var_index_; \ 273 clazz->char_var_default = char_var_default_; \ 274 clazz->variant_list = variant_list_; \ 275 clazz->charvariant_list = charvariant_list_; \ 276 clazz->variantchar_list = variantchar_list_; \ 355 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS 365 #ifdef FT_CONFIG_OPTION_INCREMENTAL 409 #define FT_GLYPH_OWN_BITMAP 0x1 436 typedef struct FT_Size_InternalRec_
440 } FT_Size_InternalRec;
483 #define FT_MODULE( x ) ((FT_Module)( x )) 484 #define FT_MODULE_CLASS( x ) FT_MODULE( x )->clazz 485 #define FT_MODULE_LIBRARY( x ) FT_MODULE( x )->library 486 #define FT_MODULE_MEMORY( x ) FT_MODULE( x )->memory 489 #define FT_MODULE_IS_DRIVER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ 490 FT_MODULE_FONT_DRIVER ) 492 #define FT_MODULE_IS_RENDERER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ 495 #define FT_MODULE_IS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ 498 #define FT_MODULE_IS_STYLER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ 501 #define FT_DRIVER_IS_SCALABLE( x ) ( FT_MODULE_CLASS( x )->module_flags & \ 502 FT_MODULE_DRIVER_SCALABLE ) 504 #define FT_DRIVER_USES_OUTLINES( x ) !( FT_MODULE_CLASS( x )->module_flags & \ 505 FT_MODULE_DRIVER_NO_OUTLINES ) 507 #define FT_DRIVER_HAS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ 508 FT_MODULE_DRIVER_HAS_HINTER ) 534 const char* mod_name );
538 const char* service_id );
557 #define FT_FACE( x ) ((FT_Face)(x)) 558 #define FT_SIZE( x ) ((FT_Size)(x)) 559 #define FT_SLOT( x ) ((FT_GlyphSlot)(x)) 561 #define FT_FACE_DRIVER( x ) FT_FACE( x )->driver 562 #define FT_FACE_LIBRARY( x ) FT_FACE_DRIVER( x )->root.library 563 #define FT_FACE_MEMORY( x ) FT_FACE( x )->memory 564 #define FT_FACE_STREAM( x ) FT_FACE( x )->stream 566 #define FT_SIZE_FACE( x ) FT_SIZE( x )->face 567 #define FT_SLOT_FACE( x ) FT_SLOT( x )->face 569 #define FT_FACE_SLOT( x ) FT_FACE( x )->glyph 570 #define FT_FACE_SIZE( x ) FT_FACE( x )->size 616 #define FT_REQUEST_WIDTH( req ) \ 617 ( (req)->horiResolution \ 618 ? (FT_Pos)( (req)->width * (req)->horiResolution + 36 ) / 72 \ 621 #define FT_REQUEST_HEIGHT( req ) \ 622 ( (req)->vertResolution \ 623 ? (FT_Pos)( (req)->height * (req)->vertResolution + 36 ) / 72 \ 686 #define FT_RENDERER( x ) ((FT_Renderer)( x )) 687 #define FT_GLYPH( x ) ((FT_Glyph)( x )) 688 #define FT_BITMAP_GLYPH( x ) ((FT_BitmapGlyph)( x )) 689 #define FT_OUTLINE_GLYPH( x ) ((FT_OutlineGlyph)( x )) 720 #define FT_DRIVER( x ) ((FT_Driver)(x)) 723 #define FT_DRIVER_CLASS( x ) FT_DRIVER( x )->clazz 774 #define FT_DEBUG_HOOK_TRUETYPE 0 781 #define FT_DEBUG_HOOK_UNPATENTED_HINTING 1 879 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING 886 #ifdef FT_CONFIG_OPTION_PIC 887 FT_PIC_Container pic_container;
919 #ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM 959 #ifndef FT_NO_DEFAULT_RASTER 993 #ifndef FT_CONFIG_OPTION_PIC 995 #define FT_DEFINE_OUTLINE_FUNCS( \ 1003 static const FT_Outline_Funcs class_ = \ 1015 #define FT_DEFINE_OUTLINE_FUNCS( \ 1024 Init_Class_ ## class_( FT_Outline_Funcs* clazz ) \ 1026 clazz->move_to = move_to_; \ 1027 clazz->line_to = line_to_; \ 1028 clazz->conic_to = conic_to_; \ 1029 clazz->cubic_to = cubic_to_; \ 1030 clazz->shift = shift_; \ 1031 clazz->delta = delta_; \ 1052 #ifndef FT_CONFIG_OPTION_PIC 1054 #define FT_DEFINE_RASTER_FUNCS( \ 1062 const FT_Raster_Funcs class_ = \ 1074 #define FT_DEFINE_RASTER_FUNCS( \ 1083 FT_Init_Class_ ## class_( FT_Raster_Funcs* clazz ) \ 1085 clazz->glyph_format = glyph_format_; \ 1086 clazz->raster_new = raster_new_; \ 1087 clazz->raster_reset = raster_reset_; \ 1088 clazz->raster_set_mode = raster_set_mode_; \ 1089 clazz->raster_render = raster_render_; \ 1090 clazz->raster_done = raster_done_; \ 1112 #ifndef FT_CONFIG_OPTION_PIC 1114 #define FT_DEFINE_GLYPH( \ 1124 FT_CALLBACK_TABLE_DEF \ 1125 const FT_Glyph_Class class_ = \ 1139 #define FT_DEFINE_GLYPH( \ 1150 FT_Init_Class_ ## class_( FT_Glyph_Class* clazz ) \ 1152 clazz->glyph_size = size_; \ 1153 clazz->glyph_format = format_; \ 1154 clazz->glyph_init = init_; \ 1155 clazz->glyph_done = done_; \ 1156 clazz->glyph_copy = copy_; \ 1157 clazz->glyph_transform = transform_; \ 1158 clazz->glyph_bbox = bbox_; \ 1159 clazz->glyph_prepare = prepare_; \ 1202 #ifndef FT_CONFIG_OPTION_PIC 1204 #define FT_DECLARE_RENDERER( class_ ) \ 1205 FT_EXPORT_VAR( const FT_Renderer_Class ) class_; 1207 #define FT_DEFINE_RENDERER( \ 1224 FT_CALLBACK_TABLE_DEF \ 1225 const FT_Renderer_Class class_ = \ 1227 FT_DEFINE_ROOT_MODULE( flags_, \ 1248 #define FT_DECLARE_RENDERER( class_ ) FT_DECLARE_MODULE( class_ ) 1250 #define FT_DEFINE_RENDERER( \ 1268 FT_Destroy_Class_ ## class_( FT_Library library, \ 1269 FT_Module_Class* clazz ) \ 1271 FT_Renderer_Class* rclazz = (FT_Renderer_Class*)clazz; \ 1272 FT_Memory memory = library->memory; \ 1275 class_ ## _pic_free( library ); \ 1277 FT_FREE( rclazz ); \ 1282 FT_Create_Class_ ## class_( FT_Library library, \ 1283 FT_Module_Class** output_class ) \ 1285 FT_Renderer_Class* clazz = NULL; \ 1287 FT_Memory memory = library->memory; \ 1290 if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) ) \ 1293 error = class_ ## _pic_init( library ); \ 1300 FT_DEFINE_ROOT_MODULE( flags_, \ 1310 clazz->glyph_format = glyph_format_; \ 1312 clazz->render_glyph = render_glyph_; \ 1313 clazz->transform_glyph = transform_glyph_; \ 1314 clazz->get_glyph_cbox = get_glyph_cbox_; \ 1315 clazz->set_mode = set_mode_; \ 1317 clazz->raster_class = raster_class_; \ 1319 *output_class = (FT_Module_Class*)clazz; \ 1330 #ifdef FT_CONFIG_OPTION_PIC 1363 (*FT_Module_Destroyer)(
FT_Memory memory,
1414 #ifndef FT_CONFIG_OPTION_PIC 1416 #define FT_DECLARE_MODULE( class_ ) \ 1418 const FT_Module_Class class_; 1420 #define FT_DEFINE_ROOT_MODULE( \ 1445 #define FT_DEFINE_MODULE( \ 1456 FT_CALLBACK_TABLE_DEF \ 1457 const FT_Module_Class class_ = \ 1476 #define FT_DECLARE_MODULE( class_ ) \ 1478 FT_Create_Class_ ## class_( FT_Library library, \ 1479 FT_Module_Class** output_class ); \ 1481 FT_Destroy_Class_ ## class_( FT_Library library, \ 1482 FT_Module_Class* clazz ); 1484 #define FT_DEFINE_ROOT_MODULE( \ 1494 clazz->root.module_flags = flags_; \ 1495 clazz->root.module_size = size_; \ 1496 clazz->root.module_name = name_; \ 1497 clazz->root.module_version = version_; \ 1498 clazz->root.module_requires = requires_; \ 1500 clazz->root.module_interface = interface_; \ 1502 clazz->root.module_init = init_; \ 1503 clazz->root.module_done = done_; \ 1504 clazz->root.get_interface = get_interface_; 1506 #define FT_DEFINE_MODULE( \ 1518 FT_Destroy_Class_ ## class_( FT_Library library, \ 1519 FT_Module_Class* clazz ) \ 1521 FT_Memory memory = library->memory; \ 1524 class_ ## _pic_free( library ); \ 1531 FT_Create_Class_ ## class_( FT_Library library, \ 1532 FT_Module_Class** output_class ) \ 1534 FT_Memory memory = library->memory; \ 1535 FT_Module_Class* clazz = NULL; \ 1539 if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) ) \ 1541 error = class_ ## _pic_init( library ); \ 1548 clazz->module_flags = flags_; \ 1549 clazz->module_size = size_; \ 1550 clazz->module_name = name_; \ 1551 clazz->module_version = version_; \ 1552 clazz->module_requires = requires_; \ 1554 clazz->module_interface = interface_; \ 1556 clazz->module_init = init_; \ 1557 clazz->module_done = done_; \ 1558 clazz->get_interface = get_interface_; \ 1560 *output_class = clazz; \ void(* FT_DebugHook_Func)(void *arg)
ft_glyphslot_set_bitmap(FT_GlyphSlot slot, FT_Byte *buffer)
FT_ULong raster_pool_size
FT_Raster_Render_Func raster_render
FT_BEGIN_HEADER typedef signed long FT_Pos
FT_Renderer_RenderFunc render
FT_CMap_CharVarIndexFunc char_var_index
ft_synthesize_vertical_metrics(FT_Glyph_Metrics *metrics, FT_Pos advance)
typedefFT_BEGIN_HEADER struct FT_Glyph_Class_ FT_Glyph_Class
FT_Select_Metrics(FT_Face face, FT_ULong strike_index)
struct FT_RasterRec_ * FT_Raster
FT_UInt(* FT_CMap_CharIndexFunc)(FT_CMap cmap, FT_UInt32 char_code)
struct FT_LibraryRec_ FT_LibraryRec
enum FT_Render_Mode_ FT_Render_Mode
FT_UInt32 *(* FT_CMap_VariantCharListFunc)(FT_CMap cmap, FT_Memory mem, FT_UInt32 variant_selector)
FT_UInt(* FT_Face_GetGlyphNameIndexFunc)(FT_Face face, FT_String *glyph_name)
struct FT_ModuleRec_ FT_ModuleRec
void(* FT_CMap_DoneFunc)(FT_CMap cmap)
FT_New_GlyphSlot(FT_Face face, FT_GlyphSlot *aslot)
FT_Bool ignore_unpatented_hinter
FT_EXPORT_VAR(FT_Raster_Funcs) ft_default_raster
FT_Done_GlyphSlot(FT_GlyphSlot slot)
typedef void(APIENTRY *GLDEBUGPROCARB)(GLenum source
FT_Render_Glyph_Internal(FT_Library library, FT_GlyphSlot slot, FT_Render_Mode render_mode)
FT_Lookup_Renderer(FT_Library library, FT_Glyph_Format format, FT_ListNode *node)
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLenum GLuint GLint GLenum face
typedefFT_BEGIN_HEADER struct FT_GlyphLoaderRec_ * FT_GlyphLoader
struct FT_Slot_InternalRec_ FT_GlyphSlot_InternalRec
FT_CMap_CharIndexFunc char_index
FT_CMap_VariantListFunc variant_list
struct FT_CMapRec_ * FT_CMap
FT_Bool glyph_transformed
FT_CMap_CharVariantListFunc charvariant_list
FT_UInt32 *(* FT_CMap_VariantListFunc)(FT_CMap cmap, FT_Memory mem)
FT_Match_Size(FT_Face face, FT_Size_Request req, FT_Bool ignore_width, FT_ULong *size_index)
struct FT_CMapRec_ FT_CMapRec
ft_module_get_service(FT_Module module, const char *service_id)
struct FT_CMap_ClassRec_ FT_CMap_ClassRec
#define FT_Raster_Render_Func
FT_Request_Metrics(FT_Face face, FT_Size_Request req)
ft_glyphslot_alloc_bitmap(FT_GlyphSlot slot, FT_ULong size)
FT_Glyph_Class glyph_class
FT_GlyphLoader glyph_loader
GLsizei const GLfloat * value
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_Glyph_Format glyph_format
ft_glyphslot_free_bitmap(FT_GlyphSlot slot)
struct FT_RendererRec_ FT_RendererRec
FT_CMap_New(FT_CMap_Class clazz, FT_Pointer init_data, FT_CharMap charmap, FT_CMap *acmap)
FT_CMap_Done(FT_CMap cmap)
FT_BEGIN_HEADER struct FT_Glyph_Metrics_ FT_Glyph_Metrics
struct FT_Face_InternalRec_ FT_Face_InternalRec
void(* FT_Bitmap_LcdFilterFunc)(FT_Bitmap *bitmap, FT_Render_Mode render_mode, FT_Library library)
enum FT_Glyph_Format_ FT_Glyph_Format
FT_Error(* FT_Face_GetGlyphNameFunc)(FT_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max)
FT_BEGIN_HEADER enum FT_LcdFilter_ FT_LcdFilter
const struct FT_CMap_ClassRec_ * FT_CMap_Class
FT_UInt(* FT_CMap_CharNextFunc)(FT_CMap cmap, FT_UInt32 *achar_code)
FT_ServiceCacheRec services
FT_Get_Module_Interface(FT_Library library, const char *mod_name)
FT_Matrix transform_matrix
struct FT_DriverRec_ FT_DriverRec
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
FT_Renderer_Class * clazz
FT_CMap_CharNextFunc char_next
FT_Error(* FT_CMap_InitFunc)(FT_CMap cmap, FT_Pointer init_data)
FT_CMap_VariantCharListFunc variantchar_list
FT_UInt32 *(* FT_CMap_CharVariantListFunc)(FT_CMap cmap, FT_Memory mem, FT_UInt32 char_code)
FT_Done_Memory(FT_Memory memory)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
FT_UInt(* FT_CMap_CharVarIndexFunc)(FT_CMap cmap, FT_CMap unicode_cmap, FT_UInt32 char_code, FT_UInt32 variant_selector)
FT_CMap_CharVarIsDefaultFunc char_var_default
FT_Bool(* FT_CMap_CharVarIsDefaultFunc)(FT_CMap cmap, FT_UInt32 char_code, FT_UInt32 variant_selector)
FT_Error(* FT_Renderer_RenderFunc)(FT_Renderer renderer, FT_GlyphSlot slot, FT_UInt mode, const FT_Vector *origin)
FT_Vector transform_delta
ft_highpow2(FT_UInt32 value)