Stephan Witt wrote:

> Am 08.04.2014 um 22:30 schrieb Georg Baum
> 
>> No, the small w is not the workaround. The workaround is to display the
>> LaTeX command (e.g. "\omega") in red if the true symbol cannot be
>> displayed.
> 
> How should this be forced? I cannot find the code for it.

Line 223 in src/mathed/MathFactory.cpp, after it did output "faking". Of 
course this kicks only in if the two fallbacks do not work.

> I just checked out rc1 again and stepped through initSymbols() myself.
> 
> lib/symbols contains this for Omega:
> Omega              cmr         173  87 mathalpha  Ω
> 
> cmr is a font name so fallbackid gets 87 in line 201.
> 
> In line 243 the test canBeDisplayed(fallbackid) succeeds and therefor the
> rest of the big if is not executed. latexkeys.draw for Omega gets W
> assigned.
> 
> In InsetMathSymbol.cpp line 112 sym_->draw (the W) is passed to painter.

Thanks for debugging. Now I understand what happens: The problem is not my 
new code in isUnicodeSymbolAvailable() which I disabled after Benjamins 
test. The problem is the old fallback code which uses the symbol font 
(originally from postscript, see e.g. 
https://en.wikipedia.org/wiki/Symbol_%28typeface%29), and 
isMathFontAvailable(symbol_font) tells that the symbol font is availbale, 
but in fact it is not. Then LyX tries to draw character 87 = 57hex using  
the symbol font, since Ω has this code point (see link above). Since the 
symbol font is not available, the standard qt font substitution mechanism 
kicks in, which picks some font with an ASCII compatible encoding, so W is 
finally dran instead of Ω.

I don't think that this is a new problem with 2.1 (this old fallback code 
has not been changed since years AFAIK), so it is not a showstopper.


Georg

Reply via email to