diff options
author | 2014-09-24 11:04:41 -0700 | |
---|---|---|
committer | 2014-09-24 11:04:41 -0700 | |
commit | 7b09aab7130c174c6a2dd4becedbddaa6cf7945d (patch) | |
tree | 9c618e8db4d27b6a871e290491b912de55778192 /src/ports/SkFontHost_mac.cpp | |
parent | 2456b7681aea8d91072186b17f8209955846f2f7 (diff) |
Correct glyph with non-bmp from typeface on Mac.
CTFontGetGlyphsForChars puts the glyph id at the index of the lead
surrogate as is documented in comments, but the code is looking at
the index of the trail surrogate.
BUG=skia:2960
R=mtklein@google.com
Author: bungeman@google.com
Review URL: https://codereview.chromium.org/596413002
Diffstat (limited to 'src/ports/SkFontHost_mac.cpp')
-rwxr-xr-x | src/ports/SkFontHost_mac.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp index 5386ac3f3e..aae7464e25 100755 --- a/src/ports/SkFontHost_mac.cpp +++ b/src/ports/SkFontHost_mac.cpp @@ -1981,10 +1981,10 @@ int SkTypeface_Mac::onCharsToGlyphs(const void* chars, Encoding encoding, if (srcCount > glyphCount) { int extra = 0; for (int i = 0; i < glyphCount; ++i) { + compactedGlyphs[i] = macGlyphs[i + extra]; if (SkUTF16_IsHighSurrogate(src[i + extra])) { ++extra; } - compactedGlyphs[i] = macGlyphs[i + extra]; } } |