X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FFontInfo.cpp;h=9edf97e52e9e7ee56e63d9e7da738a502bec1595;hb=68b60ec529db2e7bfe642bd09902824ea69e2fb5;hp=e611288ff4422ef58d6b370b13162de02fd12bea;hpb=7cf8b9da78d2747e4bba25d7f103da422ae28a6f;p=lyx.git diff --git a/src/FontInfo.cpp b/src/FontInfo.cpp index e611288ff4..9edf97e52e 100644 --- a/src/FontInfo.cpp +++ b/src/FontInfo.cpp @@ -21,6 +21,7 @@ #include "support/debug.h" #include "support/docstring.h" #include "support/lstrings.h" +#include "support/RefChanger.h" #include #include @@ -245,6 +246,26 @@ FontInfo & FontInfo::realize(FontInfo const & tmplt) } +Changer FontInfo::changeColor(ColorCode const color, bool cond) +{ + return make_change(color_, color, cond); +} + + +Changer FontInfo::changeShape(FontShape const shape, bool cond) +{ + return make_change(shape_, shape, cond); +} + + +Changer FontInfo::change(FontInfo font, bool realiz, bool cond) +{ + if (realiz) + font.realize(*this); + return make_change(*this, font, cond); +} + + /// Updates a misc setting according to request static FontState setMisc(FontState newfont, FontState org)