reed@google.com | 7edec14 | 2013-05-31 20:17:57 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2013 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #ifndef SkGScalerContext_DEFINED |
| 9 | #define SkGScalerContext_DEFINED |
| 10 | |
| 11 | #include "SkScalerContext.h" |
| 12 | #include "SkTypeface.h" |
| 13 | |
| 14 | class SkGTypeface : public SkTypeface { |
| 15 | public: |
| 16 | SkGTypeface(SkTypeface* proxy, const SkPaint&); |
| 17 | virtual ~SkGTypeface(); |
skia.committer@gmail.com | 26da7f0 | 2013-06-01 07:01:39 +0000 | [diff] [blame] | 18 | |
reed@google.com | 7edec14 | 2013-05-31 20:17:57 +0000 | [diff] [blame] | 19 | SkTypeface* proxy() const { return fProxy; } |
| 20 | const SkPaint& paint() const { return fPaint; } |
| 21 | |
| 22 | protected: |
| 23 | virtual SkScalerContext* onCreateScalerContext(const SkDescriptor*) const SK_OVERRIDE; |
| 24 | virtual void onFilterRec(SkScalerContextRec*) const SK_OVERRIDE; |
| 25 | virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( |
| 26 | SkAdvancedTypefaceMetrics::PerGlyphInfo, |
| 27 | const uint32_t* glyphIDs, |
| 28 | uint32_t glyphIDsCount) const SK_OVERRIDE; |
| 29 | virtual SkStream* onOpenStream(int* ttcIndex) const SK_OVERRIDE; |
| 30 | virtual void onGetFontDescriptor(SkFontDescriptor*, bool* isLocal) const SK_OVERRIDE; |
skia.committer@gmail.com | 26da7f0 | 2013-06-01 07:01:39 +0000 | [diff] [blame] | 31 | |
bungeman@google.com | e05e75e | 2013-07-15 19:52:13 +0000 | [diff] [blame] | 32 | virtual int onCountGlyphs() const SK_OVERRIDE; |
reed@google.com | 7edec14 | 2013-05-31 20:17:57 +0000 | [diff] [blame] | 33 | virtual int onGetUPEM() const SK_OVERRIDE; |
skia.committer@gmail.com | 26da7f0 | 2013-06-01 07:01:39 +0000 | [diff] [blame] | 34 | |
bungeman@google.com | 839702b | 2013-08-07 17:09:22 +0000 | [diff] [blame^] | 35 | virtual SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE; |
bungeman@google.com | a980269 | 2013-08-07 02:45:25 +0000 | [diff] [blame] | 36 | |
reed@google.com | 7edec14 | 2013-05-31 20:17:57 +0000 | [diff] [blame] | 37 | virtual int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE; |
| 38 | virtual size_t onGetTableData(SkFontTableTag, size_t offset, |
| 39 | size_t length, void* data) const SK_OVERRIDE; |
reed@google.com | 7fdcd44 | 2013-07-30 21:25:49 +0000 | [diff] [blame] | 40 | virtual SkTypeface* onRefMatchingStyle(Style) const SK_OVERRIDE; |
skia.committer@gmail.com | 26da7f0 | 2013-06-01 07:01:39 +0000 | [diff] [blame] | 41 | |
reed@google.com | 7edec14 | 2013-05-31 20:17:57 +0000 | [diff] [blame] | 42 | private: |
| 43 | SkTypeface* fProxy; |
| 44 | SkPaint fPaint; |
| 45 | }; |
| 46 | |
| 47 | #endif |