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:
parent
c6cf72381b
commit
57c2b1de23
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user