gfx/skia/trunk/src/fonts/SkGScalerContext.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/skia/trunk/src/fonts/SkGScalerContext.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,48 @@
     1.4 +/*
     1.5 + * Copyright 2013 Google Inc.
     1.6 + *
     1.7 + * Use of this source code is governed by a BSD-style license that can be
     1.8 + * found in the LICENSE file.
     1.9 + */
    1.10 +
    1.11 +#ifndef SkGScalerContext_DEFINED
    1.12 +#define SkGScalerContext_DEFINED
    1.13 +
    1.14 +#include "SkScalerContext.h"
    1.15 +#include "SkTypeface.h"
    1.16 +
    1.17 +class SkGTypeface : public SkTypeface {
    1.18 +public:
    1.19 +    SkGTypeface(SkTypeface* proxy, const SkPaint&);
    1.20 +    virtual ~SkGTypeface();
    1.21 +
    1.22 +    SkTypeface* proxy() const { return fProxy; }
    1.23 +    const SkPaint& paint() const { return fPaint; }
    1.24 +
    1.25 +protected:
    1.26 +    virtual SkScalerContext* onCreateScalerContext(const SkDescriptor*) const SK_OVERRIDE;
    1.27 +    virtual void onFilterRec(SkScalerContextRec*) const SK_OVERRIDE;
    1.28 +    virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics(
    1.29 +                                    SkAdvancedTypefaceMetrics::PerGlyphInfo,
    1.30 +                                    const uint32_t* glyphIDs,
    1.31 +                                    uint32_t glyphIDsCount) const SK_OVERRIDE;
    1.32 +    virtual SkStream* onOpenStream(int* ttcIndex) const SK_OVERRIDE;
    1.33 +    virtual void onGetFontDescriptor(SkFontDescriptor*, bool* isLocal) const SK_OVERRIDE;
    1.34 +
    1.35 +    virtual int onCharsToGlyphs(const void* chars, Encoding encoding,
    1.36 +                                uint16_t glyphs[], int glyphCount) const SK_OVERRIDE;
    1.37 +    virtual int onCountGlyphs() const SK_OVERRIDE;
    1.38 +    virtual int onGetUPEM() const SK_OVERRIDE;
    1.39 +
    1.40 +    virtual SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE;
    1.41 +
    1.42 +    virtual int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE;
    1.43 +    virtual size_t onGetTableData(SkFontTableTag, size_t offset,
    1.44 +                                  size_t length, void* data) const SK_OVERRIDE;
    1.45 +
    1.46 +private:
    1.47 +    SkTypeface* fProxy;
    1.48 +    SkPaint     fPaint;
    1.49 +};
    1.50 +
    1.51 +#endif

mercurial