]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/lyxfont.C
Really fix start_of_appendix output
[lyx.git] / src / tex2lyx / lyxfont.C
1 /**
2  * \file tex2lyx/lyxfont.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Angus Leeming
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "lyxfont.h"
14 #include "lyxlex.h"
15 #include "support/lstrings.h"
16
17 using lyx::support::ascii_lowercase;
18
19 using std::string;
20
21
22 LyXFont & LyXFont::lyxRead(LyXLex & lex)
23 {
24         bool error = false;
25         bool finished = false;
26         while (!finished && lex.isOK() && !error) {
27                 lex.next();
28                 string const tok = ascii_lowercase(lex.getString());
29
30                 if (tok.empty()) {
31                         continue;
32                 } else if (tok == "endfont") {
33                         finished = true;
34                 } else if (tok == "family") {
35                         lex.next();
36                 } else if (tok == "series") {
37                         lex.next();
38                 } else if (tok == "shape") {
39                         lex.next();
40                 } else if (tok == "size") {
41                         lex.next();
42                 } else if (tok == "misc") {
43                         lex.next();
44                 } else if (tok == "color") {
45                         lex.next();
46                 } else {
47                         lex.printError("Unknown tag `$$Token'");
48                         error = true;
49                 }
50         }
51         return *this;
52 }