don't use paint to perform char-to-glyph

Bug: skia:
Change-Id: I195a6dd6a9b94b4314adc4641c188d12dd052576
Reviewed-on: https://skia-review.googlesource.com/c/180377
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
This commit is contained in:
Mike Reed 2019-01-02 13:44:39 -05:00 committed by Skia Commit-Bot
parent 344d34d1aa
commit 65528abad4

View File

@ -397,13 +397,7 @@ protected:
continue;
}
SkPaint paint;
paint.setTypeface(face);
paint.setTextEncoding(kUTF32_SkTextEncoding);
uint16_t glyphID;
paint.textToGlyphs(&character, sizeof(character), &glyphID);
if (glyphID != 0) {
if (face->unicharToGlyph(character) != 0) {
return face;
}
}