Layer | PDFEdit_Layer |
Object | PDSysFont |
A PDSysFont is a reference to a font installed on the host system. PDSysFont methods allow your plug-in to list the fonts available on the host system and to find a font on the system that matches a PDEFont, if it is present.
The PDSysFont and PDEFont classes are distinct. Your plug-in can create a PDEFont from a system font with the PDEFontCreateFromSysFont() method. It can determine what system fonts are available using the PDEnumSysFonts() and PDFindSysFont() methods.
Define | ||
---|---|---|
_PDSysFontHFT_IS_BETA | ||
_PDSysFontHFT_LAST_BETA_COMPATIBLE_VERSION | ||
_PDSysFontHFT_LATEST_VERSION | ||
PDSysFontHFT_LATEST_VERSION | ||
PDSysFontHFTName | ||
PDSysFontHFT_VERSION_4 | ||
PDSysFontNUMSELECTORS |
Typedef | ||
---|---|---|
PDSysFont
A reference to a font installed in the host system. PDSysFont methods allow you to list the fonts available in the host system and to find a font in the system that matches a PDEFont, if it is present.
|
||
PDSysFontFID (Macintosh) | ||
PDSysFontFRef (Macintosh) | ||
PDSysFontFStyle (Macintosh) | ||
PDSysFontMode | ||
PDSysFontPlatData (Macintosh) | ||
PDSysFontPlatData (UNIX) | ||
PDSysFontPlatData (Windows) | ||
PDSysFontPlatDataP (Macintosh) | ||
PDSysFontPlatDataP (UNIX) | ||
PDSysFontPlatDataP (Windows) |
Enumeration | ||
---|---|---|
PDSysFontMatchFlags
Font matching flags for PDFindSysFontForPDEFont() and PDFindSysFont().
|
||
Structure | ||
---|---|---|
_t_PDSysFontPlatData (Macintosh) PDSysFontPlatData
|
||
_t_PDSysFontPlatData (UNIX) PDSysFontPlatData
|
||
_t_PDSysFontPlatData (Windows) PDSysFontPlatData
|
Callback | ||
---|---|---|
PDSysFontEnumProc
A callback for PDEnumSysFonts(). It is called once for each system font.
|
Method | ||
---|---|---|
If there is a font on the system that matches this PDEFont, embed the full font, regardless of whether it was subsetted or not embedded at all in the first place. This will not work for CID fonts, because they must be subsetted.
|
||
void PDEnumSysFonts(INPDSysFontEnumProc enumProc, IN void* clientData)
Enumerates all of the system fonts with a user-supplied procedure.
|
||
Finds a system font that matches the requested attributes.
|
||
PDSysFont PDFindSysFontEx(INPDEFontAttrsP attrs, INASUns32 attrsSize, INASUns32 flags, OUTASFixed* mmDesignVector, OUTASInt32* designVecLength)
Finds a system font that matches the requested attributes.
|
||
PDSysFont PDFindSysFontForPDEFont(IN PDEFont font, INASUns32 flags)
Find a system font that matches the requested PDEFont.
|
||
PDSysFontPlatDataP PDSysFontAcquirePlatformData(INPDSysFont sysFont)
Acquires platform-specific data for use by user interface code. It must be released when finished by PDSysFontReleasePlatformData().
|
||
Gets the attributes of a system font.
|
||
void PDSysFontGetCIDSystemInfo(INPDSysFont sysFont, OUTASAtom* registry, OUTASAtom* ordering, OUTASInt32* supplement)
Derives the registry, ordering, and supplement information of a multi-byte system font. This information can be used to create a PDEFont from a system font. For more information on CID fonts, see PDFontGetCIDSystemInfo().
|
||
This function returns a createFlags that can be passed to PDEFontCreateFromSysFontAndEncoding(). If the combination of sysFont and sysEnc is not allowed, -1 is returned.
|
||
Gets the encoding of a single-byte encoded system font.
|
||
Gets high-level information about a system font.
|
||
ASAtom PDSysFontGetName(INPDSysFont sysFont)
Gets the PostScript or TrueType styled name for a system font.
|
||
void PDSysFontGetType0Widths(INPDSysFont sysFont, INASAtom ordering, OUTASBool* hasDW, OUTASInt32* dw, OUTCosObj* w, OUTASBool* hasDW2, OUTASInt32* dw2, OUTCosObj* w2)
Gets width information from a Type 0 system font. This information can be used to create a PDEFont from a system font.
|
||
Gets the widths of a single byte encoded system font.
|
||
Gets the widths of a single-byte encoded system font.
|
||
void PDSysFontReleasePlatformData(INPDSysFontPlatDataP platDataP)
Releases platform-specific data for the specified PDSysFont.
|
||
Similar to PDSysFontGetCreateFlags but avoids compatibility issues with changing PDSysFontGetCreateFlags. If the combination of sysFont and sysEnc is not allowed, -1 is returned. If the combination is ok, then 0 is returned. If the combination only works if the font is embedded, kPDEFontCreateEmbedded is returned.
|
_PDSysFontHFT_IS_BETA |
Product availability: All |
Platform availability: All |
#define _PDSysFontHFT_IS_BETA 0
File: PSFCalls.h |
Line: 91 |
_PDSysFontHFT_LAST_BETA_COMPATIBLE_VERSION |
Product availability: All |
Platform availability: All |
#define _PDSysFontHFT_LAST_BETA_COMPATIBLE_VERSION 0x00040000
File: PSFCalls.h |
Line: 90 |
_PDSysFontHFT_LATEST_VERSION |
Product availability: All |
Platform availability: All |
#define _PDSysFontHFT_LATEST_VERSION 0x00040000
File: PSFCalls.h |
Line: 89 |
PDSysFontHFT_LATEST_VERSION |
Product availability: All |
Platform availability: All |
#define PDSysFontHFT_LATEST_VERSION _PDSysFontHFT_LATEST_VERSION)
File: PSFCalls.h |
Line: 94 |
PDSysFontHFT_VERSION_4 |
Product availability: All |
Platform availability: All |
#define PDSysFontHFT_VERSION_4 0x00040000
File: PSFCalls.h |
Line: 96 |
PDSysFontHFTName |
Product availability: All |
Platform availability: All |
#define PDSysFontHFTName "PDSysFont"
File: PEVers.h |
Line: 30 |
PDSysFontNUMSELECTORS |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
#define PDSysFontNUMSELECTORS (PDSysFontNUMSELECTORSplusOne - 1)
File: PSFCalls.h |
Line: 135 |
PDSysFont |
Product availability: All |
Platform availability: All |
typedef struct _t_PDSysFont* PDSysFont;
A reference to a font installed in the host system. PDSysFont methods allow you to list the fonts available in the host system and to find a font in the system that matches a PDEFont, if it is present.
See Also
File: PDSysFontExpT.h |
Line: 71 |
PDSysFontFID |
Product availability: Acrobat, Reader, PDFL |
Platform availability: Macintosh |
typedef FMFontFamily PDSysFontFID;
File: PDSysFontExpT.h |
Line: 57 |
PDSysFontFRef |
Product availability: Acrobat, Reader, PDFL |
Platform availability: Macintosh |
typedef ATSFontRef PDSysFontFRef;
File: PDSysFontExpT.h |
Line: 53 |
PDSysFontFStyle |
Product availability: Acrobat, Reader, PDFL |
Platform availability: Macintosh |
typedef ASInt16 PDSysFontFStyle;
File: PDSysFontExpT.h |
Line: 59 |
PDSysFontMode |
Product availability: All |
Platform availability: All |
typedef ASInt16 PDSysFontMode;
File: PDSysFontExpT.h |
Line: 50 |
PDSysFontPlatData |
Product availability: Acrobat, Reader, PDFL |
Platform availability: Macintosh |
typedef _t_PDSysFontPlatData PDSysFontPlatData;
File: PDSysFontExpT.h |
Line: 155 |
PDSysFontPlatData |
Product availability: Acrobat, Reader, PDFL |
Platform availability: UNIX |
typedef _t_PDSysFontPlatData PDSysFontPlatData;
File: PDSysFontExpT.h |
Line: 167 |
PDSysFontPlatData |
Product availability: Acrobat, Reader, PDFL |
Platform availability: Windows |
typedef _t_PDSysFontPlatData PDSysFontPlatData;
File: PDSysFontExpT.h |
Line: 133 |
PDSysFontPlatDataP |
Product availability: Acrobat, Reader, PDFL |
Platform availability: Macintosh |
typedef _t_PDSysFontPlatData PDSysFontPlatDataP;
File: PDSysFontExpT.h |
Line: 155 |
PDSysFontPlatDataP |
Product availability: Acrobat, Reader, PDFL |
Platform availability: UNIX |
typedef _t_PDSysFontPlatData PDSysFontPlatDataP;
File: PDSysFontExpT.h |
Line: 167 |
PDSysFontPlatDataP |
Product availability: Acrobat, Reader, PDFL |
Platform availability: Windows |
typedef _t_PDSysFontPlatData PDSysFontPlatDataP;
File: PDSysFontExpT.h |
Line: 133 |
PDSysFontMatchFlags |
Product availability: All |
Platform availability: All |
enum PDSysFontMatchFlags {
kPDSysFontMatchNameAndCharSet = 0x0001,
kPDSysFontMatchFontType = 0x0002,
kPDSysFontMatchWritingMode = 0x0004
}
See Also
File: PDSysFontExpT.h |
Line: 78 |
kPDSysFontMatchNameAndCharSet | ||
kPDSysFontMatchFontType | ||
kPDSysFontMatchWritingMode | Match the writing mode (horizontal or vertical). |
PDSysFontPackageType |
Product availability: All |
Platform availability: All |
enum PDSysFontPackageType {
kPDSysFontUnknown = 0,
kPDSysFontType1,
kPDSysFontTrueType,
kPDSysFontCID,
kPDSysFontATC,
kPDSysFontOCF,
kPDSysFontOpenTypeCFF,
kPDSysFontOpenTypeCID,
kPDSysFontOpenTypeTT
}
File: PEExpT.h |
Line: 1801 |
_t_PDSysFontPlatData |
Product availability: Acrobat, Reader, PDFL |
Platform availability: Macintosh |
struct _t_PDSysFontPlatData {
ASSize_t size;
PDSysFontFID fontID;
PDSysFontFStyle fontStyle;
PDSysFontFRef fontRef;
}
File: PDSysFontExpT.h |
Line: 135 |
size | This must be |
|
fontID | IMPORTANT: The 2 fields fontID & fontStyle have been deprecated and are also not available on Mac64. Clients should not use these 2 fields. They should use the ATSFontRef returned back in fontRef. DEPRECATED: The font ID. |
|
fontStyle | ||
_t_PDSysFontPlatData |
Product availability: Acrobat, Reader, PDFL |
Platform availability: UNIX |
struct _t_PDSysFontPlatData {
ASSize_t size;
ASPathName fontPath;
ASPathName afmPath;
}
File: PDSysFontExpT.h |
Line: 157 |
size | This must be |
|
fontPath | A path to the font file. It is set only if |
|
afmPath | A path to the font AFM file. It is set only if |
_t_PDSysFontPlatData |
Product availability: Acrobat, Reader, PDFL |
Platform availability: Windows |
struct _t_PDSysFontPlatData {
ASSize_t size;
LOGFONTA* lf;
ASPathName fontPath;
ASPathName afmPath;
LOGFONTW* lfw;
}
File: PDSysFontExpT.h |
Line: 116 |
size | This must be |
|
lf | (Windows only) The Windows |
|
fontPath | (Optional) This is only set if |
|
afmPath | (Optional) This is only set if |
|
lfw | (Windows only) The Windows |
PDSysFontEnumProc |
Product availability: All |
Platform availability: All |
A callback for PDEnumSysFonts(). It is called once for each system font.
See Also
File: PDSysFontExpT.h |
Line: 182 |
PDEmbedSysFontForPDEFont | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
If there is a font on the system that matches this PDEFont, embed the full font, regardless of whether it was subsetted or not embedded at all in the first place. This will not work for CID fonts, because they must be subsetted.
The matching is based on the PDSysFontMatchFlags.
Only the font object itself is modified: no content streams are changed.
Parameters
font — | IN/OUT A PDEFont object returned from one of the PDEFontCreate methods. |
|
flags — | IN/OUT Flags from PDSysFontMatchFlags that determine matches. |
|
cosDoc — | IN/OUT Currently unused. |
See Also
Exceptions
Since
File: PSFProcs.h |
Line: 375 |
PDEnumSysFonts | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDEnumSysFonts(INPDSysFontEnumProc enumProc, IN void* clientData)
Enumerates all of the system fonts with a user-supplied procedure.
The PDSysFont must be acquired during the enumeration if the font is needed beyond the enumProc
.
Developers should not assume that the enumProc
will be called. If no system fonts are found (for example, if the PSRESOURCEPATH
environment variable is not set on UNIX platforms), enumProc
is never called, and PDEnumSysFonts() does not raise an exception.
Parameters
enumProc — | IN/OUT A user-supplied callback to call once for each system font. Enumeration continues until all fonts have been enumerated, or until |
|
clientData — | IN/OUT A pointer to user-supplied data to pass to |
See Also
Since
File: PSFProcs.h |
Line: 70 |
PDFindSysFont | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
PDSysFont PDFindSysFont(INPDEFontAttrsP attrs, INASUns32 attrsSize, INASUns32 flags)
Finds a system font that matches the requested attributes.
The method gets the PDSysFont rather than acquiring it, so do not call PDERelease() on the returned PDSysFont when you are done with it.
Parameters
attrs — | IN/OUT A pointer to a PDEFontAttrs structure with the attributes of the font you are searching for. |
|
attrsSize — | ||
flags — | IN/OUT Flags from PDSysFontMatchFlags. |
The desired system font. |
See Also
Since
File: PSFProcs.h |
Line: 93 |
PDFindSysFontEx | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
PDSysFont PDFindSysFontEx(INPDEFontAttrsP attrs, INASUns32 attrsSize, INASUns32 flags, OUTASFixed* mmDesignVector, OUTASInt32* designVecLength)
Finds a system font that matches the requested attributes.
If the requested font is a multiple master font instance, the base font is returned, and the specified design vector is decoded and returned in mmDesignVector
.
The method gets the PDSysFont rather than acquiring it, so do not call PDERelease() on the returned PDSysFont when done with it.
Parameters
attrs — | IN/OUT A pointer to a PDEFontAttrs structure with the attributes of the font you are searching for. |
|
attrsSize — | ||
flags — | IN/OUT Flags from PDSysFontMatchFlags. |
|
mmDesignVector — | IN/OUT (Filled by the method) If the requested font is a multiple master font instance, the specified design vector is decoded and returned in |
|
designVecLength — | IN/OUT (Filled by the method) Pass the length of |
The desired system font. |
See Also
Since
File: PSFProcs.h |
Line: 130 |
PDFindSysFontForPDEFont | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
Find a system font that matches the requested PDEFont.
The method gets the PDSysFont rather than acquiring it, so do not call PDERelease() on the returned PDSysFont when done with it.
Parameters
font — | ||
flags — | A bit field comprised of PDSysFontMatchFlags values.
|
See Also
Exceptions
Since
File: PSFProcs.h |
Line: 160 |
PDSysFontAcquirePlatformData | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
PDSysFontPlatDataP PDSysFontAcquirePlatformData(INPDSysFont sysFont)
Acquires platform-specific data for use by user interface code. It must be released when finished by PDSysFontReleasePlatformData().
Parameters
sysFont — | IN/OUT A PDSysFont object referencing a system font returned by either PDFindSysFont() or PDFindSysFontForPDEFont(). |
A pointer to a platform-dependent structure PDSysFontPlatData containing information relating to a system font. It returns |
See Also
Since
File: PSFProcs.h |
Line: 322 |
PDSysFontGetAttrs | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSysFontGetAttrs(INPDSysFont sysFont, OUTPDEFontAttrsP attrsP, INASUns32 attrsSize)
Gets the attributes of a system font.
The attributes will be returned in the buffer pointed to by attrsP
.
No more than attrsSize
bytes will be written to the buffer.
This call can be expensive to execute, as it may involve parsing the font in order to determine attributes.
Parameters
sysFont — | IN/OUT A PDSysFont object referencing a system font whose attributes are obtained. |
|
attrsP — | IN/OUT (Filled by the method) A pointer to a PDEFontAttrs structure with the attributes of a system font. |
|
attrsSize — |
See Also
Exceptions
Since
File: PSFProcs.h |
Line: 204 |
PDSysFontGetCIDSystemInfo | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSysFontGetCIDSystemInfo(INPDSysFont sysFont, OUTASAtom* registry, OUTASAtom* ordering, OUTASInt32* supplement)
Derives the registry, ordering, and supplement information of a multi-byte system font. This information can be used to create a PDEFont from a system font. For more information on CID fonts, see PDFontGetCIDSystemInfo().
Parameters
sysFont — | IN/OUT A PDSysFont object referencing a multi-byte system font. |
|
registry — | IN/OUT (Filled by the method) The ASAtom representing the CIDFont's Registry information (for example, |
|
ordering — | IN/OUT (Filled by the method) The ASAtom representing the CIDFont's Ordering information (for example, |
|
supplement — | IN/OUT (Filled by the method) The SystemSupplement field from the CIDFont. |
See Also
Since
File: PSFProcs.h |
Line: 400 |
PDSysFontGetCreateFlags | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
ASInt32 PDSysFontGetCreateFlags(INPDSysFont sysFont, INPDSysEncoding sysEnc)
This function returns a createFlags
that can be passed to PDEFontCreateFromSysFontAndEncoding(). If the combination of sysFont and sysEnc is not allowed, -1
is returned.
Parameters
sysFont — | ||
sysEnc — | IN/OUT An object of type PDSysEncoding. |
See above. |
Exceptions
Since
File: PEWProcs.h |
Line: 2342 |
PDSysFontGetEncoding | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
Gets the encoding of a single-byte encoded system font.
Parameters
sysFont — | A PDSysFont object referencing a system font whose encoding is obtained. |
|
encodingNameP — | (Filled by the method) An encoding name if the standard encoding is used. For Windows, it is |
If the return value is non- The returned encoding must be freed via a call to ASfree(). |
See Also
Since
File: PSFProcs.h |
Line: 270 |
PDSysFontGetInfo | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSysFontGetInfo(INPDSysFont sysFont, OUTPDEFontInfoP infoP, INASUns32 infoSize)
Gets high-level information about a system font.
Parameters
sysFont — | A PDSysFont object referencing a system font whose information is obtained. |
|
infoP — | (Filled by the method) A pointer to PDEFontInfoP structure to fill with font information for |
|
infoSize — | The size of the |
See Also
Since
File: PSFProcs.h |
Line: 289 |
PDSysFontGetName | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
Gets the PostScript or TrueType styled name for a system font.
Parameters
sysFont — | IN/OUT A PDSysFont object referencing a system font whose name is obtained. |
See Also
Since
File: PSFProcs.h |
Line: 305 |
PDSysFontGetType0Widths | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSysFontGetType0Widths(INPDSysFont sysFont, INASAtom ordering, OUTASBool* hasDW, OUTASInt32* dw, OUTCosObj* w, OUTASBool* hasDW2, OUTASInt32* dw2, OUTCosObj* w2)
Gets width information from a Type 0 system font. This information can be used to create a PDEFont from a system font.
Parameters
sysFont — | IN/OUT A PDSysFont object referencing a multibyte system font. |
|
ordering — | IN/OUT An ASAtom representing the CIDFont's Ordering information. It is used to get a CMap object for |
|
hasDW — | IN/OUT (Filled by the method) |
|
dw — | IN/OUT (Filled by the method) Default width for glyphs in a CIDFont. Currently, always 1000. See Section 5.6 on CIDFontType 0 in the PDF Reference for more information. |
|
w — | IN/OUT (Filled by the method) A Cos array of a set of lists that define the widths for the glyphs in the CIDFont. Each list can specify individual widths for consecutive CIDs, or one width for a range of CIDs. See Section 5.6.3 on character widths in CIDFonts in the PDF Reference for information on the format of this array. |
|
hasDW2 — | IN/OUT (Filled by the method) |
|
dw2 — | IN/OUT (Filled by the method) The default metrics for writing mode |
|
w2 — | IN/OUT (Filled by the method) A Cos array defining the metrics for vertical writing. Its format is similar to the format of the array in w. It defines the x and y components of the position vector, and the y component of the displacement vector. The x component of the displacement vector is always |
See Also
Since
File: PSFProcs.h |
Line: 459 |
PDSysFontGetWidths | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
Gets the widths of a single byte encoded system font.
Parameters
sysFont — | IN/OUT A PDSysFont object referencing a system font whose widths are obtained. |
|
widthsP — | IN/OUT (Filled by the method) A pointer to the widths array. |
See Also
Exceptions
Since
File: PSFProcs.h |
Line: 221 |
PDSysFontGetWidthsEx | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
Gets the widths of a single-byte encoded system font.
Parameters
sysFont — | IN/OUT A PDSysFont object referencing a system font whose widths are obtained. |
|
widthsP — | IN/OUT (Filled by the method) A pointer to the widths array. |
|
mmDesignVector — | IN/OUT If |
See Also
Exceptions
Since
File: PSFProcs.h |
Line: 242 |
PDSysFontReleasePlatformData | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSysFontReleasePlatformData(INPDSysFontPlatDataP platDataP)
Releases platform-specific data for the specified PDSysFont.
Parameters
platDataP — | A pointer to a PDSysFontPlatDataP structure containing platform-specific data. |
See Also
Since
File: PSFProcs.h |
Line: 333 |
PDSysFontVerifyEncoding | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
ASInt32 PDSysFontVerifyEncoding(INPDSysFont sysFont, INPDSysEncoding sysEnc)
Similar to PDSysFontGetCreateFlags but avoids compatibility issues with changing PDSysFontGetCreateFlags. If the combination of sysFont and sysEnc is not allowed, -1
is returned. If the combination is ok, then 0
is returned. If the combination only works if the font is embedded, kPDEFontCreateEmbedded is returned.
Parameters
sysFont — | ||
sysEnc — | IN/OUT An object of type PDSysEncoding. |
See above. |
Exceptions
Since
File: PEWProcs.h |
Line: 2359 |