commit be2c12ba40b97ed61c020847f16c0f35726a4c27
Author: Enrico Forestieri <for...@lyx.org>
Date:   Thu Mar 4 11:58:44 2021 +0100

    Fix bug #9601
    
    Make sure emphasized text in mathed has correct shape and color.
---
 src/MetricsInfo.cpp |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/MetricsInfo.cpp b/src/MetricsInfo.cpp
index 809c0ce..9bab1a3 100644
--- a/src/MetricsInfo.cpp
+++ b/src/MetricsInfo.cpp
@@ -65,7 +65,13 @@ Changer MetricsBase::changeFontSet(string const & name)
        augmentFont(font, name);
        font.setSize(rc->old.font.size());
        font.setStyle(rc->old.font.style());
-       if (name != "lyxtex"
+       if (name == "emph") {
+               font.setColor(oldcolor);
+               if (rc->old.font.shape() != UP_SHAPE)
+                       font.setShape(UP_SHAPE);
+               else
+                       font.setShape(ITALIC_SHAPE);
+       } else if (name != "lyxtex"
            && ((isTextFont(oldname) && oldcolor != Color_foreground)
                || (isMathFont(oldname) && oldcolor != Color_math)))
                font.setColor(oldcolor);
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to