mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
iffont
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5398 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a6c2a6d154
commit
6bc60cc596
@ -1,3 +1,6 @@
|
|||||||
|
2002-10-14 Dekel Tsur <dekelts@tau.ac.il>
|
||||||
|
|
||||||
|
* math_factory.C (initSymbols): iffont.
|
||||||
|
|
||||||
2002-10-14 André Pönitz <poenitz@gmx.net>
|
2002-10-14 André Pönitz <poenitz@gmx.net>
|
||||||
|
|
||||||
|
@ -94,13 +94,27 @@ void initSymbols()
|
|||||||
|
|
||||||
std::ifstream fs(filename.c_str());
|
std::ifstream fs(filename.c_str());
|
||||||
string line;
|
string line;
|
||||||
|
bool skip = false;
|
||||||
while (std::getline(fs, line)) {
|
while (std::getline(fs, line)) {
|
||||||
int charid = 0;
|
int charid = 0;
|
||||||
int fallbackid = 0;
|
int fallbackid = 0;
|
||||||
latexkeys tmp;
|
|
||||||
if (line.size() > 0 && line[0] == '#')
|
if (line.size() > 0 && line[0] == '#')
|
||||||
continue;
|
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
|
// special case of pre-defined macros
|
||||||
if (line.size() > 8 && line.substr(0, 5) == "\\def\\") {
|
if (line.size() > 8 && line.substr(0, 5) == "\\def\\") {
|
||||||
//lyxerr << "defining: '" << line << "'\n";
|
//lyxerr << "defining: '" << line << "'\n";
|
||||||
@ -110,6 +124,7 @@ void initSymbols()
|
|||||||
}
|
}
|
||||||
|
|
||||||
istringstream is(line);
|
istringstream is(line);
|
||||||
|
latexkeys tmp;
|
||||||
is >> tmp.name >> tmp.inset;
|
is >> tmp.name >> tmp.inset;
|
||||||
if (isFontName(tmp.inset))
|
if (isFontName(tmp.inset))
|
||||||
is >> charid >> fallbackid >> tmp.extra >> tmp.xmlname;
|
is >> charid >> fallbackid >> tmp.extra >> tmp.xmlname;
|
||||||
|
Loading…
Reference in New Issue
Block a user