OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |