blob: 8ad28173c09af86ed7571a6f5339cd25c6bdbae4 [file] [log] [blame]
reed@google.com7edec142013-05-31 20:17:57 +00001/*
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
14class SkGTypeface : public SkTypeface {
15public:
16 SkGTypeface(SkTypeface* proxy, const SkPaint&);
17 virtual ~SkGTypeface();
skia.committer@gmail.com26da7f02013-06-01 07:01:39 +000018
reed@google.com7edec142013-05-31 20:17:57 +000019 SkTypeface* proxy() const { return fProxy; }
20 const SkPaint& paint() const { return fPaint; }
21
22protected:
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.com26da7f02013-06-01 07:01:39 +000031
bungeman@google.com3c996f82013-10-24 21:39:35 +000032 virtual int onCharsToGlyphs(const void* chars, Encoding encoding,
33 uint16_t glyphs[], int glyphCount) const SK_OVERRIDE;
bungeman@google.come05e75e2013-07-15 19:52:13 +000034 virtual int onCountGlyphs() const SK_OVERRIDE;
reed@google.com7edec142013-05-31 20:17:57 +000035 virtual int onGetUPEM() const SK_OVERRIDE;
skia.committer@gmail.com26da7f02013-06-01 07:01:39 +000036
bungemanb374d6a2014-09-17 07:48:59 -070037 virtual void onGetFamilyName(SkString* familyName) const SK_OVERRIDE;
bungeman@google.com839702b2013-08-07 17:09:22 +000038 virtual SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE;
bungeman@google.coma9802692013-08-07 02:45:25 +000039
reed@google.com7edec142013-05-31 20:17:57 +000040 virtual int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE;
41 virtual size_t onGetTableData(SkFontTableTag, size_t offset,
42 size_t length, void* data) const SK_OVERRIDE;
skia.committer@gmail.com26da7f02013-06-01 07:01:39 +000043
reed@google.com7edec142013-05-31 20:17:57 +000044private:
45 SkTypeface* fProxy;
46 SkPaint fPaint;
47};
48
49#endif