Font/Pango Text: add extra stroke to text outline to compensate for alpha weirdness

Also added the outline to the hash.
This commit is contained in:
Charles Dang 2017-07-17 12:34:44 +11:00
parent 1fd9a16a86
commit 8bb6f193a9
2 changed files with 1 additions and 5 deletions

View file

@ -690,10 +690,6 @@ void pango_text::render(PangoLayout& layout, const PangoRectangle& rect, const s
);
pango_cairo_show_layout(cr.get(), &layout);
// HACK: 'draw' text a second time in order to get desired output when copying w/ alpha blending.
// See bug #1744 for more info.
pango_cairo_show_layout(cr.get(), &layout);
}
void pango_text::rerender(const bool force)
@ -925,6 +921,7 @@ size_t hash<font::pango_text>::operator()(const font::pango_text& t) const
hash_combine(hash, t.maximum_height_);
hash_combine(hash, t.alignment_);
hash_combine(hash, t.ellipse_mode_);
hash_combine(hash, t.add_outline_);
return hash;
}

View file

@ -274,7 +274,6 @@ private:
/** The SDL surface to render upon used as a cache. */
mutable surface surface_;
/** The text to draw (stored as UTF-8). */
std::string text_;