aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/TextBench.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bench/TextBench.cpp')
-rw-r--r--bench/TextBench.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/bench/TextBench.cpp b/bench/TextBench.cpp
index adbd96281b..ebd2b33215 100644
--- a/bench/TextBench.cpp
+++ b/bench/TextBench.cpp
@@ -3,6 +3,7 @@
#include "SkFontHost.h"
#include "SkPaint.h"
#include "SkRandom.h"
+#include "SkSfntUtils.h"
#include "SkString.h"
#include "SkTemplates.h"
@@ -22,6 +23,22 @@ static void dump_font(const char name[], SkFontID fontID) {
uint8_t(tag>>24), uint8_t(tag>>16), uint8_t(tag>>8), uint8_t(tag),
size, bytes, data[0], data[1], data[2], data[3]);
}
+
+ SkSfntTable_head head;
+ if (SkSfntUtils::ReadTable_head(fontID, &head)) {
+ SkDebugf("--- head: version=%x magic=%x upem=%d style=%x\n", head.fVersion,
+ head.fMagicNumber, head.fUnitsPerEm, head.fMacStyle);
+ } else {
+ SkDebugf("------- head wasn't read\n");
+ }
+
+ SkSfntTable_maxp maxp;
+ if (SkSfntUtils::ReadTable_maxp(fontID, &maxp)) {
+ SkDebugf("--- maxp: version=%x glyphs=%d points=%d ctrs=%d\n", maxp.fVersion,
+ maxp.fNumGlyphs, maxp.fMaxPoints, maxp.fMaxContours);
+ } else {
+ SkDebugf("------- maxp wasn't read\n");
+ }
}
static void test_tables() {