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.

6.3 OpenType Layout Features<br />

Cookbook Full code samples can be found in the Cookbook topics text_output/starter_opentype and<br />

font/opentype_feature_tester.<br />

6.3.1 Supported OpenType Layout Features<br />

<strong>PDFlib</strong> supports enhanced text output according to additional information in some<br />

fonts. These font extensions are called OpenType layout features. For example, a font<br />

may contain a liga feature which includes the information that the f, f, and i glyphs can<br />

be combined to form a ligature. Other common examples are small caps in the smcp feature,<br />

i.e. uppercase characters which are smaller than the regular uppercase characters,<br />

and old-style figures in the onum feature with ascenders and descenders (as opposed to<br />

lining figures which are all placed on the baseline). Although ligatures are a very common<br />

OpenType feature, they are only one of many dozen possible features. An overview<br />

of the OpenType format and OpenType feature tables can be found at<br />

www.microsoft.com/typography/developers/opentype/default.htm<br />

<strong>PDFlib</strong> supports the following groups of OpenType features:<br />

> OpenType features for Western typography listed in Table 6.1; these are controlled<br />

by the features option.<br />

> OpenType features for Chinese, Japanese, and Korean text output listed in Table 6.7;<br />

these are also controlled by the features option, and are discussed in more detail in<br />

Section 6.5.4, »OpenType Layout Features for advanced CJK Text Output«, page 176.<br />

> OpenType features for complex script shaping and vertical text output; these are automatically<br />

evaluated subject to the shaping and script options (see Section 6.4,<br />

»Complex Script Output«, page 164). The vert feature is controlled by the vertical font<br />

option.<br />

> OpenType feature tables for kerning; however, <strong>PDFlib</strong> doesn’t treat kerning as Open-<br />

Type feature because kerning data may also be represented with other means than<br />

OpenType feature tables. Use the readkerning font option and the kerning text option<br />

instead to control kerning (see Section 6.2.2, »Kerning«, page 154).<br />

More detailed descriptions of OpenType layout features can be found at<br />

www.microsoft.com/typography/otspec/featuretags.htm<br />

Identifying OpenType features. You can identify OpenType feature tables with the following<br />

tools:<br />

> The FontLab font editor is a an application for creating and editing fonts. The free<br />

demo version (www.fontlab.com) displays and previews OpenType features<br />

> DTL OTMaster Light (www.fonttools.org) is a free application for viewing and analyzing<br />

fonts, including their OpenType feature tables.<br />

> Microsoft’s free »font properties extension« 1 displays a list of OpenType features<br />

available in a font (see Figure 6.3).<br />

> <strong>PDFlib</strong>’s info_font( ) interface can also be used to query supported OpenType features<br />

(see »Querying OpenType features programmatically«, page 162).<br />

1. See www.microsoft.com/typography/TrueTypeProperty21.mspx<br />

6.3 OpenType Layout Features 157

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

Saved successfully!

Ooh no, something went wrong!