| 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 | 213 |
| 214 int SkGTypeface::onGetTableTags(SkFontTableTag tags[]) const { | 214 int SkGTypeface::onGetTableTags(SkFontTableTag tags[]) const { |
| 215 return fProxy->getTableTags(tags); | 215 return fProxy->getTableTags(tags); |
| 216 } | 216 } |
| 217 | 217 |
| 218 size_t SkGTypeface::onGetTableData(SkFontTableTag tag, size_t offset, | 218 size_t SkGTypeface::onGetTableData(SkFontTableTag tag, size_t offset, |
| 219 size_t length, void* data) const { | 219 size_t length, void* data) const { |
| 220 return fProxy->getTableData(tag, offset, length, data); | 220 return fProxy->getTableData(tag, offset, length, data); |
| 221 } | 221 } |
| 222 | 222 |
| 223 SkTypeface* SkGTypeface::onRefMatchingStyle(Style style) const { | |
| 224 if (this->style() == style) { | |
| 225 return const_cast<SkGTypeface*>(SkRef(this)); | |
| 226 } | |
| 227 | |
| 228 SkAutoTUnref<SkTypeface> other(fProxy->refMatchingStyle(style)); | |
| 229 return SkNEW_ARGS(SkGTypeface, (other, fPaint)); | |
| 230 } | |
| 231 | |
| 232 /////////////////////////////////////////////////////////////////////////////// | 223 /////////////////////////////////////////////////////////////////////////////// |
| 233 | 224 |
| 234 #if 0 | 225 #if 0 |
| 235 // under construction -- defining a font purely in terms of skia primitives | 226 // under construction -- defining a font purely in terms of skia primitives |
| 236 // ala an SVG-font. | 227 // ala an SVG-font. |
| 237 class SkGFont : public SkRefCnt { | 228 class SkGFont : public SkRefCnt { |
| 238 public: | 229 public: |
| 239 virtual ~SkGFont(); | 230 virtual ~SkGFont(); |
| 240 | 231 |
| 241 int unicharToGlyph(SkUnichar) const; | 232 int unicharToGlyph(SkUnichar) const; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 263 | 254 |
| 264 friend class SkGFontBuilder; | 255 friend class SkGFontBuilder; |
| 265 SkGFont(int count, Glyph* array); | 256 SkGFont(int count, Glyph* array); |
| 266 }; | 257 }; |
| 267 | 258 |
| 268 class SkGFontBuilder { | 259 class SkGFontBuilder { |
| 269 public: | 260 public: |
| 270 | 261 |
| 271 }; | 262 }; |
| 272 #endif | 263 #endif |
| OLD | NEW |