aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell Brenner <russellbrenner@google.com>2011-03-31 11:54:22 -0700
committerRussell Brenner <russellbrenner@google.com>2011-03-31 11:54:22 -0700
commit80a5f14e849a8ca34776d66cb0a4990de9acdb06 (patch)
tree4633c16f597e72ec68b9a9da39a9c86883ac48d5
parent8c4d7a6dc81ba9c684212ebc9af3a8cc039b8c36 (diff)
downloadexternal_skia-80a5f14e849a8ca34776d66cb0a4990de9acdb06.zip
external_skia-80a5f14e849a8ca34776d66cb0a4990de9acdb06.tar.gz
external_skia-80a5f14e849a8ca34776d66cb0a4990de9acdb06.tar.bz2
Add SkTypeface::isFixedWidth()
Change-Id: I95299278d98114ed4b01883d7da71d31d172a3d2
-rw-r--r--include/core/SkTypeface.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/core/SkTypeface.h b/include/core/SkTypeface.h
index bf783a3..8758772 100644
--- a/include/core/SkTypeface.h
+++ b/include/core/SkTypeface.h
@@ -56,6 +56,10 @@ public:
*/
bool isItalic() const { return (fStyle & kItalic) != 0; }
+ /** Returns true if the typeface is fixed-width
+ */
+ bool isFixedWidth() const { return fIsFixedWidth; }
+
/** Return a 32bit value for this typeface, unique for the underlying font
data. Will never return 0.
*/
@@ -121,12 +125,13 @@ public:
protected:
/** uniqueID must be unique (please!) and non-zero
*/
- SkTypeface(Style style, uint32_t uniqueID)
- : fUniqueID(uniqueID), fStyle(style) {}
+ SkTypeface(Style style, uint32_t uniqueID, bool isFixedWidth = false)
+ : fUniqueID(uniqueID), fStyle(style), fIsFixedWidth(isFixedWidth) {}
private:
uint32_t fUniqueID;
Style fStyle;
+ bool fIsFixedWidth;
typedef SkRefCnt INHERITED;
};