-// Set family according to lyx format string
-void setLyXFamily(string const & fam, FontInfo & f)
-{
- string const s = ascii_lowercase(fam);
-
- int i = 0;
- while (LyXFamilyNames[i] != s &&
- LyXFamilyNames[i] != string("error"))
- ++i;
- if (s == LyXFamilyNames[i])
- f.setFamily(FontFamily(i));
- else
- lyxerr << "setLyXFamily: Unknown family `"
- << s << '\'' << endl;
-}
-
-
-// Set series according to lyx format string
-void setLyXSeries(string const & ser, FontInfo & f)
-{
- string const s = ascii_lowercase(ser);
-
- int i = 0;
- while (LyXSeriesNames[i] != s &&
- LyXSeriesNames[i] != string("error")) ++i;
- if (s == LyXSeriesNames[i]) {
- f.setSeries(FontSeries(i));
- } else
- lyxerr << "setLyXSeries: Unknown series `"
- << s << '\'' << endl;
-}
-
-
-// Set shape according to lyx format string
-void setLyXShape(string const & sha, FontInfo & f)
-{
- string const s = ascii_lowercase(sha);
-
- int i = 0;
- while (LyXShapeNames[i] != s && LyXShapeNames[i] != string("error"))
- ++i;
- if (s == LyXShapeNames[i])
- f.setShape(FontShape(i));
- else
- lyxerr << "Font::setLyXShape: Unknown shape `"
- << s << '\'' << endl;
-}
-
-
-// Set size according to lyx format string
-void setLyXSize(string const & siz, FontInfo & f)
-{
- string const s = ascii_lowercase(siz);
- int i = 0;
- while (LyXSizeNames[i] != s && LyXSizeNames[i] != string("error"))
- ++i;
- if (s == LyXSizeNames[i]) {
- f.setSize(FontSize(i));
- } else
- lyxerr << "Font::setLyXSize: Unknown size `"
- << s << '\'' << endl;
-}
-
-
-// Set size according to lyx format string
-FontState Font::setLyXMisc(string const & siz)
-{
- string const s = ascii_lowercase(siz);
- int i = 0;
- while (LyXMiscNames[i] != s &&
- LyXMiscNames[i] != string("error")) ++i;
- if (s == LyXMiscNames[i])
- return FontState(i);
- lyxerr << "Font::setLyXMisc: Unknown misc flag `"
- << s << '\'' << endl;
- return FONT_OFF;
-}
-
-
-/// Sets color after LyX text format
-void setLyXColor(string const & col, FontInfo & f)
-{
- f.setColor(lcolor.getFromLyXName(col));
-}
-
-