diff options
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; |