2010-03-15 02:34:25 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
2012-05-21 04:12:37 -07:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2010-03-15 02:34:25 -07:00
|
|
|
|
|
|
|
#ifndef GFX_UNISCRIBESHAPER_H
|
|
|
|
#define GFX_UNISCRIBESHAPER_H
|
|
|
|
|
|
|
|
#include "prtypes.h"
|
|
|
|
#include "gfxTypes.h"
|
|
|
|
#include "gfxGDIFont.h"
|
|
|
|
|
|
|
|
#include <usp10.h>
|
|
|
|
#include <cairo-win32.h>
|
|
|
|
|
|
|
|
|
|
|
|
class gfxUniscribeShaper : public gfxFontShaper
|
|
|
|
{
|
|
|
|
public:
|
2010-05-05 03:10:36 -07:00
|
|
|
gfxUniscribeShaper(gfxGDIFont *aFont)
|
|
|
|
: gfxFontShaper(aFont)
|
2013-07-31 08:44:31 -07:00
|
|
|
, mScriptCache(nullptr)
|
2010-05-05 03:10:36 -07:00
|
|
|
{
|
|
|
|
MOZ_COUNT_CTOR(gfxUniscribeShaper);
|
|
|
|
}
|
2010-03-15 02:34:25 -07:00
|
|
|
|
2010-05-05 03:10:36 -07:00
|
|
|
virtual ~gfxUniscribeShaper()
|
|
|
|
{
|
|
|
|
MOZ_COUNT_DTOR(gfxUniscribeShaper);
|
|
|
|
}
|
2010-03-15 02:34:25 -07:00
|
|
|
|
2013-01-04 10:35:37 -08:00
|
|
|
virtual bool ShapeText(gfxContext *aContext,
|
|
|
|
const PRUnichar *aText,
|
|
|
|
uint32_t aOffset,
|
|
|
|
uint32_t aLength,
|
|
|
|
int32_t aScript,
|
|
|
|
gfxShapedText *aShapedText);
|
2010-03-15 02:34:25 -07:00
|
|
|
|
|
|
|
SCRIPT_CACHE *ScriptCache() { return &mScriptCache; }
|
|
|
|
|
|
|
|
gfxGDIFont *GetFont() { return static_cast<gfxGDIFont*>(mFont); }
|
|
|
|
|
|
|
|
private:
|
|
|
|
SCRIPT_CACHE mScriptCache;
|
2010-06-01 06:42:37 -07:00
|
|
|
|
|
|
|
enum {
|
|
|
|
kUnicodeVS17 = gfxFontUtils::kUnicodeVS17,
|
|
|
|
kUnicodeVS256 = gfxFontUtils::kUnicodeVS256
|
|
|
|
};
|
2010-03-15 02:34:25 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* GFX_UNISCRIBESHAPER_H */
|