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
This commit is contained in:
bungeman@google.com 2012-12-03 22:52:30 +00:00
parent e26f2dd41a
commit fe05df7f93

View File

@ -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;
}
}