Index: trunk/src/pdf/SkPDFDevice.cpp |
=================================================================== |
--- trunk/src/pdf/SkPDFDevice.cpp (revision 8138) |
+++ trunk/src/pdf/SkPDFDevice.cpp (working copy) |
@@ -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 @@ |
*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); |