]> git.lyx.org Git - features.git/commitdiff
Fix cut and paste error in last commit.
authorRichard Heck <rgheck@lyx.org>
Mon, 18 Jul 2016 17:53:40 +0000 (13:53 -0400)
committerRichard Heck <rgheck@lyx.org>
Mon, 18 Jul 2016 17:53:40 +0000 (13:53 -0400)
Also, we can just realize the font ourselves here.

src/frontends/qt4/GuiFontLoader.cpp

index 148677b5fb4f10848c558584033ae01423b44b38..cc092f5f72ae6f6d60036d26b9132387e4f193dc 100644 (file)
@@ -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