Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed























































Rev Author Line No. Line
3918 Serge 1
2
"http://www.w3.org/TR/html4/loose.dtd">
3
4
5
6
FreeType-2.5.0 API Reference
7
32
33
34
 
35
[Index]
36
37
[TOC]
38

FreeType-2.5.0 API Reference

39
 
40

41
Type 1 Tables
42
43

Synopsis

44
45
PS_FontInfoRecT1_Blend_FlagsFT_Has_PS_Glyph_Names
46
PS_FontInfoCID_FaceDictRecFT_Get_PS_Font_Info
47
T1_FontInfoCID_FaceDictFT_Get_PS_Font_Private
48
PS_PrivateRecCID_FaceInfoRecT1_EncodingType
49
PS_PrivateCID_FaceInfoPS_Dict_Keys
50
T1_PrivateCID_InfoFT_Get_PS_Font_Value
51


52
 
53
54

This section contains the definition of Type 1-specific tables, including structures related to other PostScript font formats.

55

56
57

PS_FontInfoRec

58
59
Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
60

61
62
 
63
  typedef struct  PS_FontInfoRec_
64
  {
65
    FT_String*  version;
66
    FT_String*  notice;
67
    FT_String*  full_name;
68
    FT_String*  family_name;
69
    FT_String*  weight;
70
    FT_Long     italic_angle;
71
    FT_Bool     is_fixed_pitch;
72
    FT_Short    underline_position;
73
    FT_UShort   underline_thickness;
74
 
75
  } PS_FontInfoRec;
76
 
77

78
79

A structure used to model a Type 1 or Type 2 FontInfo dictionary. Note that for Multiple Master fonts, each instance has its own FontInfo dictionary.

80

81
82

83
[Index]
84
85
[TOC]
86
 
87
88

PS_FontInfo

89
90
Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
91

92
93
 
94
  typedef struct PS_FontInfoRec_*  PS_FontInfo;
95
 
96

97
98

A handle to a PS_FontInfoRec structure.

99

100
101

102
[Index]
103
104
[TOC]
105
 
106
107

T1_FontInfo

108
109
Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
110

111
112
 
113
  typedef PS_FontInfoRec  T1_FontInfo;
114
 
115

116
117

This type is equivalent to PS_FontInfoRec. It is deprecated but kept to maintain source compatibility between various versions of FreeType.

118

119
120

121
[Index]
122
123
[TOC]
124
 
125
126

PS_PrivateRec

127
128
Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
129

130
131
 
132
  typedef struct  PS_PrivateRec_
133
  {
134
    FT_Int     unique_id;
135
    FT_Int     lenIV;
136
 
137
    FT_Byte    num_blue_values;
138
    FT_Byte    num_other_blues;
139
    FT_Byte    num_family_blues;
140
    FT_Byte    num_family_other_blues;
141
 
142
    FT_Short   blue_values[14];
143
    FT_Short   other_blues[10];
144
 
145
    FT_Short   family_blues      [14];
146
    FT_Short   family_other_blues[10];
147
 
148
    FT_Fixed   blue_scale;
149
    FT_Int     blue_shift;
150
    FT_Int     blue_fuzz;
151
 
152
    FT_UShort  standard_width[1];
153
    FT_UShort  standard_height[1];
154
 
155
    FT_Byte    num_snap_widths;
156
    FT_Byte    num_snap_heights;
157
    FT_Bool    force_bold;
158
    FT_Bool    round_stem_up;
159
 
160
    FT_Short   snap_widths [13];  /* including std width  */
161
    FT_Short   snap_heights[13];  /* including std height */
162
 
163
    FT_Fixed   expansion_factor;
164
 
165
    FT_Long    language_group;
166
    FT_Long    password;
167
 
168
    FT_Short   min_feature[2];
169
 
170
  } PS_PrivateRec;
171
 
172

173
174

A structure used to model a Type 1 or Type 2 private dictionary. Note that for Multiple Master fonts, each instance has its own Private dictionary.

175

176
177

178
[Index]
179
180
[TOC]
181
 
182
183

PS_Private

184
185
Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
186

187
188
 
189
  typedef struct PS_PrivateRec_*  PS_Private;
190
 
191

192
193

A handle to a PS_PrivateRec structure.

194

195
196

197
[Index]
198
199
[TOC]
200
 
201
202

T1_Private

203
204
Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
205

206
207
 
208
  typedef PS_PrivateRec  T1_Private;
209
 
210

211
212

This type is equivalent to PS_PrivateRec. It is deprecated but kept to maintain source compatibility between various versions of FreeType.

213

214
215

216
[Index]
217
218
[TOC]
219
 
220
221

T1_Blend_Flags

222
223
Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
224

