Hi,

I spent several hours investigating why lyx-qt cannot display math fonts correctly while lyx-xforms can, without the latex-xft-fonts package. I also browsed the discussions about latex-xft-fonts on this mailing list but I didn't find out the exact reason.

It seems lyx-xforms uses the "old" X font scheme, with long font names like -urw-symbol-medium-r-normal--19-0-0-0-p-0-adobe-fontspecific; while lyx-qt uses the new xft one, using names like `cmmi10'.

What latex-xft-fonts does is just to install severl truetype fonts under /usr/share/fonts and run fc-cache to generate the fonts.cache-1 file. Why the pfb fonts linked in /usr/share/lyx/xfonts cannot be used instead --- the xft server should not discriminate among pfb and ttf.

So I did what latex-xft-fonts package does, but with all the ttf fonts replaced by the corresponding pfb fonts. lyx-qt failed in displaying the math fonts.

By comparing the fonts.cache-1 file from the pfb fonts, and that from the ttf fonts, I found that the font name (or font family) is different. In the fonts.cache-1 file generated from the ttf fonts, the font names are cmex10, cmmi10, etc., coinciding the ones used in src/frontends/qt2/qfont_loader.C. But the names from the pfb fonts are "Computer Modern," which in my opinion is more correct. But since lyx-qt only ask the xft server to provide fonts under the names like "cmex10", the pfb files cannot be used even we also put them under /usr/share/fonts/

I guess the above "font name (family)" mismatching is the real reason why lyx-qt requires extra ttf fonts. However, I don't feel confident to modify the qfont_loader or whatever files lyx uses to load fonts to test my idea. So I ask for my favor that someone in the "authentic" development team carry out the modification and test this idea. I really would like to see lyx-qt can use the native LaTeX pfb fonts.

Have a good weekend!
--Ling



Reply via email to