From 000e13ef161a87befdf0d6aa197a337031475d1a Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Sat, 13 Jul 2013 17:24:30 +0000 Subject: [PATCH] [PDF] Use SkTypeface::countGlyphs instead of getAdvancedTypefaceMetrics BUG=1088 R=bungeman@google.com Author: vandebo@chromium.org Review URL: https://chromiumcodereview.appspot.com/18886005 git-svn-id: http://skia.googlecode.com/svn/trunk@10063 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/pdf/SkPDFDevice.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index db0825a..a8fc399 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; -- 2.7.4