lyx_mirror/src/tex2lyx/lyxfont.C
Angus Leeming 0be0fcfd59 If I ever see another licence blurb again, it'll be too soon...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7598 a592a061-630c-0410-9148-cb99ea01b6c8
2003-08-23 00:17:00 +00:00

51 lines
1014 B
C

/**
* \file lyxfont.C
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author Angus Leeming
*
* Full author contact details are available in file CREDITS.
*/
#include <config.h>
#include "lyxfont.h"
#include "lyxlex.h"
#include "support/lstrings.h"
using namespace lyx::support;
LyXFont & LyXFont::lyxRead(LyXLex & lex)
{
bool error = false;
bool finished = false;
while (!finished && lex.isOK() && !error) {
lex.next();
string const tok = ascii_lowercase(lex.getString());
if (tok.empty()) {
continue;
} else if (tok == "endfont") {
finished = true;
} else if (tok == "family") {
lex.next();
} else if (tok == "series") {
lex.next();
} else if (tok == "shape") {
lex.next();
} else if (tok == "size") {
lex.next();
} else if (tok == "misc") {
lex.next();
} else if (tok == "color") {
lex.next();
} else {
lex.printError("Unknown tag `$$Token'");
error = true;
}
}
return *this;
}