aboutsummaryrefslogtreecommitdiffstats
path: root/include/core
diff options
context:
space:
mode:
authorPeter Eliasson <peter.eliasson.x@sonyericsson.com>2010-04-26 12:10:53 +0200
committerJean-Baptiste Queru <jbq@google.com>2010-05-11 10:27:47 -0700
commit2b910807112618cb20b689bc6ae20e0e211ed41c (patch)
tree1dda7487e4b0c88b80739210600f0eb817d32e0c /include/core
parent97615b8c5e62abbb520ab3d538f78b420994f6b4 (diff)
downloadexternal_skia-2b910807112618cb20b689bc6ae20e0e211ed41c.zip
external_skia-2b910807112618cb20b689bc6ae20e0e211ed41c.tar.gz
external_skia-2b910807112618cb20b689bc6ae20e0e211ed41c.tar.bz2
Added GetUnitsPerEM method to SkFontHost
GetUnitsPerEM can be used as convenience method to find out the number of font units per EM square without having to fetch the head table. Change-Id: I6f09b86a13e020ff74156571782f4bc822b7c1f3
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkFontHost.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/core/SkFontHost.h b/include/core/SkFontHost.h
index cb56772..eabaedf 100644
--- a/include/core/SkFontHost.h
+++ b/include/core/SkFontHost.h
@@ -262,6 +262,16 @@ public:
static void SetSubpixelOrder(LCDOrder order);
static LCDOrder GetSubpixelOrder();
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Return the number of font units per em.
+ *
+ * @param fontID the font to query.
+ * @return the number of font units per em or 0 on error.
+ */
+ static uint32_t GetUnitsPerEm(SkFontID fontID);
};
#endif