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 5f587c3137504c759df8ba29306e4e0b99fb0926..ad2c10a06b5c2af8d9c0bd84a582dc22c8bd8c5a 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;