Chromium Code Reviews| Index: src/ports/SkFontHost_FreeType.cpp |
| diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp |
| index 6681c9c1ef4f42b0a448cebf644a7c14ac6f6c0c..b6d609de07b4d3819c98306c833a6f8ed8f8dd78 100644 |
| --- a/src/ports/SkFontHost_FreeType.cpp |
| +++ b/src/ports/SkFontHost_FreeType.cpp |
| @@ -447,7 +447,11 @@ 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; |
| + if (0 == (*glyphToUnicode)[glyphIndex]) { |
| + // Use the first character that maps to this glyphID. |
| + // https://crbug.com/359065 |
|
bungeman-skia
2016/09/13 14:20:06
This comment should go above the the 'if' block.
hal.canary
2016/09/13 14:36:26
Done.
|
| + (*glyphToUnicode)[glyphIndex] = charCode; |
| + } |
| charCode = FT_Get_Next_Char(face, charCode, &glyphIndex); |
| } |
| } |