225
226
 
227
  typedef enum  T1_Blend_Flags_
228
  {
229
    /*# required fields in a FontInfo blend dictionary */
230
    T1_BLEND_UNDERLINE_POSITION = 0,
231
    T1_BLEND_UNDERLINE_THICKNESS,
232
    T1_BLEND_ITALIC_ANGLE,
233
 
234
    /*# required fields in a Private blend dictionary */
235
    T1_BLEND_BLUE_VALUES,
236
    T1_BLEND_OTHER_BLUES,
237
    T1_BLEND_STANDARD_WIDTH,
238
    T1_BLEND_STANDARD_HEIGHT,
239
    T1_BLEND_STEM_SNAP_WIDTHS,
240
    T1_BLEND_STEM_SNAP_HEIGHTS,
241
    T1_BLEND_BLUE_SCALE,
242
    T1_BLEND_BLUE_SHIFT,
243
    T1_BLEND_FAMILY_BLUES,
244
    T1_BLEND_FAMILY_OTHER_BLUES,
245
    T1_BLEND_FORCE_BOLD,
246
 
247
    /*# never remove */
248
    T1_BLEND_MAX
249
 
250
  } T1_Blend_Flags;
251
 
252

253
254

A set of flags used to indicate which fields are present in a given blend dictionary (font info or private). Used to support Multiple Masters fonts.

255

256
257

258
[Index]
259
260
[TOC]
261
 
262
263

CID_FaceDictRec

264
265
Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
266

267
268
 
269
  typedef struct  CID_FaceDictRec_
270
  {
271
    PS_PrivateRec  private_dict;
272
 
273
    FT_UInt        len_buildchar;
274
    FT_Fixed       forcebold_threshold;
275
    FT_Pos         stroke_width;
276
    FT_Fixed       expansion_factor;
277
 
278
    FT_Byte        paint_type;
279
    FT_Byte        font_type;
280
    FT_Matrix      font_matrix;
281
    FT_Vector      font_offset;
282
 
283
    FT_UInt        num_subrs;
284
    FT_ULong       subrmap_offset;
285
    FT_Int         sd_bytes;
286
 
287
  } CID_FaceDictRec;
288
 
289

290
291

A structure used to represent data in a CID top-level dictionary.

292

293
294

295
[Index]
296
297
[TOC]
298
 
299
300

CID_FaceDict

301
302
Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
303

304
305
 
306
  typedef struct CID_FaceDictRec_*  CID_FaceDict;
307
 
308

309
310

A handle to a CID_FaceDictRec structure.

311

312
313

314
[Index]
315
316
[TOC]
317
 
318
319

CID_FaceInfoRec

320
321
Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
322

323
324
 
325
  typedef struct  CID_FaceInfoRec_
326
  {
327
    FT_String*      cid_font_name;
328
    FT_Fixed        cid_version;
329
    FT_Int          cid_font_type;
330
 
331
    FT_String*      registry;
332
    FT_String*      ordering;
333
    FT_Int          supplement;
334
 
335
    PS_FontInfoRec  font_info;
336
    FT_BBox         font_bbox;
337
    FT_ULong        uid_base;
338
 
339
    FT_Int          num_xuid;
340
    FT_ULong        xuid[16];
341
 
342
    FT_ULong        cidmap_offset;
343
    FT_Int          fd_bytes;
344
    FT_Int          gd_bytes;
345
    FT_ULong        cid_count;
346
 
347
    FT_Int          num_dicts;
348
    CID_FaceDict    font_dicts;
349
 
350
    FT_ULong        data_offset;
351
 
352
  } CID_FaceInfoRec;
353
 
354

355
356

A structure used to represent CID Face information.

357

358
359

360
[Index]
361
362
[TOC]
363
 
364
365

CID_FaceInfo

366
367
Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
368

369
370
 
371
  typedef struct CID_FaceInfoRec_*  CID_FaceInfo;
372
 
373

374
375

A handle to a CID_FaceInfoRec structure.

376

377
378

379
[Index]
380
381
[TOC]
382
 
383
384

CID_Info

385
386
Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
387

388
389
 
390
  typedef CID_FaceInfoRec  CID_Info;
391
 
392

393
394

This type is equivalent to CID_FaceInfoRec. It is deprecated but kept to maintain source compatibility between various versions of FreeType.

395

396
397

398
[Index]
399
400
[TOC]
401
 
402
403

FT_Has_PS_Glyph_Names

404
405
Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
406

407
408
 
409
  FT_EXPORT( FT_Int )
410
  FT_Has_PS_Glyph_Names( FT_Face  face );
411
 
412

413
414

