Mac to better serialize OTTO fonts.

Sometimes CoreText just gives up on filling out kCTFontFormatAttribute
properly, in which case we need a simple fallback for format detection
which isn't so reluctant to determine the type. The strategy prior to this
change is to use the most common type (WindowsTrueType), but apparently
if a font is actually an OpenType CFF font but has a WindowsTrueType tag
as the first few bytes, CoreGraphics gives up and won't load the font. So
check if there are any CFF tables and, if so, mark the font as
OpenTypeCFF.

BUG=skia:7630

Change-Id: Ie974e6db031db13628d5a19962e23ce2bf127367
Reviewed-on: https://skia-review.googlesource.com/118887
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
1 file changed