OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
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 "SkGScalerContext.h" | 8 #include "SkGScalerContext.h" |
9 #include "SkGlyph.h" | 9 #include "SkGlyph.h" |
10 #include "SkPath.h" | 10 #include "SkPath.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 204 |
205 int SkGTypeface::onGetTableTags(SkFontTableTag tags[]) const { | 205 int SkGTypeface::onGetTableTags(SkFontTableTag tags[]) const { |
206 return fProxy->getTableTags(tags); | 206 return fProxy->getTableTags(tags); |
207 } | 207 } |
208 | 208 |
209 size_t SkGTypeface::onGetTableData(SkFontTableTag tag, size_t offset, | 209 size_t SkGTypeface::onGetTableData(SkFontTableTag tag, size_t offset, |
210 size_t length, void* data) const { | 210 size_t length, void* data) const { |
211 return fProxy->getTableData(tag, offset, length, data); | 211 return fProxy->getTableData(tag, offset, length, data); |
212 } | 212 } |
213 | 213 |
| 214 SkTypeface* SkGTypeface::onRefMatchingStyle(Style style) const { |
| 215 if (this->style() == style) { |
| 216 return const_cast<SkGTypeface*>(SkRef(this)); |
| 217 } |
| 218 |
| 219 SkAutoTUnref<SkTypeface> other(fProxy->refMatchingStyle(style)); |
| 220 return SkNEW_ARGS(SkGTypeface, (other, fPaint)); |
| 221 } |
| 222 |
214 /////////////////////////////////////////////////////////////////////////////// | 223 /////////////////////////////////////////////////////////////////////////////// |
215 | 224 |
216 #if 0 | 225 #if 0 |
217 // under construction -- defining a font purely in terms of skia primitives | 226 // under construction -- defining a font purely in terms of skia primitives |
218 // ala an SVG-font. | 227 // ala an SVG-font. |
219 class SkGFont : public SkRefCnt { | 228 class SkGFont : public SkRefCnt { |
220 public: | 229 public: |
221 virtual ~SkGFont(); | 230 virtual ~SkGFont(); |
222 | 231 |
223 int unicharToGlyph(SkUnichar) const; | 232 int unicharToGlyph(SkUnichar) const; |
(...skipping 21 matching lines...) Expand all Loading... |
245 | 254 |
246 friend class SkGFontBuilder; | 255 friend class SkGFontBuilder; |
247 SkGFont(int count, Glyph* array); | 256 SkGFont(int count, Glyph* array); |
248 }; | 257 }; |
249 | 258 |
250 class SkGFontBuilder { | 259 class SkGFontBuilder { |
251 public: | 260 public: |
252 | 261 |
253 }; | 262 }; |
254 #endif | 263 #endif |
OLD | NEW |