add glyph->unichar query (inverse of a cmap)



git-svn-id: http://skia.googlecode.com/svn/trunk@472 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index 9f174fc..86f174a 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -708,6 +708,13 @@
     int textToGlyphs(const void* text, size_t byteLength,
                      uint16_t glyphs[]) const;
 
+    /** Convert the glyph array into Unichars. Unconvertable glyphs are mapped
+        to zero. Note: this does not look at the text-encoding setting in the
+        paint, only at the typeface.
+    */
+    void glyphsToUnichars(const uint16_t glyphs[], int count,
+                          SkUnichar text[]) const;
+
     /** Return the number of drawable units in the specified text buffer.
         This looks at the current TextEncoding field of the paint. If you also
         want to have the text converted into glyph IDs, call textToGlyphs