commit | b8aa4ddb2d8b2542b3fa4df28888bcd0fee51bd4 | [log] [tgz] |
---|---|---|
author | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | Tue Oct 15 18:50:00 2013 +0000 |
committer | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | Tue Oct 15 18:50:00 2013 +0000 |
tree | 8d0047dc8892eac89d4bcf52593f8fc37948fac9 | |
parent | 62c6fa78aa411ba943a0555d6b0a8a1f9dd0dfc3 [diff] |
Fix off by one error in last advanceCount in SkFontHost_FreeType. R=robertphillips@google.com Review URL: https://codereview.chromium.org/27338003 git-svn-id: http://skia.googlecode.com/svn/trunk@11781 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp index 8d6c4d0..eb2f28a 100644 --- a/src/ports/SkFontHost_FreeType.cpp +++ b/src/ports/SkFontHost_FreeType.cpp
@@ -605,7 +605,7 @@ FT_Fixed advances[128]; int advanceCount = 128; if (gID + advanceCount > face->num_glyphs) - advanceCount = face->num_glyphs - gID + 1; + advanceCount = face->num_glyphs - gID; getAdvances(face, gID, advanceCount, FT_LOAD_NO_SCALE, advances); for (int i = 0; i < advanceCount; i++) {