Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Unified Diff: trunk/src/pdf/SkPDFDevice.cpp

Issue 12739006: move most of SkFontHost to private (preceeding making it all private) (Closed) Base URL: http://skia.googlecode.com/svn/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698