mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
9383f4c3c6
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22097 a592a061-630c-0410-9148-cb99ea01b6c8
64 lines
1.2 KiB
C++
64 lines
1.2 KiB
C++
/**
|
|
* \file tex2lyx/Font.cpp
|
|
* 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 "Font.h"
|
|
#include "Lexer.h"
|
|
#include "support/lstrings.h"
|
|
|
|
using namespace std;
|
|
|
|
namespace lyx {
|
|
|
|
using lyx::support::ascii_lowercase;
|
|
|
|
/// Sane font.
|
|
FontInfo const sane_font;
|
|
/// All inherit font.
|
|
FontInfo const inherit_font;
|
|
/// All ignore font.
|
|
FontInfo const ignore_font;
|
|
|
|
FontInfo lyxRead(Lexer & lex, FontInfo const &)
|
|
{
|
|
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 FontInfo();
|
|
}
|
|
|
|
|
|
} // namespace lyx
|