diff options
Diffstat (limited to 'src/ports/SkFontHost_win.cpp')
-rw-r--r-- | src/ports/SkFontHost_win.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp index 07d37aedfe..4ee8bb44fd 100644 --- a/src/ports/SkFontHost_win.cpp +++ b/src/ports/SkFontHost_win.cpp @@ -795,7 +795,7 @@ uint16_t SkScalerContext_GDI::generateCharToGlyph(SkUnichar utf32) { uint16_t index = 0; WCHAR utf16[2]; // TODO(ctguil): Support characters that generate more than one glyph. - if (SkUTF16_FromUnichar(utf32, (uint16_t*)utf16) == 1) { + if (SkUTF::ToUTF16(utf32, (uint16_t*)utf16) == 1) { // Type1 fonts fail with uniscribe API. Use GetGlyphIndices for plane 0. /** Real documentation for GetGlyphIndiciesW: @@ -2103,7 +2103,7 @@ int LogFontTypeface::onCharsToGlyphs(const void* chars, Encoding encoding, // Try a run of non-bmp. while (glyphIndex < glyphCount && currentChar > 0xFFFF) { - SkUTF16_FromUnichar(currentChar, reinterpret_cast<uint16_t*>(scratch)); + SkUTF::ToUTF16(currentChar, reinterpret_cast<uint16_t*>(scratch)); glyphs[glyphIndex] = nonBmpCharToGlyph(hdc, &sc, scratch); ++glyphIndex; if (glyphIndex < glyphCount) { @@ -2158,7 +2158,7 @@ int LogFontTypeface::onCharsToGlyphs(const void* chars, Encoding encoding, // Try a run of non-bmp. while (glyphIndex < glyphCount && utf32[glyphIndex] > 0xFFFF) { - SkUTF16_FromUnichar(utf32[glyphIndex], reinterpret_cast<uint16_t*>(scratch)); + SkUTF::ToUTF16(utf32[glyphIndex], reinterpret_cast<uint16_t*>(scratch)); glyphs[glyphIndex] = nonBmpCharToGlyph(hdc, &sc, scratch); ++glyphIndex; } |