On Sat, Nov 18, 2006 at 12:38:58PM +0100, Georg Baum wrote:
> Am Freitag, 17. November 2006 20:57 schrieb Enrico Forestieri:
> > I noticed that some math symbols are not shown on screen. This seems
> > to be platform dependent. The following is a table illustrating the
> > situation on three different platforms. Here "no" means that the
> > symbol is not shown on screen (the symbol is invisible but occupies
> > space: it is as a sort of \phantom), and "yes" that it is shown.
> >
> > ---------------------------------------
> > Symbol Linux Solaris Cygwin
> > ---------------------------------------
> > \Omega no no no
> > \int yes yes no
> > \oint yes yes no
> > \otimes no no no
> > \nleqslant no no no
> > \spadesuit(*) yes no yes
> > ---------------------------------------
> > (*) On solaris, a square is shown on screen instead of nothing.
>
> Interesting. I can confirm that for \Omega (did not try the others). This
> is exactly what I got when I tried to create a true type version of the
> esint10 font, and I suspect that the reason is the same. \Omega works fine
> in 1.4.3.
> I debugged this as far that I am pretty sure that qt is to blame here. I
> added an entry to the status file.
I investigated why \int and \oint are not shown on Windows, contrarily
to *nix. It turned out that the following check performed in
GuiFontLoader.C:
bool isChosenFont(QFont & font, string const & family)
{
...
// So we check rawName first
if (contains(fromqstr(font.rawName()), family)) {
lyxerr[Debug::FONT] << " got it ";
return true;
}
...
always succeeds on windows, whatever font is asked for, existing or not.
In this way, LyX thinks that the esint font is existing on the system,
thus the "iffont esint" test in lib/symbols succeeds, and the integral
sign glyphs are assigned to a missing font file...
The attached patch corrects this and I can see the integrals. I think
that it is correct and I also tested it on linux and solaris, but I am
no Qt expert, so I ask for opinions before applying it.
--
Enrico
Index: src/frontends/qt4/GuiFontLoader.C
===================================================================
--- src/frontends/qt4/GuiFontLoader.C (revision 16106)
+++ src/frontends/qt4/GuiFontLoader.C (working copy)
@@ -144,7 +144,7 @@ bool isChosenFont(QFont & font, string c
<< fromqstr(fi.family()) << endl;
// So we check rawName first
- if (contains(fromqstr(font.rawName()), family)) {
+ if (font.rawName() == fi.family()) {
lyxerr[Debug::FONT] << " got it ";
return true;
}