Return true if a given face provides reliable PostScript glyph names. This is similar to using the FT_HAS_GLYPH_NAMES macro, except that certain fonts (mostly TrueType) contain incorrect glyph name tables.

415

When this function returns true, the caller is sure that the glyph names returned by FT_Get_Glyph_Name are reliable.

416

417
input
418

419
420
face
421

face handle

422
423
424
425
return
426

Boolean. True if glyph names are reliable.

427
428
429

430
[Index]
431
432
[TOC]
433
 
434
435

FT_Get_PS_Font_Info

436
437
Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
438

439
440
 
441
  FT_EXPORT( FT_Error )
442
  FT_Get_PS_Font_Info( FT_Face      face,
443
                       PS_FontInfo  afont_info );
444
 
445

446
447

Retrieve the PS_FontInfoRec structure corresponding to a given PostScript font.

448

449
input
450

451
452
face
453

PostScript face handle.

454
455
456
457
output
458

459
460
afont_info
461

Output font info structure pointer.

462
463
464
465
return
466

FreeType error code. 0 means success.

467
468
note
469

The string pointers within the font info structure are owned by the face and don't need to be freed by the caller.

470

If the font's format is not PostScript-based, this function will return the ‘FT_Err_Invalid_Argument’ error code.

471
472
473

474
[Index]
475
476
[TOC]
477
 
478
479

FT_Get_PS_Font_Private

480
481
Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
482

483
484
 
485
  FT_EXPORT( FT_Error )
486
  FT_Get_PS_Font_Private( FT_Face     face,
487
                          PS_Private  afont_private );
488
 
489

490
491

Retrieve the PS_PrivateRec structure corresponding to a given PostScript font.

492

493
input
494

495
496
face
497

PostScript face handle.

498
499
500
501
output
502

503
504
afont_private
505

Output private dictionary structure pointer.

506
507
508
509
return
510

FreeType error code. 0 means success.

511
512
note
513

The string pointers within the PS_PrivateRec structure are owned by the face and don't need to be freed by the caller.

514

If the font's format is not PostScript-based, this function returns the ‘FT_Err_Invalid_Argument’ error code.

515
516
517

518
[Index]
519
520
[TOC]
521
 
522
523

T1_EncodingType

524
525
Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
526

527
528
 
529
  typedef enum  T1_EncodingType_
530
  {
531
    T1_ENCODING_TYPE_NONE = 0,
532
    T1_ENCODING_TYPE_ARRAY,
533
    T1_ENCODING_TYPE_STANDARD,
534
    T1_ENCODING_TYPE_ISOLATIN1,
535
    T1_ENCODING_TYPE_EXPERT
536
 
537
  } T1_EncodingType;
538
 
539

540
541

An enumeration describing the ‘Encoding’ entry in a Type 1 dictionary.

542

543
544

545
[Index]
546
547
[TOC]
548
 
549
550

PS_Dict_Keys

551
552
Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
553

554
555
 
556
  typedef enum  PS_Dict_Keys_
