summaryrefslogtreecommitdiff
path: root/src/lib/render_subtitles.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-02-15 15:17:32 +0000
committerCarl Hetherington <cth@carlh.net>2016-02-15 22:34:57 +0000
commit9e8d6f0a2a63ce2ce11cbda8b6dde06664871000 (patch)
treee604748ea49c0b7225fafbd5b645e34cde4c9dd2 /src/lib/render_subtitles.cc
parent6fde557864505b470c438e4161ee494f29b90d63 (diff)
Fix scaling of subtitles to be more correct when stretching the fonts.
Diffstat (limited to 'src/lib/render_subtitles.cc')
-rw-r--r--src/lib/render_subtitles.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/render_subtitles.cc b/src/lib/render_subtitles.cc
index dd8e8870b..ed7d131fd 100644
--- a/src/lib/render_subtitles.cc
+++ b/src/lib/render_subtitles.cc
@@ -208,9 +208,8 @@ render_line (list<dcp::SubtitleString> subtitles, list<shared_ptr<Font> > fonts,
/* XXX */
float fade_factor = 1;
- layout->update_from_cairo_context (context);
-
context->scale (xscale, yscale);
+ layout->update_from_cairo_context (context);
if (subtitles.front().effect() == dcp::SHADOW) {
/* Drop-shadow effect */
@@ -241,6 +240,8 @@ render_line (list<dcp::SubtitleString> subtitles, list<shared_ptr<Font> > fonts,
int layout_width;
int layout_height;
layout->get_pixel_size (layout_width, layout_height);
+ layout_width *= xscale;
+ layout_height *= yscale;
int x = 0;
switch (subtitles.front().h_align ()) {