summaryrefslogtreecommitdiff
path: root/src/wx/hints_dialog.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-11-02 22:47:57 +0000
committerCarl Hetherington <cth@carlh.net>2015-11-02 22:47:57 +0000
commit9bf2cf3509380663e6943f6b0d22dbec6002c332 (patch)
tree86999381629818072353ffb15d78f5815efabf69 /src/wx/hints_dialog.cc
parent8a673bcf0cd26268899face63723c0f201fabcce (diff)
Fix incorrect preview of italic subtitles (#728).
This requires fonts to be configured with their italic versions so that the italic font can be given to FontConfig and hence used to render text. Bold font configuration is also added here although bold subtitles aren't yet supported.
Diffstat (limited to 'src/wx/hints_dialog.cc')
-rw-r--r--src/wx/hints_dialog.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/wx/hints_dialog.cc b/src/wx/hints_dialog.cc
index e15263670..a63c6be62 100644
--- a/src/wx/hints_dialog.cc
+++ b/src/wx/hints_dialog.cc
@@ -28,6 +28,7 @@
#include <boost/foreach.hpp>
using boost::shared_ptr;
+using boost::optional;
using boost::dynamic_pointer_cast;
HintsDialog::HintsDialog (wxWindow* parent, boost::weak_ptr<Film> film)
@@ -79,8 +80,11 @@ HintsDialog::film_changed ()
shared_ptr<SubtitleContent> s = dynamic_pointer_cast<SubtitleContent> (i);
if (s) {
BOOST_FOREACH (shared_ptr<Font> j, s->fonts ()) {
- if (j->file() && boost::filesystem::file_size (j->file().get ()) >= (640 * 1024)) {
- big_font_files = true;
+ for (int i = 0; i < FontFiles::VARIANTS; ++i) {
+ optional<boost::filesystem::path> const p = j->file (static_cast<FontFiles::Variant> (i));
+ if (p && boost::filesystem::file_size (p.get()) >= (640 * 1024)) {
+ big_font_files = true;
+ }
}
}
}