diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-17 21:55:08 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-17 21:55:08 +0000 |
commit | 6a4ba5b20590e377d42d3488a32cd5dd94355107 (patch) | |
tree | 85ef4be57285661cbf2a56d4b921df061fc3c2e3 /src | |
parent | 59e16e4e1d30eee3ce564e0b513d952579065cb3 (diff) |
[PDF] Use SkTypeface::countGlyphs instead of getAdvancedTypefaceMetrics
resubmit r10063
BUG=1088
R=bungeman@google.com
Author: vandebo@chromium.org
Review URL: https://chromiumcodereview.appspot.com/19668002
git-svn-id: http://skia.googlecode.com/svn/trunk@10133 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/pdf/SkPDFDevice.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index db0825af3a..a8fc3990d8 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -105,18 +105,7 @@ static void align_text(SkDrawCacheProc glyphCacheProc, const SkPaint& paint, static size_t max_glyphid_for_typeface(SkTypeface* typeface) { SkAutoResolveDefaultTypeface autoResolve(typeface); typeface = autoResolve.get(); - - SkAdvancedTypefaceMetrics* metrics; - metrics = typeface->getAdvancedTypefaceMetrics( - SkAdvancedTypefaceMetrics::kNo_PerGlyphInfo, - NULL, 0); - - int lastGlyphID = 0; - if (metrics) { - lastGlyphID = metrics->fLastGlyphID; - metrics->unref(); - } - return lastGlyphID; + return typeface->countGlyphs() - 1; } typedef SkAutoSTMalloc<128, uint16_t> SkGlyphStorage; |