17.05.2014 Views

PDFlib 8 Windows COM/.NET Tutorial

PDFlib 8 Windows COM/.NET Tutorial

PDFlib 8 Windows COM/.NET Tutorial

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

will prevent them from being replaced by a ligature even if ligatures are enabled in the<br />

features option. For example, the following sequence will not create any f+i ligature:<br />

Schilf&zwnj;insel<br />

Script- and language-specific OpenType layout features. OpenType features may apply<br />

in all situations, or can be implemented for a particular script or even a particular<br />

script and language combination. For this reason the script and language text options<br />

can optionally be supplied along with the features option. They will have a noticeable effect<br />

only if the feature is implement in a script- or language-specific manner in the font.<br />

As an example, the ligature for the f and i glyphs is not available in some fonts if the<br />

Turkish language is selected (since the ligated form of i could be confused with the dotless<br />

i which is very common in Turkish). Using such a font the following Textflow option<br />

will create a ligature since no script/language is specified:<br />

fi<br />

However, the following Textflow option list will not create any ligature due to the Turkish<br />

language option:<br />

fi<br />

The locl feature explicitly selects language-specific character forms. The liga feature contains<br />

language-specific ligatures. Some examples for language-specific features:<br />

Variant character for Serbian:<br />

&#x0431;<br />

Variant figures for Urdu:<br />

&#x0662;&#x0663;&#x0664;&#x0665;<br />

See Section 6.4.2, »Script and Language«, page 166, for supported script and language<br />

keywords.<br />

Combining OpenType features and shaping. Shaping for complex scripts (see Section<br />

6.4, »Complex Script Output«, page 164) heavily relies on OpenType font features which<br />

will be selected automatically. However, for some fonts it may make sense to combine<br />

OpenType features selected automatically for shaping with OpenType features which<br />

have been selected by the client application. <strong>PDFlib</strong> will first apply user-selected Open-<br />

Type features (option features) before applying shaping-related features automatically<br />

(options shaping, script and language).<br />

Querying OpenType features programmatically. You can query OpenType features in<br />

a font programmatically with info_font( ). The following statement retrieves a spaceseparated<br />

list with all OpenType features which are available in the font and are supported<br />

by <strong>PDFlib</strong>:<br />

result = (int) p.info_font(font, "featurelist", "");<br />

if (result != -1)<br />

{<br />

/* retrieve string containing space-separated feature list */<br />

featurelist = p.get_parameter("string", result);<br />

}<br />

else<br />

6.3 OpenType Layout Features 161

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

Saved successfully!

Ooh no, something went wrong!