diff options
author | 2013-04-22 18:48:45 +0000 | |
---|---|---|
committer | 2013-04-22 18:48:45 +0000 | |
commit | f55061fd8453e8d2b33f1f05060fc443deee3222 (patch) | |
tree | cc80e6cd9d3283decf83e627f4199de47f05a40d /include | |
parent | 750a24bb3d39e59d32db3f166ad3f39c7560c0a9 (diff) |
check-point for linux fontmgr impl
Review URL: https://codereview.chromium.org/14305007
git-svn-id: http://skia.googlecode.com/svn/trunk@8808 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/ports/SkFontConfigInterface.h | 10 | ||||
-rw-r--r-- | include/ports/SkFontStyle.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/ports/SkFontConfigInterface.h b/include/ports/SkFontConfigInterface.h index 786c3468db..fb09242e84 100644 --- a/include/ports/SkFontConfigInterface.h +++ b/include/ports/SkFontConfigInterface.h @@ -49,11 +49,21 @@ public: fTTCIndex == other.fTTCIndex && fString == other.fString; } + bool operator!=(const FontIdentity& other) const { + return !(*this == other); + } uint32_t fID; int32_t fTTCIndex; SkString fString; SkFontStyle fStyle; + + // If buffer is NULL, just return the number of bytes that would have + // been written. Will pad contents to a multiple of 4. + size_t writeToMemory(void* buffer = NULL) const; + + // Recreate from a flattened buffer, returning the number of bytes read. + size_t readFromMemory(const void* buffer, size_t length); }; /** diff --git a/include/ports/SkFontStyle.h b/include/ports/SkFontStyle.h index ba4e4a0bf6..9d9a912d7d 100644 --- a/include/ports/SkFontStyle.h +++ b/include/ports/SkFontStyle.h @@ -50,6 +50,7 @@ public: int weight() const { return fUnion.fR.fWeight; } int width() const { return fUnion.fR.fWidth; } + Slant slant() const { return (Slant)fUnion.fR.fSlant; } bool isItalic() const { return kItalic_Slant == fUnion.fR.fSlant; |