Originally reported by: igorm@users.sourceforge.net GlyphNames2Unicode is an undocumented feature that Adobe PS driver uses to communicate with Adobe Distiller. It is a dictionary which stores a map from glyph indices to Unicode codes for an incremental CIDFontType 2. The dictionary is stored into FontInfo. I can see 2 ways to implement it : 1. Add a new function to gs_font_procs; Access GlyphNames2Unicode or zfont_glyph_to_unicode depending on font type. 2. Enhance the function zfont_glyph_to_unicode with an additional argument for passing the font; access GlyphNames2Unicode or Unicode Decoding depending on font type. The way 1 looks more etraightforward, unless we have obstacles for enlarging gs_font_procs. A test file is attached.
Comment originally by igorm@users.sourceforge.net Logged In: YES user_id=79484 I'm sorry, I was some wrong. I have no CIDFontType 2 examples. I've only got Type 3 and Type 42 examples with GlyphNames2Unicode. The attached t.ps is type 3.
Comment originally by igorm@users.sourceforge.net Logged In: YES user_id=79484 I desided to enhance the functionality of gs_font_procs::glyph_info instead adding a new virtual method. It must be safe for PCL interpreter.
Comment originally by igorm@users.sourceforge.net Logged In: YES user_id=79484 Type 3 with GlyphNames2Unicode is used only for interpreters which cannot handle Type 32.
Comment originally by igorm@users.sourceforge.net Logged In: YES user_id=79484 With Type 3/32, if the interpreter maintains Type 32 (the fragment "32 /FontType resourcestatus" returns true), GlyphNames2Unicode are not created. This is how the generated document behaves. Only way to obtain the codes is to signal the absence of Type 32 support (Idioms cannot help because 'bind' is not applied to the check).
Comment originally by igorm@users.sourceforge.net Logged In: YES user_id=79484 I shall introduce a new function to gs_font_procs, because enhancing gs_font_procs::glyph_info causes multiple redundant code. It would be nice to use C++ templates...
Comment originally by igorm@users.sourceforge.net Logged In: YES user_id=79484 Patches http://www.ghostscript.com/pipermail/gs-cvs/2003- February/002932.html http://www.ghostscript.com/pipermail/gs-cvs/2003- February/002934.html http://www.ghostscript.com/pipermail/gs-cvs/2003- February/002935.html