From 4ad8be330e37b04db44c53a105653c81135772ec Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Tue, 25 Oct 2016 20:24:26 +0200 Subject: [PATCH] Show on screen font changes for text-in-math --- src/MetricsInfo.cpp | 6 ++++-- status.22x | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/MetricsInfo.cpp b/src/MetricsInfo.cpp index 2b954d3ed9..71d7a39de1 100644 --- a/src/MetricsInfo.cpp +++ b/src/MetricsInfo.cpp @@ -244,7 +244,8 @@ FontSetChanger::FontSetChanger(MetricsBase & mb, char const * name, ColorCode oldcolor = save_.font.color(); docstring const oldname = from_ascii(save_.fontname); mb.fontname = name; - mb.font = sane_font; + if (isMathFont(from_ascii(name)) || isMathFont(oldname)) + mb.font = sane_font; augmentFont(mb.font, from_ascii(name)); mb.font.setSize(oldsize); if (string(name) != "lyxtex" @@ -264,7 +265,8 @@ FontSetChanger::FontSetChanger(MetricsBase & mb, docstring const & name, ColorCode oldcolor = save_.font.color(); docstring const oldname = from_ascii(save_.fontname); mb.fontname = to_utf8(name); - mb.font = sane_font; + if (isMathFont(name) || isMathFont(oldname)) + mb.font = sane_font; augmentFont(mb.font, name); mb.font.setSize(oldsize); if (name != "lyxtex" diff --git a/status.22x b/status.22x index 612ea23257..6ce6dfee3b 100644 --- a/status.22x +++ b/status.22x @@ -87,6 +87,9 @@ What's new - Do not issue an error on missing characters in 'nullfont' (bug 10394). +- Fix on-screen display of font changes for text-in-math, so that now + $\textbf{\textsc{a}}$ is also boldened on screen other than in output. + * INTERNALS -- 2.39.5