kPDSysFontMatchNameAndCharSet = 0x0001 | Match the font name and character set.
|
kPDSysFontMatchFontType = 0x0002 | Match the font type.
|
kPDSysFontMatchWritingMode = 0x0004 | Match the writing mode (horizontal or vertical).
|
kPDSysFontUnknown = 0 | |
kPDSysFontType1 | |
kPDSysFontTrueType | |
kPDSysFontCID | |
kPDSysFontATC | |
kPDSysFontOCF | |
kPDSysFontOpenTypeCFF | |
kPDSysFontOpenTypeCID | |
kPDSysFontOpenTypeTT |
typedef
UInt32
ATSFontFamilyRef
;
typedef
UInt32
ATSFontRef
;
typedef
struct
_t_PDSysFont
*
PDSysFont
;
typedef
FMFontFamily
PDSysFontFID
;
typedef
ATSFontRef
PDSysFontFRef
;
typedef
ASInt16
PDSysFontFStyle
;
typedef
ATSFontFamilyRef
PDSysFontFontFamilyRef
;
typedef
ASInt16
PDSysFontMode
;
ASBool
PDSysFontEnumProc(
PDSysFont
sysFont
,
void
*
clientData
);
sysFont | IN/OUT The system font.
|
clientData | IN/OUT User-supplied data that was specified in the call to PDEnumSysFonts().
|
| |
This must be
sizeof(PDSysFontPlatData) . | |
LOGFONTA * lf ; | (Windows only) The Windows
LOGFONTA structure defining font attributes. |
(Optional) Sets the pathname with fontfile name
| |
(Optional) This is only set if
LOGFONTA is not present. | |
LOGFONTW * lfw ; | (Windows only) The Windows
LOGFONTW structure defining font attributes. Whenever * * we return a valid LOGFONTA , we return a valid LOGFONTW . |
|
| |
This must be
sizeof(PDSysFontPlatData) . | |
The font ID. deprecated: Clients should not use this field, Instead use the ATSFontRef returned back in fontRef.
| |
The style value within that font. deprecated: Clients should not use this field, Instead use the ATSFontRef returned back in fontRef.
| |
|
| |
This must be
sizeof(PDSysFontPlatData) . | |
A path to the font file. It is set only if
lf is not present. | |
A path to the font AFM file. It is set only if
lf is not present. | |
|
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.
Note: This method does not change the reference count of the font.
void
PDEmbedSysFontForPDEFont(
IN
PDEFont
font
,
IN
ASUns32
flags
,
IN
CosDoc
cosDoc
);
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.
|
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.
void
PDEnumSysFonts(
IN
PDSysFontEnumProc
enumProc
,
IN
void
*
clientData
);
enumProc | IN/OUT A user-supplied callback to call once for each system font. Enumeration continues until all fonts have been enumerated, or until
enumProc returns false . |
clientData | IN/OUT A pointer to user-supplied data to pass to
enumProc each time it is called. |
Finds a system font that matches the requested attributes.
The method gets the PDSysFont rather than acquires it, so do not call PDERelease() on the returned PDSysFont when done with it.
PDSysFont
PDFindSysFont(
IN
PDEFontAttrsP
attrs
,
IN
ASUns32
attrsSize
,
IN
ASUns32
flags
);
attrs | IN/OUT A pointer to a PDEFontAttrs structure with the attributes of the font you are searching for.
|
attrsSize | IN/OUT The size of the
attrs buffer in bytes. |
flags | IN/OUT Flags from PDSysFontMatchFlags.
|
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 acquires it, so do not call PDERelease() on the returned PDSysFont when done with it.
PDSysFont
PDFindSysFontEx(
IN
PDEFontAttrsP
attrs
,
IN
ASUns32
attrsSize
,
IN
ASUns32
flags
,
OUT
ASFixed
*
mmDesignVector
,
OUT
ASInt32
*
designVecLength
);
attrs | IN/OUT A pointer to a PDEFontAttrs structure with the attributes of the font you are searching for.
|
attrsSize | IN/OUT The size of the
attrs buffer in bytes. |
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
mmDesignVector . |
designVecLength | IN/OUT (Filled by the method) Pass the length of
mmDesignVector . This parameter also returns the number of elements filled in mmDesignVector (the maximum is 4 ). |
Finds a system font that matches the requested PDEFont.
The method gets the PDSysFont rather than acquires it, so do not call PDERelease() on the returned PDSysFont when done with it.
PDSysFont
PDFindSysFontForPDEFont(
IN
PDEFont
font
,
IN
ASUns32
flags
);
font | IN/OUT A PDEFont whose matching system font is found.
|
flags |
|
font
. PDSysFontPlatDataP
PDSysFontAcquirePlatformData(
IN
PDSysFont
sysFont
);
sysFont | IN/OUT A PDSysFont object referencing a system font returned by either PDFindSysFont() or PDFindSysFontForPDEFont().
|
NULL
if it is out of memory. 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.
void
PDSysFontGetAttrs(
IN
PDSysFont
sysFont
,
OUT
PDEFontAttrsP
attrsP
,
IN
ASUns32
attrsSize
);
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 | IN/OUT The size of the
attrsP buffer in bytes. |
void
PDSysFontGetCIDSystemInfo(
IN
PDSysFont
sysFont
,
OUT
ASAtom
*
registry
,
OUT
ASAtom
*
ordering
,
OUT
ASInt32
*
supplement
);
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,
"Adobe" ). |
ordering | IN/OUT (Filled by the method) The ASAtom representing the CIDFont's Ordering information (for example,
"Japan1" ). |
supplement | IN/OUT (Filled by the method) The
SystemSupplement field from the CIDFont. |
createFlags
that can be passed to PDEFontCreateFromSysFontAndEncoding(). If the combination of sysFont and sysEnc is not allowed,-1
is returned. ASInt32
PDSysFontGetCreateFlags(
IN
PDSysFont
sysFont
,
IN
PDSysEncoding
sysEnc
);
sysFont | IN/OUT An object of type PDSysFont.
|
sysEnc | IN/OUT An object of type PDSysEncoding.
|
Gets the encoding of a single byte encoded system font.
The returned encoding must be freed via a call to ASfree().
Uns8
*
*
PDSysFontGetEncoding(
IN
PDSysFont
sysFont
,
OUT
ASAtom
*
encodingNameP
);
sysFont | IN/OUT A PDSysFont object referencing a system font whose encoding is obtained.
|
encodingNameP | IN/OUT (Filled by the method) An encoding name if the return value of PDSysFontGetEncoding() is zero. If
encodingNameP is the NULL ASAtom, the font uses its default encoding. |
An encoding array of 256 C strings. Each entry in the array either contains a glyph name or NULL
. If it is NULL
, the corresponding entry uses the font's built in encoding value.
If the return value is zero, encodingNameP contains the name of the encoding:
void
PDSysFontGetInfo(
IN
PDSysFont
sysFont
,
OUT
PDEFontInfoP
infoP
,
IN
ASUns32
infoSize
);
sysFont | IN/OUT A PDSysFont object referencing a system font whose information is obtained.
|
infoP | IN/OUT (Filled by the method) A pointer to PDEFontInfoRec structure to fill with font information for
sysFont . No more than infoSize bytes are written to this buffer. |
infoSize | IN/OUT The size of the
infoP buffer in bytes. |
ASAtom
PDSysFontGetName(
IN
PDSysFont
sysFont
);
sysFont | IN/OUT A PDSysFont object referencing a system font whose name is obtained.
|
PDScript
PDSysFontGetScript(
IN
PDSysFont
sysFont
);
sysFont | The font from which to acquire the script.
|
Note: In general, you are discouraged from using this method. Instead use PDEFontCreateFromSysFontAndEncoding() followed by PDEFontCreateWidthsNow() to create the W entry in a font.
void
PDSysFontGetType0Widths(
IN
PDSysFont
sysFont
,
IN
ASAtom
ordering
,
OUT
ASBool
*
hasDW
,
OUT
ASInt32
*
dw
,
OUT
CosObj
*
w
,
OUT
ASBool
*
hasDW2
,
OUT
ASInt32
*
dw2
,
OUT
CosObj
*
w2
);
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
sysFont . |
hasDW | |
dw | IN/OUT (Filled by the method) The default width for glyphs in a CIDFont. Currently, it is always You can find this document on the web store of the International Standards Organization (ISO). |
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. For information on the format of this array, see the description of CID Fonts in the ISO 32000-1:2008, Document Management-Portable Document Format-Part 1: PDF 1.7, section 9.7.4, page 269. You can find this document on the web store of the International Standards Organization (ISO). |
hasDW2 | |
dw2 | IN/OUT (Filled by the method) The default metrics for writing mode 1. This entry is an array of two ASInt32 numbers: the y component of the position vector and the y component of the displacement vector for writing mode 1. The x component of the position vector is always half the width of the character. The x component of the displacement vector is always You can find this document on the web store of the International Standards Organization (ISO). |
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 You can find this document on the web store of the International Standards Organization (ISO). |
void
PDSysFontGetWidths(
IN
PDSysFont
sysFont
,
OUT
ASInt16
*
widthsP
);
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.
widthsP must have room for 256 entries. |
void
PDSysFontGetWidthsEx(
IN
PDSysFont
sysFont
,
OUT
ASInt16
*
widthsP
,
IN
ASFixed
*
mmDesignVector
);
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.
widthsP must have room for 256 entries. |
mmDesignVector | IN/OUT If
sysFont is a multiple master font, it points to the design vector, whose length must equal the number of design axes of sysFont . |
void
PDSysFontReleasePlatformData(
IN
PDSysFontPlatDataP
platDataP
);
platDataP | IN/OUT A pointer to a PDSysFontPlatDataP structure containing platform-specific data.
|
-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. ASInt32
PDSysFontVerifyEncoding(
IN
PDSysFont
sysFont
,
IN
PDSysEncoding
sysEnc
);
sysFont | IN/OUT An object of type PDSysFont.
|
sysEnc | IN/OUT An object of type PDSysEncoding.
|