| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 The Android Open Source Project | 3 * Copyright 2011 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "SkAdvancedTypefaceMetrics.h" | 10 #include "SkAdvancedTypefaceMetrics.h" |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 SkAdvancedTypefaceMetrics::kNo_PerGlyphInfo, | 145 SkAdvancedTypefaceMetrics::kNo_PerGlyphInfo, |
| 146 NULL, 0); | 146 NULL, 0); |
| 147 if (metrics) { | 147 if (metrics) { |
| 148 upem = metrics->fEmSize; | 148 upem = metrics->fEmSize; |
| 149 metrics->unref(); | 149 metrics->unref(); |
| 150 } | 150 } |
| 151 #endif | 151 #endif |
| 152 return upem; | 152 return upem; |
| 153 } | 153 } |
| 154 | 154 |
| 155 // TODO: move this impl into the subclass | |
| 156 SkScalerContext* SkTypeface::onCreateScalerContext(const SkDescriptor* desc) con
st { | |
| 157 return SkFontHost::CreateScalerContext(desc); | |
| 158 } | |
| 159 | |
| 160 // TODO: move this impl into the subclass | |
| 161 void SkTypeface::onFilterRec(SkScalerContextRec* rec) const { | |
| 162 SkFontHost::FilterRec(rec, const_cast<SkTypeface*>(this)); | |
| 163 } | |
| 164 | |
| 165 /////////////////////////////////////////////////////////////////////////////// | 155 /////////////////////////////////////////////////////////////////////////////// |
| 166 /////////////////////////////////////////////////////////////////////////////// | 156 /////////////////////////////////////////////////////////////////////////////// |
| 167 | 157 |
| 168 #include "SkFontDescriptor.h" | 158 #include "SkFontDescriptor.h" |
| 169 | 159 |
| 170 int SkTypeface::onGetUPEM() const { return 0; } | 160 int SkTypeface::onGetUPEM() const { return 0; } |
| 171 int SkTypeface::onGetTableTags(SkFontTableTag tags[]) const { return 0; } | 161 int SkTypeface::onGetTableTags(SkFontTableTag tags[]) const { return 0; } |
| 172 size_t SkTypeface::onGetTableData(SkFontTableTag, size_t offset, | 162 size_t SkTypeface::onGetTableData(SkFontTableTag, size_t offset, |
| 173 size_t length, void* data) const { return 0; } | 163 size_t length, void* data) const { return 0; } |
| 174 void SkTypeface::onGetFontDescriptor(SkFontDescriptor* desc) const { | 164 void SkTypeface::onGetFontDescriptor(SkFontDescriptor* desc) const { |
| 175 desc->setStyle(this->style()); | 165 desc->setStyle(this->style()); |
| 176 } | 166 } |
| OLD | NEW |