Chromium Code Reviews| 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 207 | 207 |
| 208 int SkTypeface::onCharsToGlyphs(const void* chars, Encoding encoding, | 208 int SkTypeface::onCharsToGlyphs(const void* chars, Encoding encoding, |
| 209 uint16_t glyphs[], int glyphCount) const { | 209 uint16_t glyphs[], int glyphCount) const { |
| 210 SkDebugf("onCharsToGlyphs unimplemented\n"); | 210 SkDebugf("onCharsToGlyphs unimplemented\n"); |
| 211 if (glyphs && glyphCount > 0) { | 211 if (glyphs && glyphCount > 0) { |
| 212 sk_bzero(glyphs, glyphCount * sizeof(glyphs[0])); | 212 sk_bzero(glyphs, glyphCount * sizeof(glyphs[0])); |
| 213 } | 213 } |
| 214 return 0; | 214 return 0; |
| 215 } | 215 } |
| 216 | 216 |
| 217 int SkTypeface::onCountGlyphs() const { | |
| 218 SkDebugf("onCountGlyphs unimplemented\n"); | |
| 219 return 0; | |
| 220 } | |
| 221 | |
| 222 int SkTypeface::onGetUPEM() const { | 217 int SkTypeface::onGetUPEM() const { |
|
vandebo (ex-Chrome)
2013/07/15 17:32:56
Did you mean to remove this implementation as well
bungeman-skia
2013/07/15 18:21:36
Yes. I'm fairly certain the only reason this is he
| |
| 223 int upem = 0; | 218 int upem = 0; |
| 224 | 219 |
| 225 SkAdvancedTypefaceMetrics* metrics; | 220 SkAdvancedTypefaceMetrics* metrics; |
| 226 metrics = this->getAdvancedTypefaceMetrics( | 221 metrics = this->getAdvancedTypefaceMetrics( |
| 227 SkAdvancedTypefaceMetrics::kNo_PerGlyphInfo, | 222 SkAdvancedTypefaceMetrics::kNo_PerGlyphInfo, |
| 228 NULL, 0); | 223 NULL, 0); |
| 229 if (metrics) { | 224 if (metrics) { |
| 230 upem = metrics->fEmSize; | 225 upem = metrics->fEmSize; |
| 231 metrics->unref(); | 226 metrics->unref(); |
| 232 } | 227 } |
| 233 return upem; | 228 return upem; |
| 234 } | 229 } |
| 235 | 230 |
| 236 int SkTypeface::onGetTableTags(SkFontTableTag tags[]) const { | 231 int SkTypeface::onGetTableTags(SkFontTableTag tags[]) const { |
| 237 int ttcIndex; | 232 int ttcIndex; |
| 238 SkAutoTUnref<SkStream> stream(this->openStream(&ttcIndex)); | 233 SkAutoTUnref<SkStream> stream(this->openStream(&ttcIndex)); |
| 239 return stream.get() ? SkFontStream::GetTableTags(stream, ttcIndex, tags) : 0 ; | 234 return stream.get() ? SkFontStream::GetTableTags(stream, ttcIndex, tags) : 0 ; |
| 240 } | 235 } |
| 241 | 236 |
| 242 size_t SkTypeface::onGetTableData(SkFontTableTag tag, size_t offset, | 237 size_t SkTypeface::onGetTableData(SkFontTableTag tag, size_t offset, |
| 243 size_t length, void* data) const { | 238 size_t length, void* data) const { |
| 244 int ttcIndex; | 239 int ttcIndex; |
| 245 SkAutoTUnref<SkStream> stream(this->openStream(&ttcIndex)); | 240 SkAutoTUnref<SkStream> stream(this->openStream(&ttcIndex)); |
| 246 return stream.get() | 241 return stream.get() |
| 247 ? SkFontStream::GetTableData(stream, ttcIndex, tag, offset, length, data ) | 242 ? SkFontStream::GetTableData(stream, ttcIndex, tag, offset, length, data ) |
| 248 : 0; | 243 : 0; |
| 249 } | 244 } |
| OLD | NEW |