]> git.lyx.org Git - lyx.git/blobdiff - src/Font.cpp
Treat math style a bit more like other font features
[lyx.git] / src / Font.cpp
index bb0b54805b0508835e17b1c98b325c7bd01dc8cf..965a8309ef992da27e76503106e05f08add099df 100644 (file)
@@ -154,6 +154,7 @@ docstring const stateText(FontInfo const & f, bool const terse)
                os << _(GUIShapeNames[f.shape()]) << ", ";
        if (f.size() != FONT_SIZE_INHERIT && (!terse || f.size() != FONT_SIZE_IGNORE))
                os << _(GUISizeNames[f.size()]) << ", ";
+       // FIXME: shall style be handled there? Probably not.
        if (f.color() != Color_inherit && (!terse || f.color() != Color_ignore))
                os << lcolor.getGUIName(f.color()) << ", ";
        // FIXME: uncomment this when we support background.
@@ -174,7 +175,7 @@ docstring const stateText(FontInfo const & f, bool const terse)
        if (f.strikeout() != FONT_INHERIT && (!terse || f.strikeout() == FONT_ON))
                os << bformat(_("Strike out %1$s, "),
                              _(GUIMiscNames[f.strikeout()]));
-       if (f.xout() != FONT_INHERIT && (!terse || f.strikeout() == FONT_ON))
+       if (f.xout() != FONT_INHERIT && (!terse || f.xout() == FONT_ON))
                os << bformat(_("Cross out %1$s, "),
                              _(GUIMiscNames[f.xout()]));
        if (f.noun() != FONT_INHERIT && (!terse || f.noun() != FONT_IGNORE))
@@ -225,6 +226,7 @@ void Font::lyxWriteChanges(Font const & orgfont,
                os << "\\shape " << LyXShapeNames[bits_.shape()] << "\n";
        if (orgfont.fontInfo().size() != bits_.size())
                os << "\\size " << LyXSizeNames[bits_.size()] << "\n";
+       // FIXME: shall style be handled there? Probably not.
        if (orgfont.fontInfo().emph() != bits_.emph())
                os << "\\emph " << LyXMiscNames[bits_.emph()] << "\n";
        if (orgfont.fontInfo().number() != bits_.number())
@@ -662,7 +664,7 @@ bool Font::fromString(string const & data, bool & toggle)
                } else if (token == "size") {
                        int const next = lex.getInteger();
                        bits_.setSize(FontSize(next));
-
+               // FIXME: shall style be handled there? Probably not.
                } else if (token == "emph" || token == "underbar"
                        || token == "noun" || token == "number"
                        || token == "uuline" || token == "uwave"
@@ -808,6 +810,7 @@ ostream & operator<<(ostream & os, FontInfo const & f)
                << " series " << f.series()
                << " shape " << f.shape()
                << " size " << f.size()
+               << " style " << f.style()
                << " color " << f.color()
                // FIXME: uncomment this when we support background.
                //<< " background " << f.background()