Speculative attempt to disable sub-pixel anti-aliasing (i.e. ClearType) when renderin...
authorCarl Hetherington <cth@carlh.net>
Wed, 9 May 2018 22:38:53 +0000 (23:38 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 9 May 2018 22:38:53 +0000 (23:38 +0100)
src/lib/render_subtitles.cc

index 5f587c3..ad2c10a 100644 (file)
@@ -238,6 +238,11 @@ render_line (list<SubtitleString> subtitles, list<shared_ptr<Font> > fonts, dcp:
        layout->set_alignment (Pango::ALIGN_LEFT);
 
        context->set_line_width (1);
+       context->set_antialias (Cairo::ANTIALIAS_GRAY);
+       Cairo::FontOptions fo;
+       context->get_font_options (fo);
+       fo.set_antialias (Cairo::ANTIALIAS_GRAY);
+       context->set_font_options (fo);
 
        /* Compute fade factor */
        float fade_factor = 1;