diff options
Diffstat (limited to 'src/ports/SkFontHost_FreeType.cpp')
-rw-r--r-- | src/ports/SkFontHost_FreeType.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp index 6681c9c1ef..84a74af469 100644 --- a/src/ports/SkFontHost_FreeType.cpp +++ b/src/ports/SkFontHost_FreeType.cpp @@ -447,7 +447,10 @@ static void populate_glyph_to_unicode(FT_Face& face, SkTDArray<SkUnichar>* glyph SkUnichar charCode = FT_Get_First_Char(face, &glyphIndex); while (glyphIndex) { SkASSERT(glyphIndex < SkToUInt(numGlyphs)); - (*glyphToUnicode)[glyphIndex] = charCode; + // Use the first character that maps to this glyphID. https://crbug.com/359065 + if (0 == (*glyphToUnicode)[glyphIndex]) { + (*glyphToUnicode)[glyphIndex] = charCode; + } charCode = FT_Get_Next_Char(face, charCode, &glyphIndex); } } |