New Forum | Previous | Next | (P-PDF) Developers
Topic: selecting glyphs from TTF by unicode?, 1 Attachments
Conf: (P-PDF) Developers, Msg: 131671
Date: 4/23/2005 08:46 PM
Hi, I want to create PDF using Unicode content. Font embedding is not an option for several reasons. Also I don't want to create a CMap since this would be quite large and the information is contained in the font anyway.
But I don't succeed in adressing the glyphs by their Unicode value, it's always interpreted as CID, see attached handcrafted example. I'm providing 0023 which is Unicode "#" and it shows "@", because this is the index value of the Arial font.
What am I missing? Are there any secret properties for /Encoding or /Ordering? PDF Reference doesn't help me any further, all online Adobe documentation I got neither.
Any stoopid application like Wordpad can select the proper glyph from its Unicode value, why can't Acrobat Reader?
What I've learned from the PDF Reference:
If you want to have text intpreted in a multibyte way, you have to use Type0 fonts, any other font type will use single bytes.
If you have a /Type0 font you have to provide an /Encoding by stream or name. /Encoding is a CMap in this case. If you don't have a CMap and don't want to build one, there are predefined CMap names. The only one that passes unicode in 2 byte values and is applicable is /Identity-H. Or are there any others, secret ones? I would like one "take-the-unicode-cmap-of-the-font".
If the descendant font is TrueType and is not embedded, you have to specify /CIDFontType2, in which case you have to provide a /CIDSystemInfo dictionary, containing entries for /Registry and /Ordering. Now what options do I have here? Anything other than /Registry (Adobe) didn't work. For /Ordering which is said to be a character collection, I would like to specify that the builtin "Windows Unicode" cmap of the Arial Font should be used. Using (Identity) just passes the original value and it is used as CID.
handcrafted example showing the problem (749 bytes)