10.07.2015 Views

Download - Multivac!

Download - Multivac!

Download - Multivac!

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.

Simulated italic fonts. As an alternative to the fontstyle feature the italicangle parameteror option can be used to simulate italic fonts when only a regular font is available.This method creates a fake italic font by skewing the regular font by a user-provided angle,and does not suffer from the fontstyle restrictions mentioned above. Negative valueswill slant the text clockwise. Be warned that using a real italic or oblique font will resultin much more pleasing output. However, if an italic font is not available theitalicangle parameter or option can be used to easily simulate one. This feature may beespecially useful for CJK fonts. Typical values for the italicangle parameter or option arein the range -12 to -15 degrees.Note The italicangle parameter or option is not supported for vertical writing mode.Underline, overline, and strikeout text. PDFlib can be instructed to put lines below,above, or in the middle of text. The stroke width of the bar and its distance from thebaseline are calculated based on the font’s metrics information. In addition, the currentvalues of the horizontal scaling factor and the text matrix are taken into account whencalculating the width of the bar. The respective parameter names for PDF_set_parameter( ) can be used to switch the underline, overline, and strikeout feature on oroff, as well as the corresponding options in the text output functions. The underlinepositionand underlinewidth parameters and options can be used for fine-tuning.The current stroke color is used for drawing the bars. The current linecap and dashparameters are ignored, however. Aesthetics alert: in most fonts underlining will touchdescenders, and overlining will touch diacritical marks atop ascenders.Cookbook A full code sample can be found in the Cookbook topic text_output/starter_textline.Text rendering modes. PDFlib supports several rendering modes which affect the appearanceof text. This includes outline text and the ability to use text as a clipping path.Text can also be rendered invisibly which may be useful for placing text on scanned imagesin order to make the text accessible to searching and indexing, while at the sametime assuring it will not be visible directly. The rendering modes are described in thePDFlib Reference, and can be set with the textrendering parameter or option.When stroking text, graphics state parameters such as linewidth and color will be appliedto the glyph outline. The rendering mode has no effect on text displayed using aType 3 font.Note Text rendering mode 7 (use text as clipping path) will not have any effect when creating textoutput with PDF_fit_textline( ) or PDF_fit_textflow( ).Cookbook Full code samples can be found in the Cookbook topics text_output/text_as_clipping_pathand text_output/invisible_text.Text color. Text will usually be display in the current fill color, which can be set usingPDF_setcolor( ). However, if a rendering mode other than 0 has been selected, both strokeand fill color may affect the text depending on the selected rendering mode.Cookbook A full code sample can be found in the Cookbook topic text_output/starter_textline.5.5 Font Metrics and Text Variations 115

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

Saved successfully!

Ooh no, something went wrong!