don't assume symbol font is available, ok'd by Andre

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5866 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2002-12-18 22:15:59 +00:00
parent 2421c85ca2
commit 8f217402f9
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2002-12-18 John Levon <levon@movementarian.org>
* math_factory.C: do not assume symbol font is present
2002-12-17 Dekel Tsur <dekelts@tau.ac.il>
* math_parser.C (tokenize): Fix macro reading.

View File

@ -146,13 +146,17 @@ void initSymbols()
if (isFontName(tmp.inset)) {
// tmp.inset _is_ the fontname here.
// create fallbacks if necessary
// symbol font is not available sometimes
string symbol_font = "lyxsymbol";
if (tmp.extra == "func" || tmp.extra == "funclim" || tmp.extra == "special") {
lyxerr[Debug::MATHED] << "symbol abuse for " << tmp.name << endl;
tmp.draw = tmp.name;
} else if (math_font_available(tmp.inset)) {
lyxerr[Debug::MATHED] << "symbol available for " << tmp.name << endl;
tmp.draw += char(charid);
} else if (fallbackid) {
} else if (fallbackid && math_font_available(symbol_font)) {
if (tmp.inset == "cmex")
tmp.inset = "lyxsymbol";
else