Set fLastGlyphID in SkFontHost::GetAdvancedTypefaceMetrics for windows.

Review URL: http://codereview.appspot.com/4178060

git-svn-id: http://skia.googlecode.com/svn/trunk@809 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
ctguil@chromium.org 2011-02-17 20:41:10 +00:00
parent c6cf72381b
commit 57c2b1de23

View File

@ -524,6 +524,7 @@ SkAdvancedTypefaceMetrics* SkFontHost::GetAdvancedTypefaceMetrics(
}
info->fEmSize = otm.otmEMSquare;
info->fMultiMaster = false;
info->fLastGlyphID = 0;
info->fStyle = 0;
// If this bit is clear the font is a fixed pitch font.
@ -578,6 +579,15 @@ SkAdvancedTypefaceMetrics* SkFontHost::GetAdvancedTypefaceMetrics(
} else if (perGlyphInfo) {
info->fGlyphWidths.reset(
getAdvanceData(hdc, SHRT_MAX, &getWidthAdvance));
// Obtain the last glyph index.
SkAdvancedTypefaceMetrics::WidthRange* last = info->fGlyphWidths.get();
if (last) {
while (last->fNext.get()) {
last = last->fNext.get();
}
info->fLastGlyphID = last->fEndId;
}
}
Error: