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

Side by Side Diff: src/core/SkTypeface.cpp

Issue 21716005: Add getFamilyNames to SkTypeface. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « include/core/SkTypeface.h ('k') | src/fonts/SkGScalerContext.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 The Android Open Source Project 2 * Copyright 2011 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkAdvancedTypefaceMetrics.h" 8 #include "SkAdvancedTypefaceMetrics.h"
9 #include "SkFontDescriptor.h" 9 #include "SkFontDescriptor.h"
10 #include "SkFontHost.h" 10 #include "SkFontHost.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 int SkTypeface::countGlyphs() const { 188 int SkTypeface::countGlyphs() const {
189 return this->onCountGlyphs(); 189 return this->onCountGlyphs();
190 } 190 }
191 191
192 int SkTypeface::getUnitsPerEm() const { 192 int SkTypeface::getUnitsPerEm() const {
193 // should we try to cache this in the base-class? 193 // should we try to cache this in the base-class?
194 return this->onGetUPEM(); 194 return this->onGetUPEM();
195 } 195 }
196 196
197 SkTypeface::LocalizedStrings* SkTypeface::getFamilyNames() const { 197 SkTypeface::LocalizedStrings* SkTypeface::createFamilyNameIterator() const {
198 return this->onGetFamilyNames(); 198 return this->onCreateFamilyNameIterator();
199 } 199 }
200 200
201 void SkTypeface::getFamilyName(SkString* name) const { 201 void SkTypeface::getFamilyName(SkString* name) const {
202 bool isLocal = false; 202 bool isLocal = false;
203 SkFontDescriptor desc(this->style()); 203 SkFontDescriptor desc(this->style());
204 this->onGetFontDescriptor(&desc, &isLocal); 204 this->onGetFontDescriptor(&desc, &isLocal);
205 name->set(desc.getFamilyName()); 205 name->set(desc.getFamilyName());
206 } 206 }
207 207
208 SkAdvancedTypefaceMetrics* SkTypeface::getAdvancedTypefaceMetrics( 208 SkAdvancedTypefaceMetrics* SkTypeface::getAdvancedTypefaceMetrics(
(...skipping 11 matching lines...) Expand all
220 /////////////////////////////////////////////////////////////////////////////// 220 ///////////////////////////////////////////////////////////////////////////////
221 221
222 int SkTypeface::onCharsToGlyphs(const void* chars, Encoding encoding, 222 int SkTypeface::onCharsToGlyphs(const void* chars, Encoding encoding,
223 uint16_t glyphs[], int glyphCount) const { 223 uint16_t glyphs[], int glyphCount) const {
224 SkDebugf("onCharsToGlyphs unimplemented\n"); 224 SkDebugf("onCharsToGlyphs unimplemented\n");
225 if (glyphs && glyphCount > 0) { 225 if (glyphs && glyphCount > 0) {
226 sk_bzero(glyphs, glyphCount * sizeof(glyphs[0])); 226 sk_bzero(glyphs, glyphCount * sizeof(glyphs[0]));
227 } 227 }
228 return 0; 228 return 0;
229 } 229 }
OLDNEW
« no previous file with comments | « include/core/SkTypeface.h ('k') | src/fonts/SkGScalerContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698