39 #ifdef FT_CONFIG_OPTION_INCREMENTAL
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) )
80 #define FT_HYPOT( x, y ) \
83 x > y ? x + ( 3 * y >> 3 ) \
84 : y + ( 3 * x >> 3 ) )
87 #define FT_PAD_FLOOR( x, n ) ( (x) & ~FT_TYPEOF( x )( (n) - 1 ) )
88 #define FT_PAD_ROUND( x, n ) FT_PAD_FLOOR( (x) + (n) / 2, n )
89 #define FT_PAD_CEIL( x, n ) FT_PAD_FLOOR( (x) + (n) - 1, n )
91 #define FT_PIX_FLOOR( x ) ( (x) & ~FT_TYPEOF( x )63 )
92 #define FT_PIX_ROUND( x ) FT_PIX_FLOOR( (x) + 32 )
93 #define FT_PIX_CEIL( x ) FT_PIX_FLOOR( (x) + 63 )
97 #define FT_PAD_ROUND_LONG( x, n ) FT_PAD_FLOOR( ADD_LONG( (x), (n) / 2 ), \
99 #define FT_PAD_CEIL_LONG( x, n ) FT_PAD_FLOOR( ADD_LONG( (x), (n) - 1 ), \
101 #define FT_PIX_ROUND_LONG( x ) FT_PIX_FLOOR( ADD_LONG( (x), 32 ) )
102 #define FT_PIX_CEIL_LONG( x ) FT_PIX_FLOOR( ADD_LONG( (x), 63 ) )
104 #define FT_PAD_ROUND_INT32( x, n ) FT_PAD_FLOOR( ADD_INT32( (x), (n) / 2 ), \
106 #define FT_PAD_CEIL_INT32( x, n ) FT_PAD_FLOOR( ADD_INT32( (x), (n) - 1 ), \
108 #define FT_PIX_ROUND_INT32( x ) FT_PIX_FLOOR( ADD_INT32( (x), 32 ) )
109 #define FT_PIX_CEIL_INT32( x ) FT_PIX_FLOOR( ADD_INT32( (x), 63 ) )
116 #define ft_isdigit( x ) ( ( (unsigned)(x) - '0' ) < 10U )
118 #define ft_isxdigit( x ) ( ( (unsigned)(x) - '0' ) < 10U || \
119 ( (unsigned)(x) - 'a' ) < 6U || \
120 ( (unsigned)(x) - 'A' ) < 6U )
123 #define ft_isupper( x ) ( ( (unsigned)(x) - 'A' ) < 26U )
124 #define ft_islower( x ) ( ( (unsigned)(x) - 'a' ) < 26U )
126 #define ft_isalpha( x ) ( ft_isupper( x ) || ft_islower( x ) )
127 #define ft_isalnum( x ) ( ft_isdigit( x ) || ft_isalpha( x ) )
157 #define FT_CMAP( x ) ( (FT_CMap)( x ) )
160 #define FT_CMAP_PLATFORM_ID( x ) FT_CMAP( x )->charmap.platform_id
161 #define FT_CMAP_ENCODING_ID( x ) FT_CMAP( x )->charmap.encoding_id
162 #define FT_CMAP_ENCODING( x ) FT_CMAP( x )->charmap.encoding
163 #define FT_CMAP_FACE( x ) FT_CMAP( x )->charmap.face
176 FT_UInt32 char_code );
180 FT_UInt32 *achar_code );
186 FT_UInt32 variant_selector );
191 FT_UInt32 variant_selector );
194 (*FT_CMap_VariantListFunc)(
FT_CMap cmap,
198 (*FT_CMap_CharVariantListFunc)(
FT_CMap cmap,
200 FT_UInt32 char_code );
203 (*FT_CMap_VariantCharListFunc)(
FT_CMap cmap,
205 FT_UInt32 variant_selector );
229 #define FT_DECLARE_CMAP_CLASS( class_ ) \
230 FT_CALLBACK_TABLE const FT_CMap_ClassRec class_;
232 #define FT_DEFINE_CMAP_CLASS( \
243 variantchar_list_ ) \
244 FT_CALLBACK_TABLE_DEF \
245 const FT_CMap_ClassRec class_ = \
278 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
365 #ifdef FT_CONFIG_OPTION_INCREMENTAL
372 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
374 FT_Bitmap_LcdFilterFunc lcd_filter_func;
421 #define FT_GLYPH_OWN_BITMAP 0x1U
508 #define FT_MODULE( x ) ( (FT_Module)(x) )
510 #define FT_MODULE_CLASS( x ) FT_MODULE( x )->clazz
511 #define FT_MODULE_LIBRARY( x ) FT_MODULE( x )->library
512 #define FT_MODULE_MEMORY( x ) FT_MODULE( x )->memory
515 #define FT_MODULE_IS_DRIVER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
516 FT_MODULE_FONT_DRIVER )
518 #define FT_MODULE_IS_RENDERER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
521 #define FT_MODULE_IS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
524 #define FT_MODULE_IS_STYLER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
527 #define FT_DRIVER_IS_SCALABLE( x ) ( FT_MODULE_CLASS( x )->module_flags & \
528 FT_MODULE_DRIVER_SCALABLE )
530 #define FT_DRIVER_USES_OUTLINES( x ) !( FT_MODULE_CLASS( x )->module_flags & \
531 FT_MODULE_DRIVER_NO_OUTLINES )
533 #define FT_DRIVER_HAS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
534 FT_MODULE_DRIVER_HAS_HINTER )
536 #define FT_DRIVER_HINTS_LIGHTLY( x ) ( FT_MODULE_CLASS( x )->module_flags & \
537 FT_MODULE_DRIVER_HINTS_LIGHTLY )
565 const char* mod_name );
569 const char* service_id,
572 #ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
597 #define FT_FACE( x ) ( (FT_Face)(x) )
598 #define FT_SIZE( x ) ( (FT_Size)(x) )
599 #define FT_SLOT( x ) ( (FT_GlyphSlot)(x) )
601 #define FT_FACE_DRIVER( x ) FT_FACE( x )->driver
602 #define FT_FACE_LIBRARY( x ) FT_FACE_DRIVER( x )->root.library
603 #define FT_FACE_MEMORY( x ) FT_FACE( x )->memory
604 #define FT_FACE_STREAM( x ) FT_FACE( x )->stream
606 #define FT_SIZE_FACE( x ) FT_SIZE( x )->face
607 #define FT_SLOT_FACE( x ) FT_SLOT( x )->face
609 #define FT_FACE_SLOT( x ) FT_FACE( x )->glyph
610 #define FT_FACE_SIZE( x ) FT_FACE( x )->size
658 #define FT_REQUEST_WIDTH( req ) \
659 ( (req)->horiResolution \
660 ? ( (req)->width * (FT_Pos)(req)->horiResolution + 36 ) / 72 \
663 #define FT_REQUEST_HEIGHT( req ) \
664 ( (req)->vertResolution \
665 ? ( (req)->height * (FT_Pos)(req)->vertResolution + 36 ) / 72 \
735 #define FT_RENDERER( x ) ( (FT_Renderer)(x) )
736 #define FT_GLYPH( x ) ( (FT_Glyph)(x) )
737 #define FT_BITMAP_GLYPH( x ) ( (FT_BitmapGlyph)(x) )
738 #define FT_OUTLINE_GLYPH( x ) ( (FT_OutlineGlyph)(x) )
769 #define FT_DRIVER( x ) ( (FT_Driver)(x) )
772 #define FT_DRIVER_CLASS( x ) FT_DRIVER( x )->clazz
910 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
912 FT_Bitmap_LcdFilterFunc lcd_filter_func;
946 #ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM
987 #ifndef FT_NO_DEFAULT_RASTER
1002 #define FT_DEFINE_OUTLINE_FUNCS( \
1010 static const FT_Outline_Funcs class_ = \
1031 #define FT_DEFINE_RASTER_FUNCS( \
1039 const FT_Raster_Funcs class_ = \
1060 #define FT_DECLARE_GLYPH( class_ ) \
1061 FT_CALLBACK_TABLE const FT_Glyph_Class class_;
1063 #define FT_DEFINE_GLYPH( \
1073 FT_CALLBACK_TABLE_DEF \
1074 const FT_Glyph_Class class_ = \
1105 #define FT_DECLARE_RENDERER( class_ ) \
1106 FT_EXPORT_VAR( const FT_Renderer_Class ) class_;
1108 #define FT_DEFINE_RENDERER( \
1125 FT_CALLBACK_TABLE_DEF \
1126 const FT_Renderer_Class class_ = \
1128 FT_DEFINE_ROOT_MODULE( flags_, \
1174 #define FT_DECLARE_MODULE( class_ ) \
1176 const FT_Module_Class class_;
1178 #define FT_DEFINE_ROOT_MODULE( \
1203 #define FT_DEFINE_MODULE( \
1214 FT_CALLBACK_TABLE_DEF \
1215 const FT_Module_Class class_ = \
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]
FT_Error(* 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_UInt32 *(* FT_CMap_VariantListFunc)(FT_CMap cmap, FT_Memory mem)
ft_glyphslot_preset_bitmap(FT_GlyphSlot slot, FT_Render_Mode mode, const FT_Vector *origin)
ft_glyphslot_free_bitmap(FT_GlyphSlot slot)
struct FT_DriverRec_ FT_DriverRec
FT_UInt(* FT_Face_GetGlyphNameIndexFunc)(FT_Face face, const FT_String *glyph_name)
struct FT_Size_InternalRec_ FT_Size_InternalRec
FT_CMap_Done(FT_CMap cmap)
FT_New_GlyphSlot(FT_Face face, FT_GlyphSlot *aslot)
FT_Request_Metrics(FT_Face face, FT_Size_Request req)
FT_Int(* FT_CMap_CharVarIsDefaultFunc)(FT_CMap cmap, FT_UInt32 char_code, FT_UInt32 variant_selector)
struct FT_CMap_ClassRec_ FT_CMap_ClassRec
ft_module_get_service(FT_Module module, const char *service_id, FT_Bool global)
struct FT_CMapRec_ FT_CMapRec
FT_UInt32 *(* FT_CMap_VariantCharListFunc)(FT_CMap cmap, FT_Memory mem, FT_UInt32 variant_selector)
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)
ft_lcd_padding(FT_BBox *cbox, FT_GlyphSlot slot, FT_Render_Mode mode)
struct FT_CMapRec_ * FT_CMap
FT_UInt32 *(* FT_CMap_CharVariantListFunc)(FT_CMap cmap, FT_Memory mem, FT_UInt32 char_code)
FT_Get_Module_Interface(FT_Library library, const char *mod_name)
FT_Done_Memory(FT_Memory memory)
FT_EXPORT_VAR(FT_Raster_Funcs) ft_default_raster
struct FT_Face_InternalRec_ FT_Face_InternalRec
FT_Error(* FT_CMap_InitFunc)(FT_CMap cmap, FT_Pointer init_data)
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
EGLOutputLayerEXT EGLint EGLAttrib value
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLsizei const GLuint const GLfloat * weights
GLsizei GLenum const void GLuint GLsizei GLfloat * metrics
GLint GLsizei GLsizei GLenum format
GLsizei GLenum GLsizei GLsizei GLuint memory
GLsizei GLfixed GLfixed GLfixed GLfixed const GLubyte * bitmap
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_Vector lcd_geometry[3]
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