diff options
Diffstat (limited to 'src/ports/SkFontHost_mac_coretext.cpp')
-rw-r--r-- | src/ports/SkFontHost_mac_coretext.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ports/SkFontHost_mac_coretext.cpp b/src/ports/SkFontHost_mac_coretext.cpp index f49185fb34..118ef50edc 100644 --- a/src/ports/SkFontHost_mac_coretext.cpp +++ b/src/ports/SkFontHost_mac_coretext.cpp @@ -1858,11 +1858,20 @@ void SkFontHost::Serialize(const SkTypeface* face, SkWStream* stream) { desc.setPostscriptName(get_str(CTFontCopyPostScriptName(ctFont), &tmpStr)); desc.serialize(stream); + + // by convention, we also write out the actual sfnt data, preceeded by + // a packed-length. For now we skip that, so we just write the zero. + stream->writePackedUInt(0); } SkTypeface* SkFontHost::Deserialize(SkStream* stream) { SkFontDescriptor desc(stream); + // by convention, Serialize will have also written the actual sfnt data. + // for now, we just want to skip it. + size_t size = stream->readPackedUInt(); + stream->skip(size); + return SkFontHost::CreateTypeface(NULL, desc.getFamilyName(), desc.getStyle()); } |