diff options
author | djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-05-31 19:55:08 +0000 |
---|---|---|
committer | djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-05-31 19:55:08 +0000 |
commit | 9714516a0db56fe1c59d5e831cb0c6d820102c30 (patch) | |
tree | 0c1038c9fb99ff78e32b5444a7f00a3d78f85000 /include | |
parent | dcdc1fccc5e1254e6aa4757e8c886ab80084f552 (diff) |
Add SkFontDescriptor for serializing fonts.
Review URL: https://codereview.appspot.com/6250080
git-svn-id: http://skia.googlecode.com/svn/trunk@4106 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkFontHost.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/core/SkFontHost.h b/include/core/SkFontHost.h index 732de5c3c7..fd01b5f201 100644 --- a/include/core/SkFontHost.h +++ b/include/core/SkFontHost.h @@ -118,12 +118,17 @@ public: /////////////////////////////////////////////////////////////////////////// /** Write a unique identifier to the stream, so that the same typeface can - be retrieved with Deserialize(). + be retrieved with Deserialize(). The standard format is to serialize + a SkFontDescriptor followed by a uint32_t length value. If the length + is non-zero then the following bytes (of that length) represent a + serialized copy of the font which can be recreated from a stream. */ static void Serialize(const SkTypeface*, SkWStream*); /** Given a stream created by Serialize(), return a new typeface (like - CreateTypeface) or return NULL if no match is found. + CreateTypeface) which is either an exact match to the one serialized + or the best available typeface based on the data in the deserialized + SkFontDescriptor. */ static SkTypeface* Deserialize(SkStream*); |