18 #ifndef _HPDF_FONTDEF_H
19 #define _HPDF_FONTDEF_H
28 #define HPDF_FONTDEF_SIG_BYTES 0x464F4E54L
32 #define HPDF_FONT_FIXED_WIDTH 1
33 #define HPDF_FONT_SERIF 2
34 #define HPDF_FONT_SYMBOLIC 4
35 #define HPDF_FONT_SCRIPT 8
37 #define HPDF_FONT_STD_CHARSET 32
38 #define HPDF_FONT_ITALIC 64
48 #define HPDF_FONT_ALL_CAP 65536
49 #define HPDF_FONT_SMALL_CAP 131072
50 #define HPDF_FONT_FOURCE_BOLD 262144
52 #define HPDF_CID_W_TYPE_FROM_TO 0
53 #define HPDF_CID_W_TYPE_FROM_ARRAY 1
181 const char *gryph_name);
191 const char *font_name);
198 #define HPDF_TTF_FONT_TAG_LEN 6
#define HPDF_LIMIT_MAX_NAME_LEN
Definition: hpdf_consts.h:120
struct _HPDF_TTF_NamingTable HPDF_TTF_NamingTable
struct _HPDF_FontDef_Rec * HPDF_FontDef
Definition: hpdf_fontdef.h:79
HPDF_UINT16 HPDF_TTFontDef_GetGlyphid(HPDF_FontDef fontdef, HPDF_UINT16 unicode)
HPDF_FontDef HPDF_Type1FontDef_New(HPDF_MMgr mmgr)
HPDF_Box HPDF_TTFontDef_GetCharBBox(HPDF_FontDef fontdef, HPDF_UINT16 unicode)
enum _HPDF_FontDefType HPDF_FontDefType
_HPDF_FontDefType
Definition: hpdf_fontdef.h:63
@ HPDF_FONTDEF_TYPE_CID
Definition: hpdf_fontdef.h:66
@ HPDF_FONTDEF_TYPE_UNINITIALIZED
Definition: hpdf_fontdef.h:67
@ HPDF_FONTDEF_TYPE_TRUETYPE
Definition: hpdf_fontdef.h:65
@ HPDF_FONTDEF_TYPE_EOF
Definition: hpdf_fontdef.h:68
@ HPDF_FONTDEF_TYPE_TYPE1
Definition: hpdf_fontdef.h:64
HPDF_FontDef HPDF_Type1FontDef_Duplicate(HPDF_MMgr mmgr, HPDF_FontDef src)
void HPDF_FontDef_Free(HPDF_FontDef fontdef)
HPDF_INT16 HPDF_CIDFontDef_GetCIDWidth(HPDF_FontDef fontdef, HPDF_UINT16 cid)
HPDF_STATUS HPDF_Type1FontDef_SetWidths(HPDF_FontDef fontdef, const HPDF_CharData *widths)
struct _HPDF_CIDFontDefAttrRec * HPDF_CIDFontDefAttr
Definition: hpdf_fontdef.h:371
struct _HPDF_TTF_NameRecord HPDF_TTF_NameRecord
struct _HPDF_CID_Width HPDF_CID_Width
#define HPDF_TTF_FONT_TAG_LEN
Definition: hpdf_fontdef.h:198
HPDF_INT16 HPDF_TTFontDef_GetGidWidth(HPDF_FontDef fontdef, HPDF_UINT16 gid)
struct _HPDF_TTF_OffsetTbl HPDF_TTF_OffsetTbl
struct _HPDF_TTFontDefAttr_Rec * HPDF_TTFontDefAttr
Definition: hpdf_fontdef.h:288
HPDF_STATUS HPDF_CIDFontDef_AddWidth(HPDF_FontDef fontdef, const HPDF_CID_Width *widths)
struct _HPDF_Type1FontDefAttrRec HPDF_Type1FontDefAttr_Rec
void HPDF_FontDef_Cleanup(HPDF_FontDef fontdef)
HPDF_STATUS HPDF_TTFontDef_SaveFontData(HPDF_FontDef fontdef, HPDF_Stream stream)
HPDF_STATUS HPDF_CIDFontDef_ChangeStyle(HPDF_FontDef fontdef, HPDF_BOOL bold, HPDF_BOOL italic)
struct _HPDF_TTF_FontHeader HPDF_TTF_FontHeader
struct _HPDF_TTF_Table HPDF_TTFTable
HPDF_FontDef HPDF_CIDFontDef_New(HPDF_MMgr mmgr, char *name, HPDF_FontDef_InitFunc init_fn)
void HPDF_TTFontDef_SetTagName(HPDF_FontDef fontdef, char *tag)
HPDF_INT16 HPDF_TTFontDef_GetCharWidth(HPDF_FontDef fontdef, HPDF_UINT16 unicode)
HPDF_FontDef HPDF_Base14FontDef_New(HPDF_MMgr mmgr, const char *font_name)
HPDF_FontDef HPDF_Type1FontDef_Load(HPDF_MMgr mmgr, HPDF_Stream afm, HPDF_Stream font_data)
struct _HPDF_CIDFontDefAttrRec HPDF_CIDFontDefAttr_Rec
struct _HPDF_TTF_GryphOffsets HPDF_TTF_GryphOffsets
struct _HPDF_TTF_LongHorMetric HPDF_TTF_LongHorMetric
HPDF_FontDef HPDF_TTFontDef_Load(HPDF_MMgr mmgr, HPDF_Stream stream, HPDF_BOOL embedding)
HPDF_INT16 HPDF_Type1FontDef_GetWidth(HPDF_FontDef fontdef, HPDF_UNICODE unicode)
HPDF_BOOL HPDF_FontDef_Validate(HPDF_FontDef fontdef)
HPDF_INT16 HPDF_Type1FontDef_GetWidthByName(HPDF_FontDef fontdef, const char *gryph_name)
HPDF_FontDef HPDF_TTFontDef_New(HPDF_MMgr mmgr)
HPDF_FontDef HPDF_TTFontDef_Load2(HPDF_MMgr mmgr, HPDF_Stream stream, HPDF_UINT index, HPDF_BOOL embedding)
struct _HPDF_FontDef_Rec HPDF_FontDef_Rec
struct _HPDF_TTF_CmapRange HPDF_TTF_CmapRange
struct _HPDF_Type1FontDefAttrRec * HPDF_Type1FontDefAttr
Definition: hpdf_fontdef.h:137
HPDF_STATUS(* HPDF_FontDef_InitFunc)(HPDF_FontDef fontdef)
Definition: hpdf_fontdef.h:85
struct _HPDF_CharData HPDF_CharData
struct _HPDF_TTFontDefAttr_Rec HPDF_TTFontDefAttr_Rec
void(* HPDF_FontDef_FreeFunc)(HPDF_FontDef fontdef)
Definition: hpdf_fontdef.h:81
void(* HPDF_FontDef_CleanFunc)(HPDF_FontDef fontdef)
Definition: hpdf_fontdef.h:83
unsigned short HPDF_UINT16
Definition: hpdf_types.h:63
signed int HPDF_BOOL
Definition: hpdf_types.h:89
unsigned int HPDF_UINT
Definition: hpdf_types.h:45
unsigned int HPDF_UINT32
Definition: hpdf_types.h:57
HPDF_UINT16 HPDF_UNICODE
Definition: hpdf_types.h:100
unsigned char HPDF_BYTE
Definition: hpdf_types.h:74
unsigned long HPDF_STATUS
Definition: hpdf_types.h:94
signed short HPDF_INT16
Definition: hpdf_types.h:62
Definition: hpdf_fontdef.h:373
HPDF_INT16 DW2[2]
Definition: hpdf_fontdef.h:376
HPDF_List widths
Definition: hpdf_fontdef.h:374
HPDF_INT16 DW
Definition: hpdf_fontdef.h:375
Definition: hpdf_fontdef.h:71
HPDF_INT16 width
Definition: hpdf_fontdef.h:73
HPDF_UINT16 cid
Definition: hpdf_fontdef.h:72
Definition: hpdf_fontdef.h:57
HPDF_INT16 width
Definition: hpdf_fontdef.h:60
HPDF_UNICODE unicode
Definition: hpdf_fontdef.h:59
HPDF_INT16 char_cd
Definition: hpdf_fontdef.h:58
Definition: hpdf_objects.h:421
Definition: hpdf_error.h:180
Definition: hpdf_fontdef.h:87
HPDF_Dict descriptor
Definition: hpdf_fontdef.h:114
HPDF_Error error
Definition: hpdf_fontdef.h:91
HPDF_FontDef_FreeFunc free_fn
Definition: hpdf_fontdef.h:94
HPDF_INT16 descent
Definition: hpdf_fontdef.h:98
HPDF_INT16 avg_width
Definition: hpdf_fontdef.h:103
HPDF_MMgr mmgr
Definition: hpdf_fontdef.h:90
HPDF_UINT16 stemv
Definition: hpdf_fontdef.h:102
HPDF_FontDef_CleanFunc clean_fn
Definition: hpdf_fontdef.h:93
HPDF_FontDef_InitFunc init_fn
Definition: hpdf_fontdef.h:95
void * attr
Definition: hpdf_fontdef.h:118
HPDF_UINT32 sig_bytes
Definition: hpdf_fontdef.h:88
HPDF_Stream data
Definition: hpdf_fontdef.h:115
char base_font[HPDF_LIMIT_MAX_NAME_LEN+1]
Definition: hpdf_fontdef.h:89
HPDF_INT16 ascent
Definition: hpdf_fontdef.h:97
HPDF_UINT16 stemh
Definition: hpdf_fontdef.h:106
HPDF_INT16 missing_width
Definition: hpdf_fontdef.h:105
HPDF_INT16 max_width
Definition: hpdf_fontdef.h:104
HPDF_UINT flags
Definition: hpdf_fontdef.h:99
HPDF_INT16 italic_angle
Definition: hpdf_fontdef.h:101
HPDF_FontDefType type
Definition: hpdf_fontdef.h:92
HPDF_UINT16 cap_height
Definition: hpdf_fontdef.h:108
HPDF_Box font_bbox
Definition: hpdf_fontdef.h:100
HPDF_BOOL valid
Definition: hpdf_fontdef.h:117
HPDF_UINT16 x_height
Definition: hpdf_fontdef.h:107
Definition: hpdf_list.h:30
Definition: hpdf_mmgr.h:40
Definition: hpdf_types.h:110
Definition: hpdf_streams.h:99
Definition: hpdf_fontdef.h:218
HPDF_UINT16 range_shift
Definition: hpdf_fontdef.h:225
HPDF_UINT16 reserved_pad
Definition: hpdf_fontdef.h:227
HPDF_UINT16 * end_count
Definition: hpdf_fontdef.h:226
HPDF_UINT16 * start_count
Definition: hpdf_fontdef.h:228
HPDF_UINT glyph_id_array_count
Definition: hpdf_fontdef.h:232
HPDF_UINT16 seg_count_x2
Definition: hpdf_fontdef.h:222
HPDF_UINT16 entry_selector
Definition: hpdf_fontdef.h:224
HPDF_UINT16 format
Definition: hpdf_fontdef.h:219
HPDF_UINT16 * glyph_id_array
Definition: hpdf_fontdef.h:231
HPDF_UINT16 * id_range_offset
Definition: hpdf_fontdef.h:230
HPDF_UINT16 length
Definition: hpdf_fontdef.h:220
HPDF_UINT16 language
Definition: hpdf_fontdef.h:221
HPDF_INT16 * id_delta
Definition: hpdf_fontdef.h:229
HPDF_UINT16 search_range
Definition: hpdf_fontdef.h:223
Definition: hpdf_fontdef.h:236
HPDF_BYTE * flgs
Definition: hpdf_fontdef.h:239
HPDF_UINT32 * offsets
Definition: hpdf_fontdef.h:238
HPDF_UINT32 base_offset
Definition: hpdf_fontdef.h:237
Definition: hpdf_fontdef.h:243
HPDF_UINT16 advance_width
Definition: hpdf_fontdef.h:244
HPDF_INT16 lsb
Definition: hpdf_fontdef.h:245
Definition: hpdf_fontdef.h:270
HPDF_UINT16 platform_id
Definition: hpdf_fontdef.h:271
HPDF_UINT16 language_id
Definition: hpdf_fontdef.h:273
HPDF_UINT16 encoding_id
Definition: hpdf_fontdef.h:272
HPDF_UINT16 offset
Definition: hpdf_fontdef.h:276
HPDF_UINT16 name_id
Definition: hpdf_fontdef.h:274
HPDF_UINT16 length
Definition: hpdf_fontdef.h:275
Definition: hpdf_fontdef.h:280
HPDF_UINT16 count
Definition: hpdf_fontdef.h:282
HPDF_UINT16 string_offset
Definition: hpdf_fontdef.h:283
HPDF_TTF_NameRecord * name_records
Definition: hpdf_fontdef.h:284
HPDF_UINT16 format
Definition: hpdf_fontdef.h:281
Definition: hpdf_fontdef.h:208
HPDF_UINT16 num_tables
Definition: hpdf_fontdef.h:210
HPDF_UINT32 sfnt_version
Definition: hpdf_fontdef.h:209
HPDF_TTFTable * table
Definition: hpdf_fontdef.h:214
HPDF_UINT16 search_range
Definition: hpdf_fontdef.h:211
HPDF_UINT16 range_shift
Definition: hpdf_fontdef.h:213
HPDF_UINT16 entry_selector
Definition: hpdf_fontdef.h:212
Definition: hpdf_fontdef.h:200
HPDF_UINT32 length
Definition: hpdf_fontdef.h:204
HPDF_UINT32 check_sum
Definition: hpdf_fontdef.h:202
HPDF_UINT32 offset
Definition: hpdf_fontdef.h:203
char tag[4]
Definition: hpdf_fontdef.h:201
Definition: hpdf_fontdef.h:290
HPDF_TTF_FontHeader header
Definition: hpdf_fontdef.h:297
HPDF_Stream stream
Definition: hpdf_fontdef.h:316
HPDF_BYTE panose[10]
Definition: hpdf_fontdef.h:307
HPDF_TTF_GryphOffsets glyph_tbl
Definition: hpdf_fontdef.h:298
char * char_set
Definition: hpdf_fontdef.h:294
HPDF_UINT16 num_h_metric
Definition: hpdf_fontdef.h:302
HPDF_BOOL is_cidfont
Definition: hpdf_fontdef.h:314
HPDF_BYTE first_char
Definition: hpdf_fontdef.h:292
HPDF_TTF_NamingTable name_tbl
Definition: hpdf_fontdef.h:300
HPDF_UINT32 code_page_range2
Definition: hpdf_fontdef.h:309
HPDF_UINT32 code_page_range1
Definition: hpdf_fontdef.h:308
char tag_name[HPDF_TTF_FONT_TAG_LEN+1]
Definition: hpdf_fontdef.h:295
char base_font[HPDF_LIMIT_MAX_NAME_LEN+1]
Definition: hpdf_fontdef.h:291
HPDF_UINT length1
Definition: hpdf_fontdef.h:311
HPDF_TTF_LongHorMetric * h_metric
Definition: hpdf_fontdef.h:301
HPDF_TTF_CmapRange cmap
Definition: hpdf_fontdef.h:304
HPDF_TTF_OffsetTbl offset_tbl
Definition: hpdf_fontdef.h:303
HPDF_UINT16 fs_type
Definition: hpdf_fontdef.h:305
char tag_name2[(HPDF_TTF_FONT_TAG_LEN+1) *2]
Definition: hpdf_fontdef.h:296
HPDF_BYTE last_char
Definition: hpdf_fontdef.h:293
HPDF_BOOL embedding
Definition: hpdf_fontdef.h:313
HPDF_BYTE sfamilyclass[2]
Definition: hpdf_fontdef.h:306
HPDF_UINT16 num_glyphs
Definition: hpdf_fontdef.h:299
Definition: hpdf_fontdef.h:139
HPDF_BOOL is_base14font
Definition: hpdf_fontdef.h:151
HPDF_BOOL is_fixed_pitch
Definition: hpdf_fontdef.h:152
HPDF_UINT length1
Definition: hpdf_fontdef.h:148
HPDF_BYTE last_char
Definition: hpdf_fontdef.h:141
HPDF_INT16 leading
Definition: hpdf_fontdef.h:145
HPDF_UINT length2
Definition: hpdf_fontdef.h:149
HPDF_CharData * widths
Definition: hpdf_fontdef.h:142
char encoding_scheme[HPDF_LIMIT_MAX_NAME_LEN+1]
Definition: hpdf_fontdef.h:147
HPDF_BYTE first_char
Definition: hpdf_fontdef.h:140
HPDF_UINT widths_count
Definition: hpdf_fontdef.h:143
char * char_set
Definition: hpdf_fontdef.h:146
HPDF_UINT length3
Definition: hpdf_fontdef.h:150
HPDF_Stream font_data
Definition: hpdf_fontdef.h:154