diff options
author | 2013-03-14 15:04:57 +0000 | |
---|---|---|
committer | 2013-03-14 15:04:57 +0000 | |
commit | fed86bdb8b9f037439bbfa7cdbd53a581dbc5985 (patch) | |
tree | b03a35f11ee303aed8cd9c3c6210b22ba463c2dc /src/pdf/SkPDFDevice.cpp | |
parent | a936e37cc76614868f5b489395bceeb340cc04cd (diff) |
move most of SkFontHost to private (preceeding making it all private)
In this change, have to accomodate PDF wanting to call openStream and advancedMetrics
Review URL: https://codereview.chromium.org/12739006
git-svn-id: http://skia.googlecode.com/svn/trunk@8156 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/pdf/SkPDFDevice.cpp')
-rw-r--r-- | src/pdf/SkPDFDevice.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index be1bca5915..8f0f3d255e 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2011 Google Inc. * @@ -6,7 +5,6 @@ * found in the LICENSE file. */ - #include "SkPDFDevice.h" #include "SkAnnotation.h" @@ -30,8 +28,7 @@ #include "SkString.h" #include "SkTextFormatParams.h" #include "SkTemplates.h" -#include "SkTypeface.h" -#include "SkTypes.h" +#include "SkTypefacePriv.h" // Utility functions @@ -104,10 +101,12 @@ static void align_text(SkDrawCacheProc glyphCacheProc, const SkPaint& paint, *y = *y - yAdj; } -static size_t max_glyphid_for_typeface(const SkTypeface* typeface) { +static size_t max_glyphid_for_typeface(SkTypeface* typeface) { + SkAutoResolveDefaultTypeface autoResolve(typeface); + typeface = autoResolve.get(); + SkAdvancedTypefaceMetrics* metrics; - metrics = SkFontHost::GetAdvancedTypefaceMetrics( - SkTypeface::UniqueID(typeface), + metrics = typeface->getAdvancedTypefaceMetrics( SkAdvancedTypefaceMetrics::kNo_PerGlyphInfo, NULL, 0); |