[Commits] [wesnoth/wesnoth] c91b20: ttext: tweaks to rendering, especially on Windows

GitHub noreply at github.com
Sun Aug 7 09:58:52 UTC 2016


  Branch: refs/heads/ttext_tweaks
  Home:   https://github.com/wesnoth/wesnoth
  Commit: c91b200b7a10bf82fb13417a1267fcdf0fc4b2c1
      https://github.com/wesnoth/wesnoth/commit/c91b200b7a10bf82fb13417a1267fcdf0fc4b2c1
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2016-08-07 (Sun, 07 Aug 2016)

  Changed paths:
    M src/text.cpp

  Log Message:
  -----------
  ttext: tweaks to rendering, especially on Windows

This restores some code that wasn't being used on Windows to strip pre-multiplied alpha
from the text render before passing it to SDL_CreateRGBSurfaceFrom. Despite the code comment
to the contrary, enabling this code doesn't seem to mutilate the text output unless
pango_cairo_show_layout is called *after* stripping.

Unless I'm misunderstanding, pango_cairo_show_layout would get called 4 times on Windows.
Removing 3 of those calls meant the use of CAIRO_ANTIALIAS_GRAY as a fix for bug #21648
now resulted in horrible-looking text. Changing the AA method to CAIRO_ANTIALIAS_GRAY now
seems to produce acceptable results.

The resulting text is only slightly different from that produced before this change, though
very slightly more anti-aliased and a little grayer.





More information about the Commits mailing list