Port change r2040 to mac
This is to honor fixed width font during PDF generation. Change r2040 fixed only Windows port. Linux does not have the problem. Review URL: http://codereview.appspot.com/4855046 git-svn-id: http://skia.googlecode.com/svn/trunk@2076 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
04c643b773
commit
66f2e33651
@ -820,8 +820,15 @@ SkAdvancedTypefaceMetrics* SkFontHost::GetAdvancedTypefaceMetrics(
|
||||
info->fType = SkAdvancedTypefaceMetrics::kNotEmbeddable_Font;
|
||||
} else if (perGlyphInfo &
|
||||
SkAdvancedTypefaceMetrics::kHAdvance_PerGlyphInfo) {
|
||||
info->fGlyphWidths.reset(
|
||||
getAdvanceData(ctFont, glyphCount, &getWidthAdvance));
|
||||
if (info->fStyle & SkAdvancedTypefaceMetrics::kFixedPitch_Style) {
|
||||
appendRange(&info->fGlyphWidths, 0);
|
||||
info->fGlyphWidths->fAdvance.append(1, &min_width);
|
||||
finishRange(info->fGlyphWidths.get(), 0,
|
||||
SkAdvancedTypefaceMetrics::WidthRange::kDefault);
|
||||
} else {
|
||||
info->fGlyphWidths.reset(
|
||||
getAdvanceData(ctFont, glyphCount, &getWidthAdvance));
|
||||
}
|
||||
}
|
||||
|
||||
CFSafeRelease(ctFont);
|
||||
|
Loading…
Reference in New Issue
Block a user