10.07.2015 Views

Download - Multivac!

Download - Multivac!

Download - Multivac!

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

If an escape sequence cannot be resolved (e.g. \x followed by invalid hex digits) anexception will be thrown. For content strings the behavior is controlled by the glyphcheckand errorpolicy settings.4.6.2 Character References and Glyph Name ReferencesCookbook A full code sample can be found in the Cookbook topic fonts/character_references.HTML-style character references. PDFlib supports all numeric character references andcharacter entity references defined in HTML 4.0 1 . Numeric character references can besupplied in decimal or hexadecimal notation; they will always be interpreted as Unicodevalues.Character references will not be converted by default; you must explicitly set thecharref parameter or option to true if you want to use character references in contentstrings:p.set_parameter("charref", "true");Note Code points 128-159 (decimal) or 0x80-0x9F (hexadecimal) do not reference winansi codepoints. In Unicode they do not refer to printable characters, but only control characters.The following are examples for valid character references along with a description ofthe resulting character:­soft hyphen­soft hyphen­soft hyphenåletter a with small circle above (decimal)å letter a with small circle above (hexadecimal, lowercase x)å letter a with small circle above (hexadecimal, uppercase X)€Euro glyph (hexadecimal)€Euro glyph (decimal)€Euro glyph (entity name)<less than sign>greater than sign&ampersand signΑGreek AlphaNote Although you can reference any Unicode character with character references (e.g. Greek charactersand mathematical symbols), the font will not automatically be switched. In order to actuallyuse such characters you must explicitly select an appropriate font if the current font doesnot contain the specified characters.In addition to the HTML-style references mentioned above PDFlib supports customcharacter entity references which can be used to specify control characters for Textflows.Table 4.8 lists these additional character references.If a character reference cannot be resolved (e.g. &# followed by invalid decimal digits,or & followed by an unknown character name) an exception will be thrown. For contentstrings the behavior is controlled by the glyphcheck and errorpolicy settings.1. See www.w3.org/TR/REC-html40/charset.html#h-5.34.6 Addressing Characters and Glyphs 89

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

Saved successfully!

Ooh no, something went wrong!