| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 name->set(desc.getFamilyName()); | 202 name->set(desc.getFamilyName()); |
| 203 } | 203 } |
| 204 | 204 |
| 205 SkAdvancedTypefaceMetrics* SkTypeface::getAdvancedTypefaceMetrics( | 205 SkAdvancedTypefaceMetrics* SkTypeface::getAdvancedTypefaceMetrics( |
| 206 SkAdvancedTypefaceMetrics::PerGlyphInfo info, | 206 SkAdvancedTypefaceMetrics::PerGlyphInfo info, |
| 207 const uint32_t* glyphIDs, | 207 const uint32_t* glyphIDs, |
| 208 uint32_t glyphIDsCount) const { | 208 uint32_t glyphIDsCount) const { |
| 209 return this->onGetAdvancedTypefaceMetrics(info, glyphIDs, glyphIDsCount); | 209 return this->onGetAdvancedTypefaceMetrics(info, glyphIDs, glyphIDsCount); |
| 210 } | 210 } |
| 211 | 211 |
| 212 SkTypeface* SkTypeface::refMatchingStyle(Style style) const { |
| 213 return this->onRefMatchingStyle(style); |
| 214 } |
| 215 |
| 212 /////////////////////////////////////////////////////////////////////////////// | 216 /////////////////////////////////////////////////////////////////////////////// |
| 213 /////////////////////////////////////////////////////////////////////////////// | 217 /////////////////////////////////////////////////////////////////////////////// |
| 214 | 218 |
| 215 int SkTypeface::onCharsToGlyphs(const void* chars, Encoding encoding, | 219 int SkTypeface::onCharsToGlyphs(const void* chars, Encoding encoding, |
| 216 uint16_t glyphs[], int glyphCount) const { | 220 uint16_t glyphs[], int glyphCount) const { |
| 217 SkDebugf("onCharsToGlyphs unimplemented\n"); | 221 SkDebugf("onCharsToGlyphs unimplemented\n"); |
| 218 if (glyphs && glyphCount > 0) { | 222 if (glyphs && glyphCount > 0) { |
| 219 sk_bzero(glyphs, glyphCount * sizeof(glyphs[0])); | 223 sk_bzero(glyphs, glyphCount * sizeof(glyphs[0])); |
| 220 } | 224 } |
| 221 return 0; | 225 return 0; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 242 } | 246 } |
| 243 | 247 |
| 244 size_t SkTypeface::onGetTableData(SkFontTableTag tag, size_t offset, | 248 size_t SkTypeface::onGetTableData(SkFontTableTag tag, size_t offset, |
| 245 size_t length, void* data) const { | 249 size_t length, void* data) const { |
| 246 int ttcIndex; | 250 int ttcIndex; |
| 247 SkAutoTUnref<SkStream> stream(this->openStream(&ttcIndex)); | 251 SkAutoTUnref<SkStream> stream(this->openStream(&ttcIndex)); |
| 248 return stream.get() | 252 return stream.get() |
| 249 ? SkFontStream::GetTableData(stream, ttcIndex, tag, offset, length, data
) | 253 ? SkFontStream::GetTableData(stream, ttcIndex, tag, offset, length, data
) |
| 250 : 0; | 254 : 0; |
| 251 } | 255 } |
| OLD | NEW |