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.

Multibyte Text Work 5.3<br />

Loading <strong>and</strong> Creating Fonts<br />

To use the enhanced <strong>DLI</strong> text functionality, fonts must first be loaded into a<br />

DLPDFINSTANCE, then created using the dlpdffontcreate calls.<br />

dlpdfttload<br />

Loading the font is done using the dlpdfttload function. This call accepts<br />

TrueType, OpenType <strong>and</strong> TrueType collection files.<br />

NOTE: Adobe CFF OpenType font files are not properly subset at this time. The<br />

sample “WideText” on page 17.21 shows the recommended usage for these fonts,<br />

using the DLPDFCONTENT multibyte text h<strong>and</strong>ling.<br />

int dlpdfttload (DLPDFINSTANCE, ASFile, ASAtom[], int)<br />

• The first argument provides a DLPDFINSTANCE into which the font is loaded; once<br />

that is done, any document using the instance may create the font.<br />

• The second argument is a font file, supplied as an ASFile for the second<br />

parameter; please see the sample “WideText” on page 17.21 for an example of<br />

creating an ASFile from a file on disk.<br />

• The third argument is an array of ASAtoms. Because a font file may contain more<br />

than one font, the caller must supply an array of ASAtoms as the third parameter.<br />

• The fourth argument is the number of array entries. The dlpdfttload function<br />

will fill the array with ASAtoms of the fonts loaded, up to the size of the ASAtom<br />

array. If the array is too small to hold all the font names, the additional fonts will<br />

still be loaded, but the names will not be returned. <strong>Datalogics</strong> recommends that this

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

Saved successfully!

Ooh no, something went wrong!