]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/lyxfont.C
Removed all redundant using directives from the source.
[lyx.git] / src / tex2lyx / lyxfont.C
1 /**
2  * \file 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 namespace lyx::support;
18
19
20 LyXFont & LyXFont::lyxRead(LyXLex & lex)
21 {
22         bool error = false;
23         bool finished = false;
24         while (!finished && lex.isOK() && !error) {
25                 lex.next();
26                 string const tok = ascii_lowercase(lex.getString());
27
28                 if (tok.empty()) {
29                         continue;
30                 } else if (tok == "endfont") {
31                         finished = true;
32                 } else if (tok == "family") {
33                         lex.next();
34                 } else if (tok == "series") {
35                         lex.next();
36                 } else if (tok == "shape") {
37                         lex.next();
38                 } else if (tok == "size") {
39                         lex.next();
40                 } else if (tok == "misc") {
41                         lex.next();
42                 } else if (tok == "color") {
43                         lex.next();
44                 } else {
45                         lex.printError("Unknown tag `$$Token'");
46                         error = true;
47                 }
48         }
49         return *this;
50 }