michael@0: /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef GFX_UNISCRIBESHAPER_H michael@0: #define GFX_UNISCRIBESHAPER_H michael@0: michael@0: #include "gfxTypes.h" michael@0: #include "gfxGDIFont.h" michael@0: michael@0: #include michael@0: #include michael@0: michael@0: michael@0: class gfxUniscribeShaper : public gfxFontShaper michael@0: { michael@0: public: michael@0: gfxUniscribeShaper(gfxGDIFont *aFont) michael@0: : gfxFontShaper(aFont) michael@0: , mScriptCache(nullptr) michael@0: { michael@0: MOZ_COUNT_CTOR(gfxUniscribeShaper); michael@0: } michael@0: michael@0: virtual ~gfxUniscribeShaper() michael@0: { michael@0: MOZ_COUNT_DTOR(gfxUniscribeShaper); michael@0: } michael@0: michael@0: virtual bool ShapeText(gfxContext *aContext, michael@0: const char16_t *aText, michael@0: uint32_t aOffset, michael@0: uint32_t aLength, michael@0: int32_t aScript, michael@0: gfxShapedText *aShapedText); michael@0: michael@0: SCRIPT_CACHE *ScriptCache() { return &mScriptCache; } michael@0: michael@0: gfxGDIFont *GetFont() { return static_cast(mFont); } michael@0: michael@0: private: michael@0: SCRIPT_CACHE mScriptCache; michael@0: michael@0: enum { michael@0: kUnicodeVS17 = gfxFontUtils::kUnicodeVS17, michael@0: kUnicodeVS256 = gfxFontUtils::kUnicodeVS256 michael@0: }; michael@0: }; michael@0: michael@0: #endif /* GFX_UNISCRIBESHAPER_H */