Comment 52 for bug 942050

Revision history for this message
David Mathog (mathog) wrote :

I have unicode <-> nonunicode conversion working pretty well now. It is only applied when an EMF file is read in or written out, and it only handles 3 nonunicode fonts: symbol, wingdings, and Zapf Dingbats. All of the code changes are in the attached .tar.gz.

The way it works is this:

1. EMF/WMF read: all symbol, wingdings, and dingbats are automatically converted to the closest Unicode character in Times New Roman font. If there is no matching unicode, it is converted to an unknown symbol character.

2. on EMF write optionally (pop up window, same one as "convert to path") unicode which maps to one of the nonunicode fonts may be converted back.

3. optionally, on output conversion the character value can be moved up into the F020-F0FF Microsoft PUA area.

The conversion ONLY applies to the EMF written. What is left in Inkscape is formatted the same as before. To see the changes the EMF must be explicitly read in.

It is still possible to work with Symbol font (broken as that is Bug #948245), and to keep them as such, so long as the file is saved in any format other than EMF.

The only problem I have found so far is that since the glyphs are not quite the same widths, text like:

   blah blah (the next word is in greek letters, but the period isn't) symbol.

will write out with the period slightly offset relative to the Symbol font text. The longer the text, the worse this effect is. For me not such a problem since the symbols tend to be one or two greek characters in diagrams.

Anyway, this lets me take the SVG files I have currently with symbol font in them, and convert them to unicode, while still being able to get the Symbol back for other applications. So the SVG will work on the web, and the EMF it generates will go into MS applications.