diff options
author | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-03 22:52:30 +0000 |
---|---|---|
committer | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-03 22:52:30 +0000 |
commit | fe05df7f93ea22d80f8d48c21ae2b7f0ec7982de (patch) | |
tree | 5fc6036d0a0232138411de078b91a099c024a18d /src/ports | |
parent | e26f2dd41a6e6a98d3f1287f38b7ffd4685401e3 (diff) |
Provide default guess at font type in Mac CoreText font host, since CT's detection is unreliable.
git-svn-id: http://skia.googlecode.com/svn/trunk@6658 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/ports')
-rw-r--r-- | src/ports/SkFontHost_mac_coretext.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ports/SkFontHost_mac_coretext.cpp b/src/ports/SkFontHost_mac_coretext.cpp index 5ad3b29794..73be6dccb8 100644 --- a/src/ports/SkFontHost_mac_coretext.cpp +++ b/src/ports/SkFontHost_mac_coretext.cpp @@ -1636,7 +1636,10 @@ static SK_SFNT_ULONG get_font_type_tag(SkFontID uniqueID) { return SkSFNTHeader::fontType_MacTrueType::TAG; case kCTFontFormatUnrecognized: default: - return 0; + //CT seems to be unreliable in being able to obtain the type, + //even if all we want is the first four bytes of the font resource. + //Just the presence of the FontForge 'FFTM' table seems to throw it off. + return SkSFNTHeader::fontType_WindowsTrueType::TAG; } } |