28#include FT_CONFIG_CONFIG_H
776#define FT_ENC_TAG( value, a, b, c, d ) \
777 value = ( ( FT_STATIC_BYTE_CAST( FT_UInt32, a ) << 24 ) | \
778 ( FT_STATIC_BYTE_CAST( FT_UInt32, b ) << 16 ) | \
779 ( FT_STATIC_BYTE_CAST( FT_UInt32, c ) << 8 ) | \
780 FT_STATIC_BYTE_CAST( FT_UInt32, d ) )
931 typedef enum FT_Encoding_
933 FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ),
935 FT_ENC_TAG( FT_ENCODING_MS_SYMBOL,
's',
'y',
'm',
'b' ),
936 FT_ENC_TAG( FT_ENCODING_UNICODE,
'u',
'n',
'i',
'c' ),
938 FT_ENC_TAG( FT_ENCODING_SJIS,
's',
'j',
'i',
's' ),
939 FT_ENC_TAG( FT_ENCODING_PRC,
'g',
'b',
' ',
' ' ),
940 FT_ENC_TAG( FT_ENCODING_BIG5,
'b',
'i',
'g',
'5' ),
941 FT_ENC_TAG( FT_ENCODING_WANSUNG,
'w',
'a',
'n',
's' ),
942 FT_ENC_TAG( FT_ENCODING_JOHAB,
'j',
'o',
'h',
'a' ),
945 FT_ENCODING_GB2312 = FT_ENCODING_PRC,
946 FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS,
947 FT_ENCODING_MS_GB2312 = FT_ENCODING_PRC,
948 FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5,
949 FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG,
950 FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB,
952 FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD,
'A',
'D',
'O',
'B' ),
953 FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT,
'A',
'D',
'B',
'E' ),
954 FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM,
'A',
'D',
'B',
'C' ),
955 FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1,
'l',
'a',
't',
'1' ),
957 FT_ENC_TAG( FT_ENCODING_OLD_LATIN_2,
'l',
'a',
't',
'2' ),
959 FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN,
'a',
'r',
'm',
'n' )
966#define ft_encoding_none FT_ENCODING_NONE
967#define ft_encoding_unicode FT_ENCODING_UNICODE
968#define ft_encoding_symbol FT_ENCODING_MS_SYMBOL
969#define ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1
970#define ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2
971#define ft_encoding_sjis FT_ENCODING_SJIS
972#define ft_encoding_gb2312 FT_ENCODING_PRC
973#define ft_encoding_big5 FT_ENCODING_BIG5
974#define ft_encoding_wansung FT_ENCODING_WANSUNG
975#define ft_encoding_johab FT_ENCODING_JOHAB
977#define ft_encoding_adobe_standard FT_ENCODING_ADOBE_STANDARD
978#define ft_encoding_adobe_expert FT_ENCODING_ADOBE_EXPERT
979#define ft_encoding_adobe_custom FT_ENCODING_ADOBE_CUSTOM
980#define ft_encoding_apple_roman FT_ENCODING_APPLE_ROMAN
1011 FT_Encoding encoding;
1012 FT_UShort platform_id;
1013 FT_UShort encoding_id;
1239 FT_Long style_flags;
1243 FT_String* family_name;
1244 FT_String* style_name;
1246 FT_Int num_fixed_sizes;
1247 FT_Bitmap_Size* available_sizes;
1249 FT_Int num_charmaps;
1250 FT_CharMap* charmaps;
1259 FT_UShort units_per_EM;
1264 FT_Short max_advance_width;
1265 FT_Short max_advance_height;
1267 FT_Short underline_position;
1268 FT_Short underline_thickness;
1280 FT_ListRec sizes_list;
1282 FT_Generic autohint;
1285 FT_Face_Internal internal;
1417#define FT_FACE_FLAG_SCALABLE ( 1L << 0 )
1418#define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 )
1419#define FT_FACE_FLAG_FIXED_WIDTH ( 1L << 2 )
1420#define FT_FACE_FLAG_SFNT ( 1L << 3 )
1421#define FT_FACE_FLAG_HORIZONTAL ( 1L << 4 )
1422#define FT_FACE_FLAG_VERTICAL ( 1L << 5 )
1423#define FT_FACE_FLAG_KERNING ( 1L << 6 )
1424#define FT_FACE_FLAG_FAST_GLYPHS ( 1L << 7 )
1425#define FT_FACE_FLAG_MULTIPLE_MASTERS ( 1L << 8 )
1426#define FT_FACE_FLAG_GLYPH_NAMES ( 1L << 9 )
1427#define FT_FACE_FLAG_EXTERNAL_STREAM ( 1L << 10 )
1428#define FT_FACE_FLAG_HINTER ( 1L << 11 )
1429#define FT_FACE_FLAG_CID_KEYED ( 1L << 12 )
1430#define FT_FACE_FLAG_TRICKY ( 1L << 13 )
1431#define FT_FACE_FLAG_COLOR ( 1L << 14 )
1432#define FT_FACE_FLAG_VARIATION ( 1L << 15 )
1433#define FT_FACE_FLAG_SVG ( 1L << 16 )
1434#define FT_FACE_FLAG_SBIX ( 1L << 17 )
1435#define FT_FACE_FLAG_SBIX_OVERLAY ( 1L << 18 )
1458#define FT_HAS_HORIZONTAL( face ) \
1459 ( !!( (face)->face_flags & FT_FACE_FLAG_HORIZONTAL ) )
1472#define FT_HAS_VERTICAL( face ) \
1473 ( !!( (face)->face_flags & FT_FACE_FLAG_VERTICAL ) )
1486#define FT_HAS_KERNING( face ) \
1487 ( !!( (face)->face_flags & FT_FACE_FLAG_KERNING ) )
1501#define FT_IS_SCALABLE( face ) \
1502 ( !!( (face)->face_flags & FT_FACE_FLAG_SCALABLE ) )
1520#define FT_IS_SFNT( face ) \
1521 ( !!( (face)->face_flags & FT_FACE_FLAG_SFNT ) )
1535#define FT_IS_FIXED_WIDTH( face ) \
1536 ( !!( (face)->face_flags & FT_FACE_FLAG_FIXED_WIDTH ) )
1550#define FT_HAS_FIXED_SIZES( face ) \
1551 ( !!( (face)->face_flags & FT_FACE_FLAG_FIXED_SIZES ) )
1570#define FT_HAS_FAST_GLYPHS( face ) 0
1590#define FT_HAS_GLYPH_NAMES( face ) \
1591 ( !!( (face)->face_flags & FT_FACE_FLAG_GLYPH_NAMES ) )
1605#define FT_HAS_MULTIPLE_MASTERS( face ) \
1606 ( !!( (face)->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS ) )
1627#define FT_IS_NAMED_INSTANCE( face ) \
1628 ( !!( (face)->face_index & 0x7FFF0000L ) )
1645#define FT_IS_VARIATION( face ) \
1646 ( !!( (face)->face_flags & FT_FACE_FLAG_VARIATION ) )
1662#define FT_IS_CID_KEYED( face ) \
1663 ( !!( (face)->face_flags & FT_FACE_FLAG_CID_KEYED ) )
1676#define FT_IS_TRICKY( face ) \
1677 ( !!( (face)->face_flags & FT_FACE_FLAG_TRICKY ) )
1693#define FT_HAS_COLOR( face ) \
1694 ( !!( (face)->face_flags & FT_FACE_FLAG_COLOR ) )
1709#define FT_HAS_SVG( face ) \
1710 ( !!( (face)->face_flags & FT_FACE_FLAG_SVG ) )
1793#define FT_HAS_SBIX( face ) \
1794 ( !!( (face)->face_flags & FT_FACE_FLAG_SBIX ) )
1811#define FT_HAS_SBIX_OVERLAY( face ) \
1812 ( !!( (face)->face_flags & FT_FACE_FLAG_SBIX_OVERLAY ) )
1844#define FT_STYLE_FLAG_ITALIC ( 1 << 0 )
1845#define FT_STYLE_FLAG_BOLD ( 1 << 1 )
2019 FT_Size_Metrics metrics;
2020 FT_Size_Internal internal;
2273 FT_UInt glyph_index;
2276 FT_Glyph_Metrics metrics;
2277 FT_Fixed linearHoriAdvance;
2278 FT_Fixed linearVertAdvance;
2281 FT_Glyph_Format format;
2289 FT_UInt num_subglyphs;
2290 FT_SubGlyph subglyphs;
2300 FT_Slot_Internal internal;
2354 FT_EXPORT( FT_Error )
2355 FT_Init_FreeType( FT_Library *alibrary );
2374 FT_EXPORT( FT_Error )
2375 FT_Done_FreeType( FT_Library library );
2414#define FT_OPEN_MEMORY 0x1
2415#define FT_OPEN_STREAM 0x2
2416#define FT_OPEN_PATHNAME 0x4
2417#define FT_OPEN_DRIVER 0x8
2418#define FT_OPEN_PARAMS 0x10
2423#define ft_open_memory FT_OPEN_MEMORY
2424#define ft_open_stream FT_OPEN_STREAM
2425#define ft_open_pathname FT_OPEN_PATHNAME
2426#define ft_open_driver FT_OPEN_DRIVER
2427#define ft_open_params FT_OPEN_PARAMS
2528 const FT_Byte* memory_base;
2529 FT_Long memory_size;
2530 FT_String* pathname;
2534 FT_Parameter* params;
2577 FT_EXPORT( FT_Error )
2578 FT_New_Face( FT_Library library,
2579 const char* filepathname,
2617 FT_EXPORT( FT_Error )
2618 FT_New_Memory_Face( FT_Library library,
2619 const FT_Byte* file_base,
2766 FT_EXPORT( FT_Error )
2767 FT_Open_Face( FT_Library library,
2768 const FT_Open_Args* args,
2792 FT_EXPORT( FT_Error )
2793 FT_Attach_File( FT_Face face,
2794 const char* filepathname );
2828 FT_EXPORT( FT_Error )
2829 FT_Attach_Stream( FT_Face face,
2858 FT_EXPORT( FT_Error )
2859 FT_Reference_Face( FT_Face face );
2882 FT_EXPORT( FT_Error )
2883 FT_Done_Face( FT_Face face );
2929 FT_EXPORT( FT_Error )
2930 FT_Select_Size( FT_Face face,
2931 FT_Int strike_index );
2983 typedef enum FT_Size_Request_Type_
2985 FT_SIZE_REQUEST_TYPE_NOMINAL,
2986 FT_SIZE_REQUEST_TYPE_REAL_DIM,
2987 FT_SIZE_REQUEST_TYPE_BBOX,
2988 FT_SIZE_REQUEST_TYPE_CELL,
2989 FT_SIZE_REQUEST_TYPE_SCALES,
2991 FT_SIZE_REQUEST_TYPE_MAX
2993 } FT_Size_Request_Type;
3037 FT_Size_Request_Type type;
3040 FT_UInt horiResolution;
3041 FT_UInt vertResolution;
3043 } FT_Size_RequestRec;
3093 FT_EXPORT( FT_Error )
3094 FT_Request_Size( FT_Face face,
3095 FT_Size_Request req );
3142 FT_EXPORT( FT_Error )
3143 FT_Set_Char_Size( FT_Face face,
3144 FT_F26Dot6 char_width,
3145 FT_F26Dot6 char_height,
3146 FT_UInt horz_resolution,
3147 FT_UInt vert_resolution );
3179 FT_EXPORT( FT_Error )
3180 FT_Set_Pixel_Sizes( FT_Face face,
3181 FT_UInt pixel_width,
3182 FT_UInt pixel_height );
3234 FT_EXPORT( FT_Error )
3235 FT_Load_Glyph( FT_Face face,
3236 FT_UInt glyph_index,
3237 FT_Int32 load_flags );
3284 FT_EXPORT( FT_Error )
3285 FT_Load_Char( FT_Face face,
3287 FT_Int32 load_flags );
3504#define FT_LOAD_DEFAULT 0x0
3505#define FT_LOAD_NO_SCALE ( 1L << 0 )
3506#define FT_LOAD_NO_HINTING ( 1L << 1 )
3507#define FT_LOAD_RENDER ( 1L << 2 )
3508#define FT_LOAD_NO_BITMAP ( 1L << 3 )
3509#define FT_LOAD_VERTICAL_LAYOUT ( 1L << 4 )
3510#define FT_LOAD_FORCE_AUTOHINT ( 1L << 5 )
3511#define FT_LOAD_CROP_BITMAP ( 1L << 6 )
3512#define FT_LOAD_PEDANTIC ( 1L << 7 )
3513#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ( 1L << 9 )
3514#define FT_LOAD_NO_RECURSE ( 1L << 10 )
3515#define FT_LOAD_IGNORE_TRANSFORM ( 1L << 11 )
3516#define FT_LOAD_MONOCHROME ( 1L << 12 )
3517#define FT_LOAD_LINEAR_DESIGN ( 1L << 13 )
3518#define FT_LOAD_SBITS_ONLY ( 1L << 14 )
3519#define FT_LOAD_NO_AUTOHINT ( 1L << 15 )
3521#define FT_LOAD_COLOR ( 1L << 20 )
3522#define FT_LOAD_COMPUTE_METRICS ( 1L << 21 )
3523#define FT_LOAD_BITMAP_METRICS_ONLY ( 1L << 22 )
3524#define FT_LOAD_NO_SVG ( 1L << 24 )
3529#define FT_LOAD_ADVANCE_ONLY ( 1L << 8 )
3530#define FT_LOAD_SVG_ONLY ( 1L << 23 )
3620#define FT_LOAD_TARGET_( x ) ( FT_STATIC_CAST( FT_Int32, (x) & 15 ) << 16 )
3622#define FT_LOAD_TARGET_NORMAL FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL )
3623#define FT_LOAD_TARGET_LIGHT FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT )
3624#define FT_LOAD_TARGET_MONO FT_LOAD_TARGET_( FT_RENDER_MODE_MONO )
3625#define FT_LOAD_TARGET_LCD FT_LOAD_TARGET_( FT_RENDER_MODE_LCD )
3626#define FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V )
3639#define FT_LOAD_TARGET_MODE( x ) \
3640 FT_STATIC_CAST( FT_Render_Mode, ( (x) >> 16 ) & 15 )
3687 FT_Set_Transform( FT_Face face,
3720 FT_Get_Transform( FT_Face face,
3793 typedef enum FT_Render_Mode_
3795 FT_RENDER_MODE_NORMAL = 0,
3796 FT_RENDER_MODE_LIGHT,
3797 FT_RENDER_MODE_MONO,
3799 FT_RENDER_MODE_LCD_V,
3809#define ft_render_mode_normal FT_RENDER_MODE_NORMAL
3810#define ft_render_mode_mono FT_RENDER_MODE_MONO
3918 FT_EXPORT( FT_Error )
3919 FT_Render_Glyph( FT_GlyphSlot slot,
3920 FT_Render_Mode render_mode );
3951 typedef enum FT_Kerning_Mode_
3953 FT_KERNING_DEFAULT = 0,
3954 FT_KERNING_UNFITTED,
3962#define ft_kerning_default FT_KERNING_DEFAULT
3963#define ft_kerning_unfitted FT_KERNING_UNFITTED
3964#define ft_kerning_unscaled FT_KERNING_UNSCALED
4025 FT_EXPORT( FT_Error )
4026 FT_Get_Kerning( FT_Face face,
4028 FT_UInt right_glyph,
4030 FT_Vector *akerning );
4069 FT_EXPORT( FT_Error )
4070 FT_Get_Track_Kerning( FT_Face face,
4071 FT_Fixed point_size,
4073 FT_Fixed* akerning );
4113 FT_EXPORT( FT_Error )
4114 FT_Select_Charmap( FT_Face face,
4115 FT_Encoding encoding );
4144 FT_EXPORT( FT_Error )
4145 FT_Set_Charmap( FT_Face face,
4146 FT_CharMap charmap );
4167 FT_Get_Charmap_Index( FT_CharMap charmap );
4201 FT_EXPORT( FT_UInt )
4202 FT_Get_Char_Index( FT_Face face,
4203 FT_ULong charcode );
4256 FT_EXPORT( FT_ULong )
4257 FT_Get_First_Char( FT_Face face,
4293 FT_EXPORT( FT_ULong )
4294 FT_Get_Next_Char( FT_Face face,
4398 FT_EXPORT( FT_Error )
4399 FT_Face_Properties( FT_Face face,
4400 FT_UInt num_properties,
4401 FT_Parameter* properties );
4440 FT_EXPORT( FT_UInt )
4441 FT_Get_Name_Index( FT_Face face,
4442 const FT_String* glyph_name );
4487 FT_EXPORT( FT_Error )
4488 FT_Get_Glyph_Name( FT_Face face,
4489 FT_UInt glyph_index,
4491 FT_UInt buffer_max );
4527 FT_EXPORT(
const char* )
4528 FT_Get_Postscript_Name( FT_Face face );
4553#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS 1
4554#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES 2
4555#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID 4
4556#define FT_SUBGLYPH_FLAG_SCALE 8
4557#define FT_SUBGLYPH_FLAG_XY_SCALE 0x40
4558#define FT_SUBGLYPH_FLAG_2X2 0x80
4559#define FT_SUBGLYPH_FLAG_USE_MY_METRICS 0x200
4607 FT_EXPORT( FT_Error )
4608 FT_Get_SubGlyph_Info( FT_GlyphSlot glyph,
4614 FT_Matrix *p_transform );
4670#define FT_FSTYPE_INSTALLABLE_EMBEDDING 0x0000
4671#define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING 0x0002
4672#define FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING 0x0004
4673#define FT_FSTYPE_EDITABLE_EMBEDDING 0x0008
4674#define FT_FSTYPE_NO_SUBSETTING 0x0100
4675#define FT_FSTYPE_BITMAP_EMBEDDING_ONLY 0x0200
4702 FT_EXPORT( FT_UShort )
4703 FT_Get_FSType_Flags( FT_Face face );
4796 FT_EXPORT( FT_UInt )
4797 FT_Face_GetCharVariantIndex( FT_Face face,
4799 FT_ULong variantSelector );
4834 FT_Face_GetCharVariantIsDefault( FT_Face face,
4836 FT_ULong variantSelector );
4865 FT_EXPORT( FT_UInt32* )
4866 FT_Face_GetVariantSelectors( FT_Face face );
4899 FT_EXPORT( FT_UInt32* )
4900 FT_Face_GetVariantsOfChar( FT_Face face,
4901 FT_ULong charcode );
4934 FT_EXPORT( FT_UInt32* )
4935 FT_Face_GetCharsOfVariant( FT_Face face,
4936 FT_ULong variantSelector );
5001 FT_EXPORT( FT_Long )
5002 FT_MulDiv( FT_Long a,
5037 FT_EXPORT( FT_Long )
5038 FT_MulFix( FT_Long a,
5061 FT_EXPORT( FT_Long )
5062 FT_DivFix( FT_Long a,
5085 FT_EXPORT( FT_Fixed )
5086 FT_RoundFix( FT_Fixed a );
5107 FT_EXPORT( FT_Fixed )
5108 FT_CeilFix( FT_Fixed a );
5126 FT_EXPORT( FT_Fixed )
5127 FT_FloorFix( FT_Fixed a );
5150 FT_Vector_Transform( FT_Vector* vector,
5151 const FT_Matrix* matrix );
5183#define FREETYPE_MAJOR 2
5184#define FREETYPE_MINOR 14
5185#define FREETYPE_PATCH 1
5221 FT_Library_Version( FT_Library library,
5256 FT_EXPORT( FT_Bool )
5257 FT_Face_CheckTrueTypePatents( FT_Face face );
5285 FT_EXPORT( FT_Bool )
5286 FT_Face_SetUnpatentedHinting( FT_Face face,