summaryrefslogtreecommitdiff
path: root/src/lib/player.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-08-23 18:08:59 +0100
committerCarl Hetherington <cth@carlh.net>2015-08-23 18:08:59 +0100
commitea8d9e93091cd54d252b3c4069d1dba7060e4f75 (patch)
treee158c2b16215cf5de2b7a59e3ab8d377a03600a3 /src/lib/player.cc
parent13b2078ca72921b20719374a07561a6167c77f70 (diff)
Use the correct font to render subtitles in preview / burn-in (#663).
Diffstat (limited to 'src/lib/player.cc')
-rw-r--r--src/lib/player.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index d55c8d396..48b298ff7 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -213,6 +213,7 @@ Player::playlist_content_changed (weak_ptr<Content> w, int property, bool freque
property == SubtitleContentProperty::SUBTITLE_Y_OFFSET ||
property == SubtitleContentProperty::SUBTITLE_X_SCALE ||
property == SubtitleContentProperty::SUBTITLE_Y_SCALE ||
+ property == SubtitleContentProperty::FONTS ||
property == VideoContentProperty::VIDEO_CROP ||
property == VideoContentProperty::VIDEO_SCALE ||
property == VideoContentProperty::VIDEO_FRAME_RATE ||
@@ -339,7 +340,7 @@ Player::get_video (DCPTime time, bool accurate)
/* Text subtitles (rendered to an image) */
if (!ps.text.empty ()) {
- list<PositionImage> s = render_subtitles (ps.text, _video_container_size);
+ list<PositionImage> s = render_subtitles (ps.text, ps.fonts, _video_container_size);
copy (s.begin (), s.end (), back_inserter (sub_images));
}
@@ -606,6 +607,7 @@ Player::get_subtitles (DCPTime time, DCPTime length, bool starting, bool burnt)
s.set_aspect_adjust (xs / ys);
}
ps.text.push_back (s);
+ ps.add_fonts (subtitle_content->fonts ());
}
}
}