Fix missing code to display italic / bold font names.
authorCarl Hetherington <cth@carlh.net>
Mon, 20 Jun 2016 18:28:03 +0000 (19:28 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 20 Jun 2016 18:28:03 +0000 (19:28 +0100)
ChangeLog
src/wx/fonts_dialog.cc

index c4aea87d53d926f38f5caa72b4e949dfcbe8c61e..414b189d8dd29132dc04be5db861b3d0e4af651e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2016-06-20  Carl Hetherington  <cth@carlh.net>
 
+       * Fix display of italic and bold font names in the fonts
+       dialogue.
+
        * Updated pt_BR translation from Max M. Fuhlendorf.
 
        * Fix various strange crashes with encoding servers.
index 9c03299143161c3d64783c6e6d0fdfd19ee71d6e..5c89372dfec816b8bb839c002eb87c7c49497c14 100644 (file)
@@ -110,8 +110,10 @@ FontsDialog::setup ()
                item.SetId (n);
                _fonts->InsertItem (item);
                _fonts->SetItem (n, 0, std_to_wx (i->id ()));
-               if (i->file(FontFiles::NORMAL)) {
-                       _fonts->SetItem (n, 1, i->file(FontFiles::NORMAL).get().leaf().string ());
+               for (int j = 0; j < FontFiles::VARIANTS; ++j) {
+                       if (i->file(static_cast<FontFiles::Variant>(j))) {
+                               _fonts->SetItem (n, j + 1, i->file(static_cast<FontFiles::Variant>(j)).get().leaf().string ());
+                       }
                }
                ++n;
        }