557
  {
558
    /* conventionally in the font dictionary */
559
    PS_DICT_FONT_TYPE,              /* FT_Byte         */
560
    PS_DICT_FONT_MATRIX,            /* FT_Fixed        */
561
    PS_DICT_FONT_BBOX,              /* FT_Fixed        */
562
    PS_DICT_PAINT_TYPE,             /* FT_Byte         */
563
    PS_DICT_FONT_NAME,              /* FT_String*      */
564
    PS_DICT_UNIQUE_ID,              /* FT_Int          */
565
    PS_DICT_NUM_CHAR_STRINGS,       /* FT_Int          */
566
    PS_DICT_CHAR_STRING_KEY,        /* FT_String*      */
567
    PS_DICT_CHAR_STRING,            /* FT_String*      */
568
    PS_DICT_ENCODING_TYPE,          /* T1_EncodingType */
569
    PS_DICT_ENCODING_ENTRY,         /* FT_String*      */
570
 
571
    /* conventionally in the font Private dictionary */
572
    PS_DICT_NUM_SUBRS,              /* FT_Int     */
573
    PS_DICT_SUBR,                   /* FT_String* */
574
    PS_DICT_STD_HW,                 /* FT_UShort  */
575
    PS_DICT_STD_VW,                 /* FT_UShort  */
576
    PS_DICT_NUM_BLUE_VALUES,        /* FT_Byte    */
577
    PS_DICT_BLUE_VALUE,             /* FT_Short   */
578
    PS_DICT_BLUE_FUZZ,              /* FT_Int     */
579
    PS_DICT_NUM_OTHER_BLUES,        /* FT_Byte    */
580
    PS_DICT_OTHER_BLUE,             /* FT_Short   */
581
    PS_DICT_NUM_FAMILY_BLUES,       /* FT_Byte    */
582
    PS_DICT_FAMILY_BLUE,            /* FT_Short   */
583
    PS_DICT_NUM_FAMILY_OTHER_BLUES, /* FT_Byte    */
584
    PS_DICT_FAMILY_OTHER_BLUE,      /* FT_Short   */
585
    PS_DICT_BLUE_SCALE,             /* FT_Fixed   */
586
    PS_DICT_BLUE_SHIFT,             /* FT_Int     */
587
    PS_DICT_NUM_STEM_SNAP_H,        /* FT_Byte    */
588
    PS_DICT_STEM_SNAP_H,            /* FT_Short   */
589
    PS_DICT_NUM_STEM_SNAP_V,        /* FT_Byte    */
590
    PS_DICT_STEM_SNAP_V,            /* FT_Short   */
591
    PS_DICT_FORCE_BOLD,             /* FT_Bool    */
592
    PS_DICT_RND_STEM_UP,            /* FT_Bool    */
593
    PS_DICT_MIN_FEATURE,            /* FT_Short   */
594
    PS_DICT_LEN_IV,                 /* FT_Int     */
595
    PS_DICT_PASSWORD,               /* FT_Long    */
596
    PS_DICT_LANGUAGE_GROUP,         /* FT_Long    */
597
 
598
    /* conventionally in the font FontInfo dictionary */
599
    PS_DICT_VERSION,                /* FT_String* */
600
    PS_DICT_NOTICE,                 /* FT_String* */
601
    PS_DICT_FULL_NAME,              /* FT_String* */
602
    PS_DICT_FAMILY_NAME,            /* FT_String* */
603
    PS_DICT_WEIGHT,                 /* FT_String* */
604
    PS_DICT_IS_FIXED_PITCH,         /* FT_Bool    */
605
    PS_DICT_UNDERLINE_POSITION,     /* FT_Short   */
606
    PS_DICT_UNDERLINE_THICKNESS,    /* FT_UShort  */
607
    PS_DICT_FS_TYPE,                /* FT_UShort  */
608
    PS_DICT_ITALIC_ANGLE,           /* FT_Long    */
609
 
610
    PS_DICT_MAX = PS_DICT_ITALIC_ANGLE
611
 
612
  } PS_Dict_Keys;
613
 
614

615
616

An enumeration used in calls to FT_Get_PS_Font_Value to identify the Type 1 dictionary entry to retrieve.

617

618
619

620
[Index]
621
622
[TOC]
623
 
624
625

FT_Get_PS_Font_Value

626
627
Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
628

629
630
 
631
  FT_EXPORT( FT_Long )
632
  FT_Get_PS_Font_Value( FT_Face       face,
633
                        PS_Dict_Keys  key,
634
                        FT_UInt       idx,
635
                        void         *value,
636
                        FT_Long       value_len );
637
 
638

639
640

Retrieve the value for the supplied key from a PostScript font.

641

642
input
643

644
645
face
646

PostScript face handle.

647
648
key
649

An enumeration value representing the dictionary key to retrieve.

650
651
idx
652

For array values, this specifies the index to be returned.

653
654
value
655

A pointer to memory into which to write the value.

656
657
valen_len
658

The size, in bytes, of the memory supplied for the value.

659
660
661
662
output
663

664
665
value
666

The value matching the above key, if it exists.

667
668
669
670
return
671

The amount of memory (in bytes) required to hold the requested value (if it exists, -1 otherwise).

672
673
note
674

The values returned are not pointers into the internal structures of the face, but are ‘fresh’ copies, so that the memory containing them belongs to the calling application. This also enforces the ‘read-only’ nature of these values, i.e., this function cannot be used to manipulate the face.

675

‘value’ is a void pointer because the values returned can be of various types.

676

If either ‘value’ is NULL or ‘value_len’ is too small, just the required memory size for the requested entry is returned.

677

The ‘idx’ parameter is used, not only to retrieve elements of, for example, the FontMatrix or FontBBox, but also to retrieve name keys from the CharStrings dictionary, and the charstrings themselves. It is ignored for atomic values.

678

PS_DICT_BLUE_SCALE returns a value that is scaled up by 1000. To get the value as in the font stream, you need to divide by 65536000.0 (to remove the FT_Fixed scale, and the x1000 scale).

679

IMPORTANT: Only key/value pairs read by the FreeType interpreter can be retrieved. So, for example, PostScript procedures such as NP, ND, and RD are not available. Arbitrary keys are, obviously, not be available either.

680

If the font's format is not PostScript-based, this function returns the ‘FT_Err_Invalid_Argument’ error code.

681
682
683

684
[Index]
685
686
[TOC]
687
 
688
689