... |
... |
@@ -453,22 +453,22 @@ FT_BEGIN_HEADER |
453
|
453
|
/**************************************************************************
|
454
|
454
|
*
|
455
|
455
|
* @function:
|
456
|
|
- * FT_Has_PS_Glyph_Names
|
|
456
|
+ * FT_Has_PS_Glyph_Names
|
457
|
457
|
*
|
458
|
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.
|
|
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
|
462
|
*
|
463
|
|
- * When this function returns true, the caller is sure that the glyph
|
464
|
|
- * names returned by @FT_Get_Glyph_Name are reliable.
|
|
463
|
+ * When this function returns true, the caller is sure that the glyph
|
|
464
|
+ * names returned by @FT_Get_Glyph_Name are reliable.
|
465
|
465
|
*
|
466
|
466
|
* @input:
|
467
|
|
- * face ::
|
468
|
|
- * face handle
|
|
467
|
+ * face ::
|
|
468
|
+ * face handle
|
469
|
469
|
*
|
470
|
470
|
* @return:
|
471
|
|
- * Boolean. True if glyph names are reliable.
|
|
471
|
+ * Boolean. True if glyph names are reliable.
|
472
|
472
|
*
|
473
|
473
|
*/
|
474
|
474
|
FT_EXPORT( FT_Int )
|
... |
... |
@@ -478,30 +478,40 @@ FT_BEGIN_HEADER |
478
|
478
|
/**************************************************************************
|
479
|
479
|
*
|
480
|
480
|
* @function:
|
481
|
|
- * FT_Get_PS_Font_Info
|
|
481
|
+ * FT_Get_PS_Font_Info
|
482
|
482
|
*
|
483
|
483
|
* @description:
|
484
|
|
- * Retrieve the @PS_FontInfoRec structure corresponding to a given
|
485
|
|
- * PostScript font.
|
|
484
|
+ * Retrieve the @PS_FontInfoRec structure corresponding to a given
|
|
485
|
+ * PostScript font.
|
486
|
486
|
*
|
487
|
487
|
* @input:
|
488
|
|
- * face ::
|
489
|
|
- * PostScript face handle.
|
|
488
|
+ * face ::
|
|
489
|
+ * PostScript face handle.
|
490
|
490
|
*
|
491
|
491
|
* @output:
|
492
|
|
- * afont_info ::
|
493
|
|
- * Output font info structure pointer.
|
|
492
|
+ * afont_info ::
|
|
493
|
+ * A pointer to a @PS_FontInfoRec object.
|
494
|
494
|
*
|
495
|
495
|
* @return:
|
496
|
|
- * FreeType error code. 0~means success.
|
|
496
|
+ * FreeType error code. 0~means success.
|
497
|
497
|
*
|
498
|
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.
|
|
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 the
|
|
501
|
+ * font's FontInfo dictionary are represented by `NULL` pointers.
|
|
502
|
+ *
|
|
503
|
+ * The following font formats support this feature: 'Type~1', 'Type~42',
|
|
504
|
+ * 'CFF', 'CID~Type~1'. For other font formats this function returns the
|
|
505
|
+ * `FT_Err_Invalid_Argument` error code.
|
502
|
506
|
*
|
503
|
|
- * If the font's format is not PostScript-based, this function will
|
504
|
|
- * return the `FT_Err_Invalid_Argument` error code.
|
|
507
|
+ * @example:
|
|
508
|
+ * ```
|
|
509
|
+ * PS_FontInfoRec font_info;
|
|
510
|
+ *
|
|
511
|
+ *
|
|
512
|
+ * error = FT_Get_PS_Font_Info( face, &font_info );
|
|
513
|
+ * ...
|
|
514
|
+ * ```
|
505
|
515
|
*
|
506
|
516
|
*/
|
507
|
517
|
FT_EXPORT( FT_Error )
|
... |
... |
@@ -512,29 +522,39 @@ FT_BEGIN_HEADER |
512
|
522
|
/**************************************************************************
|
513
|
523
|
*
|
514
|
524
|
* @function:
|
515
|
|
- * FT_Get_PS_Font_Private
|
|
525
|
+ * FT_Get_PS_Font_Private
|
516
|
526
|
*
|
517
|
527
|
* @description:
|
518
|
|
- * Retrieve the @PS_PrivateRec structure corresponding to a given
|
519
|
|
- * PostScript font.
|
|
528
|
+ * Retrieve the @PS_PrivateRec structure corresponding to a given
|
|
529
|
+ * PostScript font.
|
520
|
530
|
*
|
521
|
531
|
* @input:
|
522
|
|
- * face ::
|
523
|
|
- * PostScript face handle.
|
|
532
|
+ * face ::
|
|
533
|
+ * PostScript face handle.
|
524
|
534
|
*
|
525
|
535
|
* @output:
|
526
|
|
- * afont_private ::
|
527
|
|
- * Output private dictionary structure pointer.
|
|
536
|
+ * afont_private ::
|
|
537
|
+ * A pointer to a @PS_PrivateRec object.
|
528
|
538
|
*
|
529
|
539
|
* @return:
|
530
|
|
- * FreeType error code. 0~means success.
|
|
540
|
+ * FreeType error code. 0~means success.
|
531
|
541
|
*
|
532
|
542
|
* @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.
|
|
543
|
+ * The string pointers within the @PS_PrivateRec structure are owned by
|
|
544
|
+ * the face and don't need to be freed by the caller.
|
535
|
545
|
*
|
536
|
|
- * If the font's format is not PostScript-based, this function returns
|
537
|
|
- * the `FT_Err_Invalid_Argument` error code.
|
|
546
|
+ * Only the 'Type~1' font format supports this feature. For other font
|
|
547
|
+ * formats this function returns the `FT_Err_Invalid_Argument` error
|
|
548
|
+ * code.
|
|
549
|
+ *
|
|
550
|
+ * @example:
|
|
551
|
+ * ```
|
|
552
|
+ * PS_PrivateRec font_private;
|
|
553
|
+ *
|
|
554
|
+ *
|
|
555
|
+ * error = FT_Get_PS_Font_Private( face, &font_private );
|
|
556
|
+ * ...
|
|
557
|
+ * ```
|
538
|
558
|
*
|
539
|
559
|
*/
|
540
|
560
|
FT_EXPORT( FT_Error )
|
... |
... |
@@ -693,67 +713,67 @@ FT_BEGIN_HEADER |
693
|
713
|
/**************************************************************************
|
694
|
714
|
*
|
695
|
715
|
* @function:
|
696
|
|
- * FT_Get_PS_Font_Value
|
|
716
|
+ * FT_Get_PS_Font_Value
|
697
|
717
|
*
|
698
|
718
|
* @description:
|
699
|
|
- * Retrieve the value for the supplied key from a PostScript font.
|
|
719
|
+ * Retrieve the value for the supplied key from a PostScript font.
|
700
|
720
|
*
|
701
|
721
|
* @input:
|
702
|
|
- * face ::
|
703
|
|
- * PostScript face handle.
|
|
722
|
+ * face ::
|
|
723
|
+ * PostScript face handle.
|
704
|
724
|
*
|
705
|
|
- * key ::
|
706
|
|
- * An enumeration value representing the dictionary key to retrieve.
|
|
725
|
+ * key ::
|
|
726
|
+ * An enumeration value representing the dictionary key to retrieve.
|
707
|
727
|
*
|
708
|
|
- * idx ::
|
709
|
|
- * For array values, this specifies the index to be returned.
|
|
728
|
+ * idx ::
|
|
729
|
+ * For array values, this specifies the index to be returned.
|
710
|
730
|
*
|
711
|
|
- * value ::
|
712
|
|
- * A pointer to memory into which to write the value.
|
|
731
|
+ * value ::
|
|
732
|
+ * A pointer to memory into which to write the value.
|
713
|
733
|
*
|
714
|
|
- * valen_len ::
|
715
|
|
- * The size, in bytes, of the memory supplied for the value.
|
|
734
|
+ * valen_len ::
|
|
735
|
+ * The size, in bytes, of the memory supplied for the value.
|
716
|
736
|
*
|
717
|
737
|
* @output:
|
718
|
|
- * value ::
|
719
|
|
- * The value matching the above key, if it exists.
|
|
738
|
+ * value ::
|
|
739
|
+ * The value matching the above key, if it exists.
|
720
|
740
|
*
|
721
|
741
|
* @return:
|
722
|
|
- * The amount of memory (in bytes) required to hold the requested value
|
723
|
|
- * (if it exists, -1 otherwise).
|
|
742
|
+ * The amount of memory (in bytes) required to hold the requested value
|
|
743
|
+ * (if it exists, -1 otherwise).
|
724
|
744
|
*
|
725
|
745
|
* @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.
|
|
746
|
+ * The values returned are not pointers into the internal structures of
|
|
747
|
+ * the face, but are 'fresh' copies, so that the memory containing them
|
|
748
|
+ * belongs to the calling application. This also enforces the
|
|
749
|
+ * 'read-only' nature of these values, i.e., this function cannot be
|
|
750
|
+ * used to manipulate the face.
|
731
|
751
|
*
|
732
|
|
- * `value` is a void pointer because the values returned can be of
|
733
|
|
- * various types.
|
|
752
|
+ * `value` is a void pointer because the values returned can be of
|
|
753
|
+ * various types.
|
734
|
754
|
*
|
735
|
|
- * If either `value` is `NULL` or `value_len` is too small, just the
|
736
|
|
- * required memory size for the requested entry is returned.
|
|
755
|
+ * If either `value` is `NULL` or `value_len` is too small, just the
|
|
756
|
+ * required memory size for the requested entry is returned.
|
737
|
757
|
*
|
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.
|
|
758
|
+ * The `idx` parameter is used, not only to retrieve elements of, for
|
|
759
|
+ * example, the FontMatrix or FontBBox, but also to retrieve name keys
|
|
760
|
+ * from the CharStrings dictionary, and the charstrings themselves. It
|
|
761
|
+ * is ignored for atomic values.
|
742
|
762
|
*
|
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).
|
|
763
|
+ * `PS_DICT_BLUE_SCALE` returns a value that is scaled up by 1000. To
|
|
764
|
+ * get the value as in the font stream, you need to divide by 65536000.0
|
|
765
|
+ * (to remove the FT_Fixed scale, and the x1000 scale).
|
746
|
766
|
*
|
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.
|
|
767
|
+ * IMPORTANT: Only key/value pairs read by the FreeType interpreter can
|
|
768
|
+ * be retrieved. So, for example, PostScript procedures such as NP, ND,
|
|
769
|
+ * and RD are not available. Arbitrary keys are, obviously, not be
|
|
770
|
+ * available either.
|
751
|
771
|
*
|
752
|
|
- * If the font's format is not PostScript-based, this function returns
|
753
|
|
- * the `FT_Err_Invalid_Argument` error code.
|
|
772
|
+ * If the font's format is not PostScript-based, this function returns
|
|
773
|
+ * the `FT_Err_Invalid_Argument` error code.
|
754
|
774
|
*
|
755
|
775
|
* @since:
|
756
|
|
- * 2.4.8
|
|
776
|
+ * 2.4.8
|
757
|
777
|
*
|
758
|
778
|
*/
|
759
|
779
|
FT_EXPORT( FT_Long )
|