move getAdvancedTypefaceMetrics into private, as only skia internals call it
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 27 Jan 2014 21:02:14 +0000 (21:02 +0000)
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 27 Jan 2014 21:02:14 +0000 (21:02 +0000)
BUG=skia:
R=bungeman@google.com, vandebo@chromium.org

Review URL: https://codereview.chromium.org/148583002

git-svn-id: http://skia.googlecode.com/svn/trunk@13206 2bbb7eff-a529-9590-31e7-b0007b416f81

include/core/SkTypeface.h

index 04838da..0be97eb 100644 (file)
@@ -134,21 +134,6 @@ public:
      */
     static SkTypeface* Deserialize(SkStream*);
 
-    /** Retrieve detailed typeface metrics.  Used by the PDF backend.
-        @param perGlyphInfo Indicate what glyph specific information (advances,
-                            names, etc.) should be populated.
-        @param glyphIDs  For per-glyph info, specify subset of the font by
-                         giving glyph ids.  Each integer represents a glyph
-                         id.  Passing NULL means all glyphs in the font.
-        @param glyphIDsCount Number of elements in subsetGlyphIds. Ignored if
-                             glyphIDs is NULL.
-        @return The returned object has already been referenced.
-     */
-    SkAdvancedTypefaceMetrics* getAdvancedTypefaceMetrics(
-            SkAdvancedTypefaceMetrics::PerGlyphInfo perGlyphInfo,
-            const uint32_t* glyphIDs = NULL,
-            uint32_t glyphIDsCount = 0) const;
-
     enum Encoding {
         kUTF8_Encoding,
         kUTF16_Encoding,
@@ -334,6 +319,26 @@ protected:
                                   size_t length, void* data) const = 0;
 
 private:
+    friend class SkGTypeface;
+    friend class SkPDFFont;
+    friend class SkPDFCIDFont;
+
+    /** Retrieve detailed typeface metrics.  Used by the PDF backend.
+     @param perGlyphInfo Indicate what glyph specific information (advances,
+     names, etc.) should be populated.
+     @param glyphIDs  For per-glyph info, specify subset of the font by
+     giving glyph ids.  Each integer represents a glyph
+     id.  Passing NULL means all glyphs in the font.
+     @param glyphIDsCount Number of elements in subsetGlyphIds. Ignored if
+     glyphIDs is NULL.
+     @return The returned object has already been referenced.
+     */
+    SkAdvancedTypefaceMetrics* getAdvancedTypefaceMetrics(
+                          SkAdvancedTypefaceMetrics::PerGlyphInfo perGlyphInfo,
+                          const uint32_t* glyphIDs = NULL,
+                          uint32_t glyphIDsCount = 0) const;
+
+private:
     static void create_default_typeface(Style style);
 
     SkFontID    fUniqueID;