Index: src/fonts/SkGScalerContext.h |
diff --git a/src/fonts/SkGScalerContext.h b/src/fonts/SkGScalerContext.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..504bc7b647af2e984e813c4e51e412c772d25933 |
--- /dev/null |
+++ b/src/fonts/SkGScalerContext.h |
@@ -0,0 +1,43 @@ |
+/* |
+ * Copyright 2013 Google Inc. |
+ * |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+#ifndef SkGScalerContext_DEFINED |
+#define SkGScalerContext_DEFINED |
+ |
+#include "SkScalerContext.h" |
+#include "SkTypeface.h" |
+ |
+class SkGTypeface : public SkTypeface { |
+public: |
+ SkGTypeface(SkTypeface* proxy, const SkPaint&); |
+ virtual ~SkGTypeface(); |
+ |
+ SkTypeface* proxy() const { return fProxy; } |
+ const SkPaint& paint() const { return fPaint; } |
+ |
+protected: |
+ virtual SkScalerContext* onCreateScalerContext(const SkDescriptor*) const SK_OVERRIDE; |
+ virtual void onFilterRec(SkScalerContextRec*) const SK_OVERRIDE; |
+ virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( |
+ SkAdvancedTypefaceMetrics::PerGlyphInfo, |
+ const uint32_t* glyphIDs, |
+ uint32_t glyphIDsCount) const SK_OVERRIDE; |
+ virtual SkStream* onOpenStream(int* ttcIndex) const SK_OVERRIDE; |
+ virtual void onGetFontDescriptor(SkFontDescriptor*, bool* isLocal) const SK_OVERRIDE; |
+ |
+ virtual int onGetUPEM() const SK_OVERRIDE; |
+ |
+ virtual int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE; |
+ virtual size_t onGetTableData(SkFontTableTag, size_t offset, |
+ size_t length, void* data) const SK_OVERRIDE; |
+ |
+private: |
+ SkTypeface* fProxy; |
+ SkPaint fPaint; |
+}; |
+ |
+#endif |