[Tkinter-discuss] Unicode characters in canvas postscript

Michael Lange klappnase at web.de
Tue Mar 20 12:47:35 CET 2007

On Tue, 20 Mar 2007 11:12:32 -0000
mkieverpy at tlink.de wrote:

> Hello Vasilis,
> >I want to add "print to postscript" functionality on my program. I have
> >used the "postscript" method of Canvas, and it works nicely apart from
> >all no-latin (Unicode) characters. On the screen appear Ok but on the
> >postscript are replaced by question marks ?.
> Do you mean question marks in the Postscript file or the printout?
> If the Postscript file looks ok, it's your printing system.
> At least on Mac OS X there were several issues regarding unicode and Tk.
> So your Tk should be quite recent.
> I could give it a try on a Linux system, if you're interested.

On my linux box latin-1 non-ascii characters print ok, but
on asian characters I get question marks in the postscript file,
and it happens with Tk-8.5, so I don't think it's my Tk which is too old.
I don't think it is a Tk-and-unicode issue at all, because the characters
seem to display correctly in the canvas; maybe it's rather a limitation of
I found this quote on <http://en.wikibooks.org/wiki/PostScript_FAQ> :


Does PostScript support unicode for CJK fonts?

PostScript does not specifically support Unicode. It includes general support (from level 2) for multi-byte (2, 3 or 4 byte) fonts. Unicode is just a special case of multi-byte encoding. There is no Unicode font as such, but you can use multi-byte CID fonts that provide support for ranges of Unicode.

There are no freely redistributable Unicode CMaps. They can be derived from MS Windows code pages and corresponding Adobe CMaps.

Developers often look for a "simple" way to just include Unicode strings with no checking for ranges, language etc. but this is a pipe dream.


Not sure if this explains it all, though.



More information about the Tkinter-discuss mailing list