-// Set family according to lyx format string
-Font & Font::setLyXFamily(string const & fam)
-{
- string const s = ascii_lowercase(fam);
-
- int i = 0;
- while (LyXFamilyNames[i] != s &&
- LyXFamilyNames[i] != string("error"))
- ++i;
- if (s == LyXFamilyNames[i])
- setFamily(Font::FONT_FAMILY(i));
- else
- lyxerr << "Font::setLyXFamily: Unknown family `"
- << s << '\'' << endl;
- return *this;
-}
-
-
-// Set series according to lyx format string
-Font & Font::setLyXSeries(string const & ser)
-{
- string const s = ascii_lowercase(ser);
-
- int i = 0;
- while (LyXSeriesNames[i] != s &&
- LyXSeriesNames[i] != string("error")) ++i;
- if (s == LyXSeriesNames[i]) {
- setSeries(Font::FONT_SERIES(i));
- } else
- lyxerr << "Font::setLyXSeries: Unknown series `"
- << s << '\'' << endl;
- return *this;
-}
-
-
-// Set shape according to lyx format string
-Font & Font::setLyXShape(string const & sha)
-{
- string const s = ascii_lowercase(sha);
-
- int i = 0;
- while (LyXShapeNames[i] != s && LyXShapeNames[i] != string("error"))
- ++i;
- if (s == LyXShapeNames[i])
- setShape(Font::FONT_SHAPE(i));
- else
- lyxerr << "Font::setLyXShape: Unknown shape `"
- << s << '\'' << endl;
- return *this;
-}
-
-
-// Set size according to lyx format string
-Font & Font::setLyXSize(string const & siz)
-{
- string const s = ascii_lowercase(siz);
- int i = 0;
- while (LyXSizeNames[i] != s && LyXSizeNames[i] != string("error"))
- ++i;
- if (s == LyXSizeNames[i]) {
- setSize(Font::FONT_SIZE(i));
- } else
- lyxerr << "Font::setLyXSize: Unknown size `"
- << s << '\'' << endl;
- return *this;
-}
-
-
-// Set size according to lyx format string
-Font::FONT_MISC_STATE 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 FONT_MISC_STATE(i);
- lyxerr << "Font::setLyXMisc: Unknown misc flag `"
- << s << '\'' << endl;
- return OFF;
-}
-
-
-/// Sets color after LyX text format
-Font & Font::setLyXColor(string const & col)
-{
- setColor(lcolor.getFromLyXName(col));
- return *this;
-}
-
-