aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports/SkFontHost_mac_coretext.cpp
diff options
context:
space:
mode:
authorGravatar vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-03-02 21:11:54 +0000
committerGravatar vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-03-02 21:11:54 +0000
commit6a81b8a282dd388044c433a4c2d8e549e7402d01 (patch)
tree7b97f990e185f74e7bb80a937b10cdc52c60f156 /src/ports/SkFontHost_mac_coretext.cpp
parent05054f1a78a697b507580d0025db6c90423e033f (diff)
On Mac, also check for a loca table before calling a font true type.
Review URL: https://codereview.appspot.com/5720056 git-svn-id: http://skia.googlecode.com/svn/trunk@3311 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/ports/SkFontHost_mac_coretext.cpp')
-rw-r--r--src/ports/SkFontHost_mac_coretext.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ports/SkFontHost_mac_coretext.cpp b/src/ports/SkFontHost_mac_coretext.cpp
index c5ac27ee57..a612555219 100644
--- a/src/ports/SkFontHost_mac_coretext.cpp
+++ b/src/ports/SkFontHost_mac_coretext.cpp
@@ -1638,9 +1638,10 @@ SkAdvancedTypefaceMetrics* SkFontHost::GetAdvancedTypefaceMetrics(
info->fStyle = 0;
// If it's not a truetype font, mark it as 'other'. Assume that TrueType
- // fonts always have glyf tables. CTFontCopyAttribute() does not always
+ // fonts always have both glyf and loca tables. At the least, this is what
+ // sfntly needs to subset the font. CTFontCopyAttribute() does not always
// succeed in determining this directly.
- if (!GetTableSize(fontID, 'glyf')) {
+ if (!GetTableSize(fontID, 'glyf') || !GetTableSize(fontID, 'loca')) {
info->fType = SkAdvancedTypefaceMetrics::kOther_Font;
info->fItalicAngle = 0;
info->fAscent = 0;