Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Unified Diff: src/ports/SkFontHost_FreeType.cpp

Issue 411313002: Colored Emoji not drawn in Chrome if font style is set as Bold (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixing typo error Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/core/SkScalerContext.h ('K') | « src/core/SkScalerContext.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontHost_FreeType.cpp
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp
index e2b0fe9ae6b9f640bed76ea3d86b671602098d12..5ebe483af2393a98b24b17b6eb21409aa7657329 100644
--- a/src/ports/SkFontHost_FreeType.cpp
+++ b/src/ports/SkFontHost_FreeType.cpp
@@ -1022,6 +1022,7 @@ SkScalerContext_FreeType::SkScalerContext_FreeType(SkTypeface* typeface,
if (fStrikeIndex == -1) {
SkDEBUGF(("no glyphs for font \"%s\" size %f?\n",
fFace->family_name, SkFixedToScalar(fScaleY)));
+ updateImageFromPath(true);
reed1 2014/09/05 13:29:42 nit: prefix method calls with this->
h.joshi 2014/09/05 14:06:31 Done.
} else {
// FreeType does no provide linear metrics for bitmap fonts.
linearMetrics = false;
@@ -1033,6 +1034,7 @@ SkScalerContext_FreeType::SkScalerContext_FreeType(SkTypeface* typeface,
// However, in FreeType 2.5.1 color bitmap only fonts do not ignore this flag.
// Force this flag off for bitmap only fonts.
fLoadGlyphFlags &= ~FT_LOAD_NO_BITMAP;
+ updateImageFromPath(false);
}
} else {
SkDEBUGF(("unknown kind of font \"%s\" size %f?\n",
@@ -1260,8 +1262,10 @@ void SkScalerContext_FreeType::generateMetrics(SkGlyph* glyph) {
}
if (fFace->glyph->bitmap.pixel_mode == FT_PIXEL_MODE_BGRA) {
+ updateImageFromPath(false);
glyph->fMaskFormat = SkMask::kARGB32_Format;
- }
+ } else
+ updateImageFromPath(true);
glyph->fWidth = SkToU16(fFace->glyph->bitmap.width);
glyph->fHeight = SkToU16(fFace->glyph->bitmap.rows);
« src/core/SkScalerContext.h ('K') | « src/core/SkScalerContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698