Bug 1562316 - Fix emoji rendering on android webrender. r=lsalzman

ScaledFontFreeType::GetWRFontInstanceOptions() was neglecting to set
the FontInstanceFlags::EMBEDDED_BITMAPS flag. This was causing us to
always take the non-bitmap path when rasterizing the glyph, which
fails on android because emoji fonts are bitmap only. Setting this
flag causes glyphs to be rendered correctly on android webrender.

Differential Revision: https://phabricator.services.mozilla.com/D40062
This commit is contained in:
Jamie Nicol committed 2019-07-31 15:43:52 +00:00
1 parent 93f189e818
commit 19038298ef
1 file changed
+1
+1
View File
@@ -57,6 +57,7 @@ bool ScaledFontFreeType::GetWRFontInstanceOptions(
// FIXME: Cairo-FT metrics are not compatible with subpixel positioning.
// options.flags = wr::FontInstanceFlags_SUBPIXEL_POSITION;
options.flags = wr::FontInstanceFlags{0};
options.flags |= wr::FontInstanceFlags_EMBEDDED_BITMAPS;
options.bg_color = wr::ToColorU(Color());
options.synthetic_italics =
wr::DegreesToSyntheticItalics(GetSyntheticObliqueAngle());