Remove ALL font fallback logic from Skia.
R=reed@google.com, bungeman@google.com, caryclark@google.com
Author: djsollen@google.com
Review URL: https://codereview.chromium.org/434623002
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp
index e2b0fe9..ef943aa 100644
--- a/src/ports/SkFontHost_FreeType.cpp
+++ b/src/ports/SkFontHost_FreeType.cpp
@@ -1115,7 +1115,7 @@
FT_Error error;
FT_Fixed advance;
- error = FT_Get_Advance( fFace, glyph->getGlyphID(fBaseGlyphCount),
+ error = FT_Get_Advance( fFace, glyph->getGlyphID(),
fLoadGlyphFlags | FT_ADVANCE_FLAG_FAST_ONLY,
&advance );
if (0 == error) {
@@ -1217,11 +1217,11 @@
goto ERROR;
}
- err = FT_Load_Glyph( fFace, glyph->getGlyphID(fBaseGlyphCount), fLoadGlyphFlags );
+ err = FT_Load_Glyph( fFace, glyph->getGlyphID(), fLoadGlyphFlags );
if (err != 0) {
#if 0
SkDEBUGF(("SkScalerContext_FreeType::generateMetrics(%x): FT_Load_Glyph(glyph:%d flags:%x) returned 0x%x\n",
- fFaceRec->fFontID, glyph->getGlyphID(fBaseGlyphCount), fLoadGlyphFlags, err));
+ fFaceRec->fFontID, glyph->getGlyphID(), fLoadGlyphFlags, err));
#endif
ERROR:
glyph->zeroMetrics();
@@ -1305,7 +1305,7 @@
#ifdef ENABLE_GLYPH_SPEW
SkDEBUGF(("FT_Set_Char_Size(this:%p sx:%x sy:%x ", this, fScaleX, fScaleY));
- SkDEBUGF(("Metrics(glyph:%d flags:0x%x) w:%d\n", glyph->getGlyphID(fBaseGlyphCount), fLoadGlyphFlags, glyph->fWidth));
+ SkDEBUGF(("Metrics(glyph:%d flags:0x%x) w:%d\n", glyph->getGlyphID(), fLoadGlyphFlags, glyph->fWidth));
#endif
}
@@ -1319,10 +1319,10 @@
goto ERROR;
}
- err = FT_Load_Glyph( fFace, glyph.getGlyphID(fBaseGlyphCount), fLoadGlyphFlags);
+ err = FT_Load_Glyph( fFace, glyph.getGlyphID(), fLoadGlyphFlags);
if (err != 0) {
SkDEBUGF(("SkScalerContext_FreeType::generateImage: FT_Load_Glyph(glyph:%d width:%d height:%d rb:%d flags:%d) returned 0x%x\n",
- glyph.getGlyphID(fBaseGlyphCount), glyph.fWidth, glyph.fHeight, glyph.rowBytes(), fLoadGlyphFlags, err));
+ glyph.getGlyphID(), glyph.fWidth, glyph.fHeight, glyph.rowBytes(), fLoadGlyphFlags, err));
ERROR:
memset(glyph.fImage, 0, glyph.rowBytes() * glyph.fHeight);
return;
@@ -1348,11 +1348,11 @@
flags |= FT_LOAD_NO_BITMAP; // ignore embedded bitmaps so we're sure to get the outline
flags &= ~FT_LOAD_RENDER; // don't scan convert (we just want the outline)
- FT_Error err = FT_Load_Glyph( fFace, glyph.getGlyphID(fBaseGlyphCount), flags);
+ FT_Error err = FT_Load_Glyph( fFace, glyph.getGlyphID(), flags);
if (err != 0) {
SkDEBUGF(("SkScalerContext_FreeType::generatePath: FT_Load_Glyph(glyph:%d flags:%d) returned 0x%x\n",
- glyph.getGlyphID(fBaseGlyphCount), flags, err));
+ glyph.getGlyphID(), flags, err));
path->reset();
return;
}