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

Unified Diff: src/core/SkTypeface.cpp

Issue 22859070: Implement charToGlyph on remaining ports. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Tabs and line length. Created 7 years, 2 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: src/core/SkTypeface.cpp
===================================================================
--- src/core/SkTypeface.cpp (revision 11929)
+++ src/core/SkTypeface.cpp (working copy)
@@ -49,6 +49,13 @@
SkAdvancedTypefaceMetrics::PerGlyphInfo,
const uint32_t*, uint32_t) const SK_OVERRIDE { return NULL; }
virtual void onGetFontDescriptor(SkFontDescriptor*, bool*) const SK_OVERRIDE { }
+ virtual int onCharsToGlyphs(const void* chars, Encoding encoding,
+ uint16_t glyphs[], int glyphCount) const SK_OVERRIDE {
+ if (glyphs && glyphCount > 0) {
+ sk_bzero(glyphs, glyphCount * sizeof(glyphs[0]));
+ }
+ return 0;
+ }
virtual int onCountGlyphs() const SK_OVERRIDE { return 0; };
virtual int onGetUPEM() const SK_OVERRIDE { return 0; };
class EmptyLocalizedStrings : public SkTypeface::LocalizedStrings {
@@ -247,20 +254,3 @@
SkTypeface* SkTypeface::refMatchingStyle(Style style) const {
return this->onRefMatchingStyle(style);
}
-
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-
-int SkTypeface::onCharsToGlyphs(const void* chars, Encoding encoding,
- uint16_t glyphs[], int glyphCount) const {
- static bool printed = false;
- if (!printed) {
- // Only want to see this message once
- SkDebugf("\n *** onCharsToGlyphs unimplemented ***\n");
- printed = true;
- }
- if (glyphs && glyphCount > 0) {
- sk_bzero(glyphs, glyphCount * sizeof(glyphs[0]));
- }
- return 0;
-}

Powered by Google App Engine
This is Rietveld 408576698