From 58d2a72afad28a991f5dead5e5275b2fdca40607 Mon Sep 17 00:00:00 2001 From: Hal Canary Date: Wed, 11 Jan 2017 13:26:43 -0500 Subject: SkTestTypeface: correct encoding Change-Id: I6ef875fc44278b873989d323dd26f6ed26b68f28 Reviewed-on: https://skia-review.googlesource.com/6889 Commit-Queue: Hal Canary Reviewed-by: Cary Clark --- src/fonts/SkTestScalerContext.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/fonts') diff --git a/src/fonts/SkTestScalerContext.cpp b/src/fonts/SkTestScalerContext.cpp index d84571d310..fce249feb9 100644 --- a/src/fonts/SkTestScalerContext.cpp +++ b/src/fonts/SkTestScalerContext.cpp @@ -171,8 +171,8 @@ void SkTestTypeface::onGetFontDescriptor(SkFontDescriptor* desc, bool* isLocal) } int SkTestTypeface::onCharsToGlyphs(const void* chars, Encoding encoding, - uint16_t glyphs[], int glyphCount) const { - SkASSERT(encoding == kUTF16_Encoding); + uint16_t glyphs[], int glyphCount) const { + SkASSERT(encoding == kUTF32_Encoding); for (int index = 0; index < glyphCount; ++index) { SkUnichar ch = ((SkUnichar*) chars)[index]; glyphs[index] = fTestFont->codeToIndex(ch); @@ -214,7 +214,7 @@ protected: uint16_t generateCharToGlyph(SkUnichar uni) override { uint16_t glyph; (void) this->getTestTypeface()->onCharsToGlyphs((const void *) &uni, - SkTypeface::kUTF16_Encoding, &glyph, 1); + SkTypeface::kUTF32_Encoding, &glyph, 1); return glyph; } -- cgit v1.2.3