1/****************************************************************************
2 *
3 * t1tables.h
4 *
5 * Basic Type 1/Type 2 tables definitions and interface (specification
6 * only).
7 *
8 * Copyright (C) 1996-2021 by
9 * David Turner, Robert Wilhelm, and Werner Lemberg.
10 *
11 * This file is part of the FreeType project, and may only be used,
12 * modified, and distributed under the terms of the FreeType project
13 * license, LICENSE.TXT. By continuing to use, modify, or distribute
14 * this file you indicate that you have read the license and
15 * understand and accept it fully.
16 *
17 */
18
19
20#ifndef T1TABLES_H_
21#define T1TABLES_H_
22
23
24#include <freetype/freetype.h>
25
26#ifdef FREETYPE_H
27#error "freetype.h of FreeType 1 has been loaded!"
28#error "Please fix the directory search order for header files"
29#error "so that freetype.h of FreeType 2 is found first."
30#endif
31
32
33FT_BEGIN_HEADER
34
35
36 /**************************************************************************
37 *
38 * @section:
39 * type1_tables
40 *
41 * @title:
42 * Type 1 Tables
43 *
44 * @abstract:
45 * Type~1-specific font tables.
46 *
47 * @description:
48 * This section contains the definition of Type~1-specific tables,
49 * including structures related to other PostScript font formats.
50 *
51 * @order:
52 * PS_FontInfoRec
53 * PS_FontInfo
54 * PS_PrivateRec
55 * PS_Private
56 *
57 * CID_FaceDictRec
58 * CID_FaceDict
59 * CID_FaceInfoRec
60 * CID_FaceInfo
61 *
62 * FT_Has_PS_Glyph_Names
63 * FT_Get_PS_Font_Info
64 * FT_Get_PS_Font_Private
65 * FT_Get_PS_Font_Value
66 *
67 * T1_Blend_Flags
68 * T1_EncodingType
69 * PS_Dict_Keys
70 *
71 */
72
73
74 /* Note that we separate font data in PS_FontInfoRec and PS_PrivateRec */
75 /* structures in order to support Multiple Master fonts. */
76
77
78 /**************************************************************************
79 *
80 * @struct:
81 * PS_FontInfoRec
82 *
83 * @description:
84 * A structure used to model a Type~1 or Type~2 FontInfo dictionary.
85 * Note that for Multiple Master fonts, each instance has its own
86 * FontInfo dictionary.
87 */
88 typedef struct PS_FontInfoRec_
89 {
90 FT_String* version;
91 FT_String* notice;
92 FT_String* full_name;
93 FT_String* family_name;
94 FT_String* weight;
95 FT_Long italic_angle;
96 FT_Bool is_fixed_pitch;
97 FT_Short underline_position;
98 FT_UShort underline_thickness;
99
100 } PS_FontInfoRec;
101
102
103 /**************************************************************************
104 *
105 * @struct:
106 * PS_FontInfo
107 *
108 * @description:
109 * A handle to a @PS_FontInfoRec structure.
110 */
111 typedef struct PS_FontInfoRec_* PS_FontInfo;
112
113
114 /**************************************************************************
115 *
116 * @struct:
117 * T1_FontInfo
118 *
119 * @description:
120 * This type is equivalent to @PS_FontInfoRec. It is deprecated but kept
121 * to maintain source compatibility between various versions of FreeType.
122 */
123 typedef PS_FontInfoRec T1_FontInfo;
124
125
126 /**************************************************************************
127 *
128 * @struct:
129 * PS_PrivateRec
130 *
131 * @description:
132 * A structure used to model a Type~1 or Type~2 private dictionary. Note
133 * that for Multiple Master fonts, each instance has its own Private
134 * dictionary.
135 */
136 typedef struct PS_PrivateRec_
137 {
138 FT_Int unique_id;
139 FT_Int lenIV;
140
141 FT_Byte num_blue_values;
142 FT_Byte num_other_blues;
143 FT_Byte num_family_blues;
144 FT_Byte num_family_other_blues;
145
146 FT_Short blue_values[14];
147 FT_Short other_blues[10];
148
149 FT_Short family_blues [14];
150 FT_Short family_other_blues[10];
151
152 FT_Fixed blue_scale;
153 FT_Int blue_shift;
154 FT_Int blue_fuzz;
155
156 FT_UShort standard_width[1];
157 FT_UShort standard_height[1];
158
159 FT_Byte num_snap_widths;
160 FT_Byte num_snap_heights;
161 FT_Bool force_bold;
162 FT_Bool round_stem_up;
163
164 FT_Short snap_widths [13]; /* including std width */
165 FT_Short snap_heights[13]; /* including std height */
166
167 FT_Fixed expansion_factor;
168
169 FT_Long language_group;
170 FT_Long password;
171
172 FT_Short min_feature[2];
173
174 } PS_PrivateRec;
175
176
177 /**************************************************************************
178 *
179 * @struct:
180 * PS_Private
181 *
182 * @description:
183 * A handle to a @PS_PrivateRec structure.
184 */
185 typedef struct PS_PrivateRec_* PS_Private;
186
187
188 /**************************************************************************
189 *
190 * @struct:
191 * T1_Private
192 *
193 * @description:
194 * This type is equivalent to @PS_PrivateRec. It is deprecated but kept
195 * to maintain source compatibility between various versions of FreeType.
196 */
197 typedef PS_PrivateRec T1_Private;
198
199
200 /**************************************************************************
201 *
202 * @enum:
203 * T1_Blend_Flags
204 *
205 * @description:
206 * A set of flags used to indicate which fields are present in a given
207 * blend dictionary (font info or private). Used to support Multiple
208 * Masters fonts.
209 *
210 * @values:
211 * T1_BLEND_UNDERLINE_POSITION ::
212 * T1_BLEND_UNDERLINE_THICKNESS ::
213 * T1_BLEND_ITALIC_ANGLE ::
214 * T1_BLEND_BLUE_VALUES ::
215 * T1_BLEND_OTHER_BLUES ::
216 * T1_BLEND_STANDARD_WIDTH ::
217 * T1_BLEND_STANDARD_HEIGHT ::
218 * T1_BLEND_STEM_SNAP_WIDTHS ::
219 * T1_BLEND_STEM_SNAP_HEIGHTS ::
220 * T1_BLEND_BLUE_SCALE ::
221 * T1_BLEND_BLUE_SHIFT ::
222 * T1_BLEND_FAMILY_BLUES ::
223 * T1_BLEND_FAMILY_OTHER_BLUES ::
224 * T1_BLEND_FORCE_BOLD ::
225 */
226 typedef enum T1_Blend_Flags_
227 {
228 /* required fields in a FontInfo blend dictionary */
229 T1_BLEND_UNDERLINE_POSITION = 0,
230 T1_BLEND_UNDERLINE_THICKNESS,
231 T1_BLEND_ITALIC_ANGLE,
232
233 /* required fields in a Private blend dictionary */
234 T1_BLEND_BLUE_VALUES,
235 T1_BLEND_OTHER_BLUES,
236 T1_BLEND_STANDARD_WIDTH,
237 T1_BLEND_STANDARD_HEIGHT,
238 T1_BLEND_STEM_SNAP_WIDTHS,
239 T1_BLEND_STEM_SNAP_HEIGHTS,
240 T1_BLEND_BLUE_SCALE,
241 T1_BLEND_BLUE_SHIFT,
242 T1_BLEND_FAMILY_BLUES,
243 T1_BLEND_FAMILY_OTHER_BLUES,
244 T1_BLEND_FORCE_BOLD,
245
246 T1_BLEND_MAX /* do not remove */
247
248 } T1_Blend_Flags;
249
250
251 /* these constants are deprecated; use the corresponding */
252 /* `T1_Blend_Flags` values instead */
253#define t1_blend_underline_position T1_BLEND_UNDERLINE_POSITION
254#define t1_blend_underline_thickness T1_BLEND_UNDERLINE_THICKNESS
255#define t1_blend_italic_angle T1_BLEND_ITALIC_ANGLE
256#define t1_blend_blue_values T1_BLEND_BLUE_VALUES
257#define t1_blend_other_blues T1_BLEND_OTHER_BLUES
258#define t1_blend_standard_widths T1_BLEND_STANDARD_WIDTH
259#define t1_blend_standard_height T1_BLEND_STANDARD_HEIGHT
260#define t1_blend_stem_snap_widths T1_BLEND_STEM_SNAP_WIDTHS
261#define t1_blend_stem_snap_heights T1_BLEND_STEM_SNAP_HEIGHTS
262#define t1_blend_blue_scale T1_BLEND_BLUE_SCALE
263#define t1_blend_blue_shift T1_BLEND_BLUE_SHIFT
264#define t1_blend_family_blues T1_BLEND_FAMILY_BLUES
265#define t1_blend_family_other_blues T1_BLEND_FAMILY_OTHER_BLUES
266#define t1_blend_force_bold T1_BLEND_FORCE_BOLD
267#define t1_blend_max T1_BLEND_MAX
268
269 /* */
270
271
272 /* maximum number of Multiple Masters designs, as defined in the spec */
273#define T1_MAX_MM_DESIGNS 16
274
275 /* maximum number of Multiple Masters axes, as defined in the spec */
276#define T1_MAX_MM_AXIS 4
277
278 /* maximum number of elements in a design map */
279#define T1_MAX_MM_MAP_POINTS 20
280
281
282 /* this structure is used to store the BlendDesignMap entry for an axis */
283 typedef struct PS_DesignMap_
284 {
285 FT_Byte num_points;
286 FT_Long* design_points;
287 FT_Fixed* blend_points;
288
289 } PS_DesignMapRec, *PS_DesignMap;
290
291 /* backward compatible definition */
292 typedef PS_DesignMapRec T1_DesignMap;
293
294
295 typedef struct PS_BlendRec_
296 {
297 FT_UInt num_designs;
298 FT_UInt num_axis;
299
300 FT_String* axis_names[T1_MAX_MM_AXIS];
301 FT_Fixed* design_pos[T1_MAX_MM_DESIGNS];
302 PS_DesignMapRec design_map[T1_MAX_MM_AXIS];
303
304 FT_Fixed* weight_vector;
305 FT_Fixed* default_weight_vector;
306
307 PS_FontInfo font_infos[T1_MAX_MM_DESIGNS + 1];
308 PS_Private privates [T1_MAX_MM_DESIGNS + 1];
309
310 FT_ULong blend_bitflags;
311
312 FT_BBox* bboxes [T1_MAX_MM_DESIGNS + 1];
313
314 /* since 2.3.0 */
315
316 /* undocumented, optional: the default design instance; */
317 /* corresponds to default_weight_vector -- */
318 /* num_default_design_vector == 0 means it is not present */
319 /* in the font and associated metrics files */
320 FT_UInt default_design_vector[T1_MAX_MM_DESIGNS];
321 FT_UInt num_default_design_vector;
322
323 } PS_BlendRec, *PS_Blend;
324
325
326 /* backward compatible definition */
327 typedef PS_BlendRec T1_Blend;
328
329
330 /**************************************************************************
331 *
332 * @struct:
333 * CID_FaceDictRec
334 *
335 * @description:
336 * A structure used to represent data in a CID top-level dictionary. In
337 * most cases, they are part of the font's '/FDArray' array. Within a
338 * CID font file, such (internal) subfont dictionaries are enclosed by
339 * '%ADOBeginFontDict' and '%ADOEndFontDict' comments.
340 *
341 * Note that `CID_FaceDictRec` misses a field for the '/FontName'
342 * keyword, specifying the subfont's name (the top-level font name is
343 * given by the '/CIDFontName' keyword). This is an oversight, but it
344 * doesn't limit the 'cid' font module's functionality because FreeType
345 * neither needs this entry nor gives access to CID subfonts.
346 */
347 typedef struct CID_FaceDictRec_
348 {
349 PS_PrivateRec private_dict;
350
351 FT_UInt len_buildchar;
352 FT_Fixed forcebold_threshold;
353 FT_Pos stroke_width;
354 FT_Fixed expansion_factor; /* this is a duplicate of */
355 /* `private_dict->expansion_factor' */
356 FT_Byte paint_type;
357 FT_Byte font_type;
358 FT_Matrix font_matrix;
359 FT_Vector font_offset;
360
361 FT_UInt num_subrs;
362 FT_ULong subrmap_offset;
363 FT_UInt sd_bytes;
364
365 } CID_FaceDictRec;
366
367
368 /**************************************************************************
369 *
370 * @struct:
371 * CID_FaceDict
372 *
373 * @description:
374 * A handle to a @CID_FaceDictRec structure.
375 */
376 typedef struct CID_FaceDictRec_* CID_FaceDict;
377
378
379 /**************************************************************************
380 *
381 * @struct:
382 * CID_FontDict
383 *
384 * @description:
385 * This type is equivalent to @CID_FaceDictRec. It is deprecated but
386 * kept to maintain source compatibility between various versions of
387 * FreeType.
388 */
389 typedef CID_FaceDictRec CID_FontDict;
390
391
392 /**************************************************************************
393 *
394 * @struct:
395 * CID_FaceInfoRec
396 *
397 * @description:
398 * A structure used to represent CID Face information.
399 */
400 typedef struct CID_FaceInfoRec_
401 {
402 FT_String* cid_font_name;
403 FT_Fixed cid_version;
404 FT_Int cid_font_type;
405
406 FT_String* registry;
407 FT_String* ordering;
408 FT_Int supplement;
409
410 PS_FontInfoRec font_info;
411 FT_BBox font_bbox;
412 FT_ULong uid_base;
413
414 FT_Int num_xuid;
415 FT_ULong xuid[16];
416
417 FT_ULong cidmap_offset;
418 FT_UInt fd_bytes;
419 FT_UInt gd_bytes;
420 FT_ULong cid_count;
421
422 FT_UInt num_dicts;
423 CID_FaceDict font_dicts;
424
425 FT_ULong data_offset;
426
427 } CID_FaceInfoRec;
428
429
430 /**************************************************************************
431 *
432 * @struct:
433 * CID_FaceInfo
434 *
435 * @description:
436 * A handle to a @CID_FaceInfoRec structure.
437 */
438 typedef struct CID_FaceInfoRec_* CID_FaceInfo;
439
440
441 /**************************************************************************
442 *
443 * @struct:
444 * CID_Info
445 *
446 * @description:
447 * This type is equivalent to @CID_FaceInfoRec. It is deprecated but kept
448 * to maintain source compatibility between various versions of FreeType.
449 */
450 typedef CID_FaceInfoRec CID_Info;
451
452
453 /**************************************************************************
454 *
455 * @function:
456 * FT_Has_PS_Glyph_Names
457 *
458 * @description:
459 * Return true if a given face provides reliable PostScript glyph names.
460 * This is similar to using the @FT_HAS_GLYPH_NAMES macro, except that
461 * certain fonts (mostly TrueType) contain incorrect glyph name tables.
462 *
463 * When this function returns true, the caller is sure that the glyph
464 * names returned by @FT_Get_Glyph_Name are reliable.
465 *
466 * @input:
467 * face ::
468 * face handle
469 *
470 * @return:
471 * Boolean. True if glyph names are reliable.
472 *
473 */
474 FT_EXPORT( FT_Int )
475 FT_Has_PS_Glyph_Names( FT_Face face );
476
477
478 /**************************************************************************
479 *
480 * @function:
481 * FT_Get_PS_Font_Info
482 *
483 * @description:
484 * Retrieve the @PS_FontInfoRec structure corresponding to a given
485 * PostScript font.
486 *
487 * @input:
488 * face ::
489 * PostScript face handle.
490 *
491 * @output:
492 * afont_info ::
493 * Output font info structure pointer.
494 *
495 * @return:
496 * FreeType error code. 0~means success.
497 *
498 * @note:
499 * String pointers within the @PS_FontInfoRec structure are owned by the
500 * face and don't need to be freed by the caller. Missing entries in
501 * the font's FontInfo dictionary are represented by `NULL` pointers.
502 *
503 * If the font's format is not PostScript-based, this function will
504 * return the `FT_Err_Invalid_Argument` error code.
505 *
506 */
507 FT_EXPORT( FT_Error )
508 FT_Get_PS_Font_Info( FT_Face face,
509 PS_FontInfo afont_info );
510
511
512 /**************************************************************************
513 *
514 * @function:
515 * FT_Get_PS_Font_Private
516 *
517 * @description:
518 * Retrieve the @PS_PrivateRec structure corresponding to a given
519 * PostScript font.
520 *
521 * @input:
522 * face ::
523 * PostScript face handle.
524 *
525 * @output:
526 * afont_private ::
527 * Output private dictionary structure pointer.
528 *
529 * @return:
530 * FreeType error code. 0~means success.
531 *
532 * @note:
533 * The string pointers within the @PS_PrivateRec structure are owned by
534 * the face and don't need to be freed by the caller.
535 *
536 * If the font's format is not PostScript-based, this function returns
537 * the `FT_Err_Invalid_Argument` error code.
538 *
539 */
540 FT_EXPORT( FT_Error )
541 FT_Get_PS_Font_Private( FT_Face face,
542 PS_Private afont_private );
543
544
545 /**************************************************************************
546 *
547 * @enum:
548 * T1_EncodingType
549 *
550 * @description:
551 * An enumeration describing the 'Encoding' entry in a Type 1 dictionary.
552 *
553 * @values:
554 * T1_ENCODING_TYPE_NONE ::
555 * T1_ENCODING_TYPE_ARRAY ::
556 * T1_ENCODING_TYPE_STANDARD ::
557 * T1_ENCODING_TYPE_ISOLATIN1 ::
558 * T1_ENCODING_TYPE_EXPERT ::
559 *
560 * @since:
561 * 2.4.8
562 */
563 typedef enum T1_EncodingType_
564 {
565 T1_ENCODING_TYPE_NONE = 0,
566 T1_ENCODING_TYPE_ARRAY,
567 T1_ENCODING_TYPE_STANDARD,
568 T1_ENCODING_TYPE_ISOLATIN1,
569 T1_ENCODING_TYPE_EXPERT
570
571 } T1_EncodingType;
572
573
574 /**************************************************************************
575 *
576 * @enum:
577 * PS_Dict_Keys
578 *
579 * @description:
580 * An enumeration used in calls to @FT_Get_PS_Font_Value to identify the
581 * Type~1 dictionary entry to retrieve.
582 *
583 * @values:
584 * PS_DICT_FONT_TYPE ::
585 * PS_DICT_FONT_MATRIX ::
586 * PS_DICT_FONT_BBOX ::
587 * PS_DICT_PAINT_TYPE ::
588 * PS_DICT_FONT_NAME ::
589 * PS_DICT_UNIQUE_ID ::
590 * PS_DICT_NUM_CHAR_STRINGS ::
591 * PS_DICT_CHAR_STRING_KEY ::
592 * PS_DICT_CHAR_STRING ::
593 * PS_DICT_ENCODING_TYPE ::
594 * PS_DICT_ENCODING_ENTRY ::
595 * PS_DICT_NUM_SUBRS ::
596 * PS_DICT_SUBR ::
597 * PS_DICT_STD_HW ::
598 * PS_DICT_STD_VW ::
599 * PS_DICT_NUM_BLUE_VALUES ::
600 * PS_DICT_BLUE_VALUE ::
601 * PS_DICT_BLUE_FUZZ ::
602 * PS_DICT_NUM_OTHER_BLUES ::
603 * PS_DICT_OTHER_BLUE ::
604 * PS_DICT_NUM_FAMILY_BLUES ::
605 * PS_DICT_FAMILY_BLUE ::
606 * PS_DICT_NUM_FAMILY_OTHER_BLUES ::
607 * PS_DICT_FAMILY_OTHER_BLUE ::
608 * PS_DICT_BLUE_SCALE ::
609 * PS_DICT_BLUE_SHIFT ::
610 * PS_DICT_NUM_STEM_SNAP_H ::
611 * PS_DICT_STEM_SNAP_H ::
612 * PS_DICT_NUM_STEM_SNAP_V ::
613 * PS_DICT_STEM_SNAP_V ::
614 * PS_DICT_FORCE_BOLD ::
615 * PS_DICT_RND_STEM_UP ::
616 * PS_DICT_MIN_FEATURE ::
617 * PS_DICT_LEN_IV ::
618 * PS_DICT_PASSWORD ::
619 * PS_DICT_LANGUAGE_GROUP ::
620 * PS_DICT_VERSION ::
621 * PS_DICT_NOTICE ::
622 * PS_DICT_FULL_NAME ::
623 * PS_DICT_FAMILY_NAME ::
624 * PS_DICT_WEIGHT ::
625 * PS_DICT_IS_FIXED_PITCH ::
626 * PS_DICT_UNDERLINE_POSITION ::
627 * PS_DICT_UNDERLINE_THICKNESS ::
628 * PS_DICT_FS_TYPE ::
629 * PS_DICT_ITALIC_ANGLE ::
630 *
631 * @since:
632 * 2.4.8
633 */
634 typedef enum PS_Dict_Keys_
635 {
636 /* conventionally in the font dictionary */
637 PS_DICT_FONT_TYPE, /* FT_Byte */
638 PS_DICT_FONT_MATRIX, /* FT_Fixed */
639 PS_DICT_FONT_BBOX, /* FT_Fixed */
640 PS_DICT_PAINT_TYPE, /* FT_Byte */
641 PS_DICT_FONT_NAME, /* FT_String* */
642 PS_DICT_UNIQUE_ID, /* FT_Int */
643 PS_DICT_NUM_CHAR_STRINGS, /* FT_Int */
644 PS_DICT_CHAR_STRING_KEY, /* FT_String* */
645 PS_DICT_CHAR_STRING, /* FT_String* */
646 PS_DICT_ENCODING_TYPE, /* T1_EncodingType */
647 PS_DICT_ENCODING_ENTRY, /* FT_String* */
648
649 /* conventionally in the font Private dictionary */
650 PS_DICT_NUM_SUBRS, /* FT_Int */
651 PS_DICT_SUBR, /* FT_String* */
652 PS_DICT_STD_HW, /* FT_UShort */
653 PS_DICT_STD_VW, /* FT_UShort */
654 PS_DICT_NUM_BLUE_VALUES, /* FT_Byte */
655 PS_DICT_BLUE_VALUE, /* FT_Short */
656 PS_DICT_BLUE_FUZZ, /* FT_Int */
657 PS_DICT_NUM_OTHER_BLUES, /* FT_Byte */
658 PS_DICT_OTHER_BLUE, /* FT_Short */
659 PS_DICT_NUM_FAMILY_BLUES, /* FT_Byte */
660 PS_DICT_FAMILY_BLUE, /* FT_Short */
661 PS_DICT_NUM_FAMILY_OTHER_BLUES, /* FT_Byte */
662 PS_DICT_FAMILY_OTHER_BLUE, /* FT_Short */
663 PS_DICT_BLUE_SCALE, /* FT_Fixed */
664 PS_DICT_BLUE_SHIFT, /* FT_Int */
665 PS_DICT_NUM_STEM_SNAP_H, /* FT_Byte */
666 PS_DICT_STEM_SNAP_H, /* FT_Short */
667 PS_DICT_NUM_STEM_SNAP_V, /* FT_Byte */
668 PS_DICT_STEM_SNAP_V, /* FT_Short */
669 PS_DICT_FORCE_BOLD, /* FT_Bool */
670 PS_DICT_RND_STEM_UP, /* FT_Bool */
671 PS_DICT_MIN_FEATURE, /* FT_Short */
672 PS_DICT_LEN_IV, /* FT_Int */
673 PS_DICT_PASSWORD, /* FT_Long */
674 PS_DICT_LANGUAGE_GROUP, /* FT_Long */
675
676 /* conventionally in the font FontInfo dictionary */
677 PS_DICT_VERSION, /* FT_String* */
678 PS_DICT_NOTICE, /* FT_String* */
679 PS_DICT_FULL_NAME, /* FT_String* */
680 PS_DICT_FAMILY_NAME, /* FT_String* */
681 PS_DICT_WEIGHT, /* FT_String* */
682 PS_DICT_IS_FIXED_PITCH, /* FT_Bool */
683 PS_DICT_UNDERLINE_POSITION, /* FT_Short */
684 PS_DICT_UNDERLINE_THICKNESS, /* FT_UShort */
685 PS_DICT_FS_TYPE, /* FT_UShort */
686 PS_DICT_ITALIC_ANGLE, /* FT_Long */
687
688 PS_DICT_MAX = PS_DICT_ITALIC_ANGLE
689
690 } PS_Dict_Keys;
691
692
693 /**************************************************************************
694 *
695 * @function:
696 * FT_Get_PS_Font_Value
697 *
698 * @description:
699 * Retrieve the value for the supplied key from a PostScript font.
700 *
701 * @input:
702 * face ::
703 * PostScript face handle.
704 *
705 * key ::
706 * An enumeration value representing the dictionary key to retrieve.
707 *
708 * idx ::
709 * For array values, this specifies the index to be returned.
710 *
711 * value ::
712 * A pointer to memory into which to write the value.
713 *
714 * valen_len ::
715 * The size, in bytes, of the memory supplied for the value.
716 *
717 * @output:
718 * value ::
719 * The value matching the above key, if it exists.
720 *
721 * @return:
722 * The amount of memory (in bytes) required to hold the requested value
723 * (if it exists, -1 otherwise).
724 *
725 * @note:
726 * The values returned are not pointers into the internal structures of
727 * the face, but are 'fresh' copies, so that the memory containing them
728 * belongs to the calling application. This also enforces the
729 * 'read-only' nature of these values, i.e., this function cannot be
730 * used to manipulate the face.
731 *
732 * `value` is a void pointer because the values returned can be of
733 * various types.
734 *
735 * If either `value` is `NULL` or `value_len` is too small, just the
736 * required memory size for the requested entry is returned.
737 *
738 * The `idx` parameter is used, not only to retrieve elements of, for
739 * example, the FontMatrix or FontBBox, but also to retrieve name keys
740 * from the CharStrings dictionary, and the charstrings themselves. It
741 * is ignored for atomic values.
742 *
743 * `PS_DICT_BLUE_SCALE` returns a value that is scaled up by 1000. To
744 * get the value as in the font stream, you need to divide by 65536000.0
745 * (to remove the FT_Fixed scale, and the x1000 scale).
746 *
747 * IMPORTANT: Only key/value pairs read by the FreeType interpreter can
748 * be retrieved. So, for example, PostScript procedures such as NP, ND,
749 * and RD are not available. Arbitrary keys are, obviously, not be
750 * available either.
751 *
752 * If the font's format is not PostScript-based, this function returns
753 * the `FT_Err_Invalid_Argument` error code.
754 *
755 * @since:
756 * 2.4.8
757 *
758 */
759 FT_EXPORT( FT_Long )
760 FT_Get_PS_Font_Value( FT_Face face,
761 PS_Dict_Keys key,
762 FT_UInt idx,
763 void *value,
764 FT_Long value_len );
765
766 /* */
767
768FT_END_HEADER
769
770#endif /* T1TABLES_H_ */
771
772
773/* END */
774

source code of include/freetype2/freetype/t1tables.h