From: Dekel Tsur Date: Mon, 14 Oct 2002 20:19:32 +0000 (+0000) Subject: iffont X-Git-Tag: 1.6.10~18187 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=6bc60cc596b6ccd92ac7743289e8f877bb6a82ff;p=features.git iffont git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5398 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 4a5066ccac..aa6cd637e4 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,6 @@ +2002-10-14 Dekel Tsur + + * math_factory.C (initSymbols): iffont. 2002-10-14 André Pönitz diff --git a/src/mathed/math_factory.C b/src/mathed/math_factory.C index ed156a2be4..b20512e2fc 100644 --- a/src/mathed/math_factory.C +++ b/src/mathed/math_factory.C @@ -94,13 +94,27 @@ void initSymbols() std::ifstream fs(filename.c_str()); string line; + bool skip = false; while (std::getline(fs, line)) { int charid = 0; int fallbackid = 0; - latexkeys tmp; if (line.size() > 0 && line[0] == '#') continue; + // special case of \iffont / \fi + if (line.size() >= 7 && line.substr(0, 6) == "iffont") { + istringstream is(line); + string tmp; + is >> tmp; + is >> tmp; + skip = !math_font_available(tmp); + continue; + } else if (line.size() >= 3 && line.substr(0, 3) == "end") { + skip = false; + continue; + } else if (skip) + continue; + // special case of pre-defined macros if (line.size() > 8 && line.substr(0, 5) == "\\def\\") { //lyxerr << "defining: '" << line << "'\n"; @@ -110,6 +124,7 @@ void initSymbols() } istringstream is(line); + latexkeys tmp; is >> tmp.name >> tmp.inset; if (isFontName(tmp.inset)) is >> charid >> fallbackid >> tmp.extra >> tmp.xmlname;