commit b0963b1b60f24b1fed38f16cc2d3dab06b9a43a3
Author: Richard Heck <[email protected]>
Date:   Mon Jul 18 13:53:40 2016 -0400

    Fix cut and paste error in last commit.
    
    Also, we can just realize the font ourselves here.
---
 src/frontends/qt4/GuiFontLoader.cpp |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/frontends/qt4/GuiFontLoader.cpp 
b/src/frontends/qt4/GuiFontLoader.cpp
index 148677b..cc092f5 100644
--- a/src/frontends/qt4/GuiFontLoader.cpp
+++ b/src/frontends/qt4/GuiFontLoader.cpp
@@ -104,13 +104,12 @@ GuiFontInfo & fontinfo(FontInfo const & f)
         // We can reset the font to something sensible in release mode.
         LATTEST(false);
         LYXERR0("Unrealized font!");
-        // We could be fancier here, if we wanted, and just fix things where
-        // there is a problem. But it doesn't seem worth it, since we should
-        // not be here in the first place.
+        FontInfo f2 = f;
+        f2.realize(sane_font);
         GuiFontInfo * & fi =
-            
fontinfo_[sane_font.family()][sane_font.series()][sane_font.realShape()][sane_font.size()];
+            fontinfo_[f2.family()][f2.series()][f2.realShape()][f2.size()];
         if (!fi)
-            fi = new GuiFontInfo(f);
+            fi = new GuiFontInfo(f2);
         return *fi;
     }
        // fi is a reference to the pointer type (GuiFontInfo *) in the

Reply via email to