| Index: src/ports/SkFontHost_mac.cpp
|
| diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp
|
| index 26d30d726a277a7888f8ca82ec2bf03277a97014..e00b87b59b4b6d62a8e13c8dc80cc8444ad435fa 100755
|
| --- a/src/ports/SkFontHost_mac.cpp
|
| +++ b/src/ports/SkFontHost_mac.cpp
|
| @@ -1544,17 +1544,16 @@ SkAdvancedTypefaceMetrics* SkTypeface_Mac::onGetAdvancedTypefaceMetrics(
|
| CFStringToSkString(fontName, &info->fFontName);
|
| }
|
|
|
| - info->fMultiMaster = false;
|
| CFIndex glyphCount = CTFontGetGlyphCount(ctFont);
|
| info->fLastGlyphID = SkToU16(glyphCount - 1);
|
| info->fEmSize = CTFontGetUnitsPerEm(ctFont);
|
| + info->fFlags = SkAdvancedTypefaceMetrics::kEmpty_FontFlag;
|
| + info->fStyle = 0;
|
|
|
| if (perGlyphInfo & SkAdvancedTypefaceMetrics::kToUnicode_PerGlyphInfo) {
|
| populate_glyph_to_unicode(ctFont, glyphCount, &info->fGlyphToUnicode);
|
| }
|
|
|
| - info->fStyle = 0;
|
| -
|
| // If it's not a truetype font, mark it as 'other'. Assume that TrueType
|
| // fonts always have both glyf and loca tables. At the least, this is what
|
| // sfntly needs to subset the font. CTFontCopyAttribute() does not always
|
| @@ -1618,10 +1617,7 @@ SkAdvancedTypefaceMetrics* SkTypeface_Mac::onGetAdvancedTypefaceMetrics(
|
| }
|
| }
|
|
|
| - if (false) { // TODO: haven't figured out how to know if font is embeddable
|
| - // (information is in the OS/2 table)
|
| - info->fType = SkAdvancedTypefaceMetrics::kNotEmbeddable_Font;
|
| - } else if (perGlyphInfo & SkAdvancedTypefaceMetrics::kHAdvance_PerGlyphInfo) {
|
| + if (perGlyphInfo & SkAdvancedTypefaceMetrics::kHAdvance_PerGlyphInfo) {
|
| if (info->fStyle & SkAdvancedTypefaceMetrics::kFixedPitch_Style) {
|
| skia_advanced_typeface_metrics_utils::appendRange(&info->fGlyphWidths, 0);
|
| info->fGlyphWidths->fAdvance.append(1, &min_width);
|
|
|