summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-06-20 19:28:03 +0100
committerCarl Hetherington <cth@carlh.net>2016-06-20 19:28:03 +0100
commitb1387d5e333ec56bfd39c9e1cd92279ca244688d (patch)
treed73338b91e5d98bdc40ab183c02c0a3470f2e2cc
parent76a85334b95212f095dcc08086dcb3e52d4dd127 (diff)
Fix missing code to display italic / bold font names.
-rw-r--r--ChangeLog3
-rw-r--r--src/wx/fonts_dialog.cc6
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c4aea87d5..414b189d8 100644
--- 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.
diff --git a/src/wx/fonts_dialog.cc b/src/wx/fonts_dialog.cc
index 9c0329914..5c89372df 100644
--- a/src/wx/fonts_dialog.cc
+++ b/src/wx/fonts_dialog.cc
@@ -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;
}