Comment 5 for bug 1336753

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

After a bit more exploration it seems that even on my Linux system there is font substitution going on for Chinese characters. The font identified as "Microsoft YaHei UI" was actually something else. (I don't know what, there is just a little symbol next to the font name that shows it has been substituted in Inkscape when text is selected with the text tool). Similarly, MS Gothic was substituted. I made a tiny test file with a couple of characters pulled from your example converted to "Times New Roman", "Arial", "Gothic", and "YaHei". Saved as EMF and SVG. Read back in. Nothing moved around - but that is because the same font substitutions are going on at all steps, as this was all on one machine.

The issue you are going to run into is that whatever your target platform is that must display the final SVG it is going to need to have the right font(s) installed, otherwise it will not be quite as you intended. In European languages if one sticks with Arial and the other common fonts that isn't a problem, as those are always present or map nearly 1:1. Presumably there is a similar "common" Chinese font for web display, and that is the font you need to use. Not MS Gothic.

In any case, one way around this is to use the "Text to Path" option on export. In the attached example I first made the Chinese4.emf file, then saved to Chinese4.svg. Then I saved it to Chinese4b.emf using the "text to path" option. Opened that back up again in Inkscape (everything still in the right place) and saved as Chinese4b.svg. On my XP system, I can see the Chinese text in the two 4b versions (because they are drawings, not real text), whereas the Chinese4.emf comes up with empty squares for all characters. Chinese4.svg looks OK in Firefox but I can see some slight offsets on the text, probably due to font substitutions. Chinese4b.svg looks exactly like it did in Inkscape on Linux, with no offsets. Of course it is no longer text, just a drawing of text, so people cannot select, copy, and paste anything from it into an editor.