22.03.2015 Views

DLI Implementation and Reference Guide - Datalogics

DLI Implementation and Reference Guide - Datalogics

DLI Implementation and Reference Guide - Datalogics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Fonts 4.9<br />

fields (<strong>and</strong> the font name given, if the font returned has a different name), will be used<br />

to change the characteristics of the font if these are set.<br />

CAUTION: It is not difficult to create an invalid font by setting these values<br />

incorrectly. Therefore, the application should set only the fields that it is<br />

concerned with affecting in the returned font, <strong>and</strong> leave the rest as NULL values.<br />

The dlpdffontcreatewithmetrics function will match system fonts based on<br />

the parameters in the PDEFontAttrs structure:<br />

• If a system font is found, it will be altered to reflect the values in the<br />

PDEFontAttrs structure (with the exceptions noted above).<br />

• If no system font is found, a font will be created if a valid width table <strong>and</strong> set of<br />

PDEFontAttrs are passed into this function.<br />

• If no system font is found <strong>and</strong> an invalid width table or set of font attributes is<br />

passed to this function, an exception will be raised.<br />

The encoding field in the PDEFontAttrs font attributes structure is an ASAtom<br />

containing one of the significant strings listed in "Predefined Font Encodings," or the<br />

name of a predefined encoding or CMap file (as given in the PDF <strong>Reference</strong> manual).<br />

This should correspond to the encoding format in which the font’s text is to be<br />

typeset.<br />

NOTE: Not all the predefined encodings may be used with all fonts. Details on<br />

which types will accept which values are given in the section on predefined font<br />

encodings later in this chapter.<br />

The type field in the PDEFontAttrs font attributes structure should be filled in by<br />

the user. If it is not (i.e. currently ASAtomNull), then any type of font (Type1,<br />

TrueType, etc.) may be used. Otherwise, a font of the matching type will be selected if<br />

present. If no font of the matching type is found, any suitably-named font will be<br />

returned.<br />

The charSet field in the PDEFontAttrs font attributes structure may be set to<br />

"Roman" or ASAtomNull. With an ASAtom value of "Roman," only a font

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!