diff options
author | reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2009-04-14 14:28:22 +0000 |
---|---|---|
committer | reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2009-04-14 14:28:22 +0000 |
commit | 9781ca586618cc8ea055f54021e706824313d4f5 (patch) | |
tree | 2d6d4dffba13e109d846a049d21c0239f4acbf8f /bench | |
parent | fc3ac327d8e041e11049d7f0dfc7f491590cda75 (diff) |
add SkSfntUtils to parse some known truetype tables
add comments and cleanup to count_tables in SkFontHost_tables.cpp
fix transparency bug in gifs
use (alpha+1) for blending in srcover mode, to ensure opaque results
git-svn-id: http://skia.googlecode.com/svn/trunk@155 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench')
-rw-r--r-- | bench/TextBench.cpp | 17 |
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() { |