I tried to build dia 0.90 using
(B
(B --enable-freetype
(B
(Beverything seems to work fine except printing using fonts which have
(Bmany characters (e.g. Japanese TrueType fonts like Kochi Mincho or
(Bother big fonts like MS Arial Unicode).
(B
(BA simple example dia file 'test.dia' is attached (decompressed).
(B
(BThis file contains the string "xyz" two times, once using the Japanese
(B"Kochi Mincho" font and once more using the Latin1 only "Omega Serif"
(Bfont[1].
(B
(BThe "xyz" in from the "Omega Serif" font prints correctly, the "xyz"
(Bfrom the "Kochi Mincho" prints as three double width yen-signs ($B!o!o!o(B)
(B. This double width yen-sign happens to be the very last character of
(Bkochi-mincho.ttf (I checked that with pfaedit).
(B
(BBoth fonts are embedded completely into the PostScript output:
(B
(B %%BeginResource: font OmegaSerif88591
(B %!PS-TrueTypeFont
(B 11 dict begin
(B /FontName /OmegaSerif88591 def
(B
(B [... snip ...]
(B
(B %%BeginResource: font Kochi-Mincho
(B %!PS-TrueTypeFont
(B 11 dict begin
(B /FontName /Kochi-Mincho def
(B
(B [... snip ...]
(B
(B %%EndProlog
(B
(BThen the fonts are both used in the same way:
(B
(B %%BeginSetup
(B %%EndSetup
(B %%Page: 1 1
(B gs
(B
(B [... snip ...]
(B
(B /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi
(B ] /e0 exch def
(B /Kochi-Mincho_e0 undefinefont
(B /Kochi-Mincho_e0
(B /Kochi-Mincho findfont
(B dup length dict begin
(B {1 index /FID ne {def} {pop pop} ifelse} forall
(B /Encoding e0 def
(B currentdict end
(B definefont pop
(B /Kochi-Mincho_e0 ff 2.000000 scf sf
(B ( !")
(B gs 1 -1 sc sh gr
(B 5.000000 5.000000 m /OmegaSerif88591_e0 undefinefont
(B /OmegaSerif88591_e0
(B /OmegaSerif88591 findfont
(B dup length dict begin
(B {1 index /FID ne {def} {pop pop} ifelse} forall
(B /Encoding e0 def
(B currentdict end
(B definefont pop
(B /OmegaSerif88591_e0 ff 2.000000 scf sf
(B ( !")
(B gs 1 -1 sc sh gr
(B gr
(B showpage
(B
(B
(BThis works for OmegaSerif88591, but fails for Kochi-Mincho. I found
(Bthat it fails for all fonts which have many characters, i.e. all east
(BAsian TrueType fonts and also fonts like MS Arial Unicode or Bitstream
(BCyberbit which try to cover most of Unicode.
(B
(BThe problem is not only that one cannot print the Asian glyphs, one
(Bcannot print anything correctly when using these fonts, not even a
(Bsimple ASCII string like "xyz". If this problem is solved, I guess
(Bprinting will work for east Asian languages when '--enable-freetype'
(Bis used.
(B
(BLooking into the above postscript file, I see that in both cases the
(B"xyz" is encoded as "( !")", i.e. only one byte is used for each
(Bcharacter. How is this supposed to work for a font which has much more
(Bthan 256 characters? Is the font split up in smaller portions? Does
(B/OmegaSerif88591_e0 specify a subset of the /OmegaSerif88591 font?
(B
(BDo you have any hints how this can be fixed?
(B
(BFootnotes:
(B[1] both fonts are free, if you don't already have them
(Byou can download them here to reproduce the problem:
(Bhttp://www.suse.de/~mfabian/misc/kochi-mincho.ttf
(Bhttp://www.suse.de/~mfabian/misc/lt1-r-omega-serif.ttfAttachment:
test.dia
Description: Binary data
(B (B (B-- (BMike Fabian <mfabian suse de> http://www.suse.de/~mfabian $B?gL2ITB-$O$$$$;E;v$NE($ !#(B