diff options
author | Hal Canary <halcanary@google.com> | 2017-11-09 11:09:34 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-11-09 20:54:37 +0000 |
commit | 4a851ca334caac5e60606dbeb9ef6de77b34e24d (patch) | |
tree | 3422da4bc9a6ad97064503811ba65162309f5746 /src/ports/SkFontHost_mac.cpp | |
parent | f0da70699891bd3c6948d821fa43e0f48983e39e (diff) |
SkTypeface_win_dw, SkTypeface_Mac: set NotEmbeddable_FontFlag
BUG=skia:7275
BUG=skia:7276
Change-Id: I5376c39ddc3e9fcb1c8cb76001f3969b84bb2c96
Reviewed-on: https://skia-review.googlesource.com/69360
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'src/ports/SkFontHost_mac.cpp')
-rw-r--r-- | src/ports/SkFontHost_mac.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp index 57a37a11f7..5e753aebcf 100644 --- a/src/ports/SkFontHost_mac.cpp +++ b/src/ports/SkFontHost_mac.cpp @@ -1516,6 +1516,14 @@ std::unique_ptr<SkAdvancedTypefaceMetrics> SkTypeface_Mac::onGetAdvancedMetrics( populate_glyph_to_unicode(ctFont.get(), glyphCount, &info->fGlyphToUnicode); + SkOTTableOS2_V4::Type fsType; + if (sizeof(fsType) == this->getTableData(SkTEndian_SwapBE32(SkOTTableOS2::TAG), + offsetof(SkOTTableOS2_V4, fsType), + sizeof(fsType), + &fsType)) { + SkOTUtils::SetAdvanvedTypefaceFlags(fsType, info.get()); + } + // 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 |