"Walter Betschart" <wbpub@bluewin.ch> さんは書きました:
I have problems printing Thai texts in SuSE 8.2 It looks, like my truetypes are not embeded in the postscript file. In SuSE 8.0 and 8.1 it worked perfect.
With SuSE 8.2 and KDE 3.1 it works only with latin texts.
This is a bug in Qt. Please upgrade to the Qt packages in ftp://ftp.suse.com/pub/people/mfabian/8.2-i586/
I tried to configure the fonts with KDE (kcmshell System/kcmfontinst), and with SuSE --module fonts. With the same result. I downloaded and installed the updates for KDE/QT3. It didn't help.
For my last test, I installed SuSE 8.2 again from scratch and installed all YOU updates.
There is no official update out yet, only the Qt packages in my pub/people directory as I wrote above. An official YOU update for the XFree86 packages is planned Although this is really a Qt bug, it can also be fixed by a workaround in libXft, which is part of XFree86. I.e. as soon as new XFree86 package become available via YOU, they should fix the bug as well. But the XFree86 update has been delayed for whatever reasons, I don't know when it will finally be on the SuSE ftp server. Please use the Qt package from my ftp://ftp.suse.com/pub/people/mfabian/, they contain the better fix anyway.
Set language in ~/.profile export LANG=de_CH.UTF-8 export LC_MESSAGES=en_US.UTF-8
As root I prepared the fonts with its fonts.scale.* in a separate directory with: # /usr/X11R6/bin/mkfontscale \ -e /usr/X11R6/lib/X11/fonts/encodings/large \ -e /usr/X11R6/lib/X11/fonts/encodings --
# mv fonts.scale fonts.scale.MyFonts
I copied the fonts and font.scale.MyFonts to /usr/X11R6/lib/X11/fonts/truetype/
I executed "SuSEconfig --module fonts"
This is OK, but it is unrelated to font-embedding in Qt/KDE. Qt/KDE use libXft to find the fonts to embed, fonts.dir/fonts.scale is only for X11 core font rendering.
The fonts are available in KDE. In kwrite I select "Arial Unicode MS" for Display and Printer.
The Text (latin and thai) is showed just perfect. When I print it to postscript file (or printer) just NimbusSanL-Regu is embeded. And only the latin text is printed.
This happens with most of my truetype fonts. Only a few work.
All fonts where the entry in /usr/X11R6/lib/X11/fonts/truetype/fonts.cache-1 is shorter than 1024 bytes work. Fonts which support many languages usually have longer entries. Qt used a fixed size array 1024 long to request the entry for a font via libXft. If the entry was longer, libXft returned false and didn't write anything in that array, i.e. the array just contained random garbage. Qt then tried to open the garbage file name, which didn't work and did fall back to embedding some default font.
With OpenOffice, all fonts are embeded perfect.
OpenOffice is not a Qt application, therefore it is not hit by this Qt bug.
Has anyone experienced something similar?
I guess many people had this problem, it is unfortunate that an official Qt or XFree86 update is not yet available on ftp.suse.com, although this bug is known for quite a long time already. -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。