Remove code only used by SkCreateTypefaceForScript which has already been deleted
R=tomhudson@google.com, bungeman@google.com Author: djsollen@google.com Review URL: https://codereview.chromium.org/425753002
This commit is contained in:
parent
a98683bc50
commit
5a27f49a87
@ -101,8 +101,6 @@ public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SkTypeface* getTypefaceForChar(SkUnichar uni, SkTypeface::Style style,
|
||||
SkPaintOptionsAndroid::FontVariant fontVariant);
|
||||
SkTypeface* nextLogicalTypeface(SkFontID currFontID, SkFontID origFontID,
|
||||
const SkPaintOptionsAndroid& options);
|
||||
SkTypeface* getTypefaceForGlyphID(uint16_t glyphID, const SkTypeface* origTypeface,
|
||||
@ -547,32 +545,6 @@ bool SkFontConfigInterfaceAndroid::getFallbackFamilyNameForChar(SkUnichar uni,
|
||||
return false;
|
||||
}
|
||||
|
||||
SkTypeface* SkFontConfigInterfaceAndroid::getTypefaceForChar(SkUnichar uni,
|
||||
SkTypeface::Style style,
|
||||
SkPaintOptionsAndroid::FontVariant fontVariant) {
|
||||
FontRecID fontRecID = find_best_style(fFontFamilies[fDefaultFamilyRecID], style);
|
||||
SkTypeface* face = this->getTypefaceForFontRec(fontRecID);
|
||||
|
||||
SkPaintOptionsAndroid paintOptions;
|
||||
paintOptions.setFontVariant(fontVariant);
|
||||
paintOptions.setUseFontFallbacks(true);
|
||||
|
||||
SkPaint paint;
|
||||
paint.setTypeface(face);
|
||||
paint.setTextEncoding(SkPaint::kUTF16_TextEncoding);
|
||||
paint.setPaintOptionsAndroid(paintOptions);
|
||||
|
||||
SkAutoGlyphCache autoCache(paint, NULL, NULL);
|
||||
SkGlyphCache* cache = autoCache.getCache();
|
||||
|
||||
SkScalerContext* ctx = cache->getScalerContext();
|
||||
if (ctx) {
|
||||
SkFontID fontID = ctx->findTypefaceIdForChar(uni);
|
||||
return SkTypefaceCache::FindByID(fontID);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
FallbackFontList* SkFontConfigInterfaceAndroid::getCurrentLocaleFallbackFontList() {
|
||||
SkString locale = SkFontConfigParser::GetLocale();
|
||||
if (NULL == fLocaleFallbackFontList || locale != fCachedLocale) {
|
||||
|
Loading…
Reference in New Issue
Block a user