[LyX/master] Fix bug #9601
Enrico Forestieri
forenr at lyx.org
Thu Mar 4 10:55:26 UTC 2021
commit be2c12ba40b97ed61c020847f16c0f35726a4c27
Author: Enrico Forestieri <forenr at 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);
More information about the lyx-cvs
mailing list