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.

For symbol fonts the keyword auto will be mapped to builtin encoding. While automaticencoding is convenient in many circumstances, using this method will make yourPDFlib client programs inherently non-portable.Tapping system code pages. PDFlib can be instructed to fetch code page definitionsfrom the system and transform it appropriately for internal use. This is very convenientsince it frees you from implementing the code page definition yourself. Instead of supplyingthe name of a built-in or user-defined encoding for PDF_load_font( ), simply usean encoding name which is known to the system. This feature is only available on selectedplatforms, and the syntax for the encoding string is platform-specific:> On Windows the encoding name is cp, where is the number ofany single-byte code page installed on the system (see Section 5.6.2, »Custom CJKFonts«, page 117, for information on multi-byte Windows code pages):font = p.load_font("Helvetica", "cp1250", "");Single-byte code pages will be transformed into an internal 8-bit encoding, whilemulti-byte code pages will be mapped to Unicode at runtime. The text must be suppliedin a format which is compatible with the chosen code page (e.g. SJIS for cp932).> On IBM eServer iSeries any Coded Character Set Identifier (CCSID) can be used. TheCCSID must be supplied as a string, and PDFlib will apply the prefix IBMCCSID to thesupplied code page number. PDFlib will also add leading 0 characters if the code pagenumber uses fewer than 5 characters. Supplying 0 (zero) as the code page numberwill result in the current job’s encoding to be used:font = p.load_font("Helvetica", "273", "");> On IBM eServer zSeries with USS or MVS any Coded Character Set Identifier (CCSID) canbe used. The CCSID must be supplied as a string, and PDFlib will pass the suppliedcode page name to the system literally without applying any change:font = p.load_font("Helvetica", "IBM-273", "");User-defined 8-bit encodings. In addition to predefined encodings PDFlib supportsuser-defined 8-bit encodings. These are the way to go if you want to deal with somecharacter set which is not internally available in PDFlib, such as EBCDIC character setsdifferent from the one supported internally in PDFlib. PDFlib supports encoding tablesdefined by PostScript glyph names, as well as tables defined by Unicode values.The following tasks must be done before a user-defined encoding can be used in aPDFlib program (alternatively the encoding can also be constructed at runtime usingPDF_encoding_set_char( )):> Generate a description of the encoding in a simple text format.> Configure the encoding in the PDFlib resource file (see Section 3.1.3, »Resource Configurationand File Searching«, page 48) or via PDF_set_parameter( ).> Provide a font (metrics and possibly outline file) that supports all characters used inthe encoding.The encoding file simply lists glyph names and numbers line by line. The following excerptshows the start of an encoding definition:% Encoding definition for PDFlib, based on glyph names% name code Unicode (optional)space 32 0x00204.4 8-Bit Encodings 83

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

Saved successfully!

Ooh no, something went wrong!