2
* @(#)ArabicShaping.h 1.6 00/03/15
4
* (C) Copyright IBM Corp. 1998, 1999, 2000 - All Rights Reserved
8
#ifndef __ARABICSHAPING_H
9
#define __ARABICSHAPING_H
12
#include "OpenTypeTables.h"
19
virtual void init(LEUnicode ch, le_int32 outIndex, le_bool isloate) = 0;
20
virtual void shape(le_int32 outIndex, le_int32 shapeOffset) = 0;
29
MASK_SHAPE_RIGHT = 1, // if this bit set, shapes to right
30
MASK_SHAPE_LEFT = 2, // if this bit set, shapes to left
31
MASK_TRANSPARENT = 4, // if this bit set, is transparent (ignore other bits)
32
MASK_NOSHAPE = 8 // if this bit set, don't shape this char, i.e. tatweel
39
ST_RIGHT = MASK_SHAPE_RIGHT,
40
ST_LEFT = MASK_SHAPE_LEFT,
41
ST_DUAL = MASK_SHAPE_RIGHT | MASK_SHAPE_LEFT,
42
ST_TRANSPARENT = MASK_TRANSPARENT,
43
ST_NOSHAPE_DUAL = MASK_NOSHAPE | ST_DUAL,
44
ST_NOSHAPE_NONE = MASK_NOSHAPE
47
typedef le_int32 ShapeType;
49
static void shape(const LEUnicode *chars, le_int32 offset, le_int32 charCount, le_int32 charMax,
50
le_bool rightToLeft, Shaper &shaper);
52
static const le_uint8 glyphSubstitutionTable[];
53
//static le_uint8 ligatureSubstitutionSubtable[];
54
static const le_uint8 glyphDefinitionTable[];
57
static ShapeType getShapeType(LEUnicode c);
59
static const ShapeType shapeTypes[];
62
class GlyphShaper : public Shaper
65
virtual void init(LEUnicode ch, le_int32 outIndex, le_bool isolate);
66
virtual void shape(le_int32 outIndex, le_int32 shapeOffset);
68
GlyphShaper(const LETag **outputTags);
72
const LETag **charTags;
74
static const LETag isolFeatureTag; // 'isol'
75
static const LETag initFeatureTag; // 'init'
76
static const LETag mediFeatureTag; // 'medi'
77
static const LETag finaFeatureTag; // 'fina'
78
static const LETag ligaFeatureTag; // 'liga'
79
static const LETag msetFeatureTag; // 'mset'
80
static const LETag markFeatureTag; // 'mark'
82
static const LETag emptyTag;
84
static const LETag tagArray[];
88
class CharShaper : public Shaper
91
virtual void init(LEUnicode ch, le_int32 outIndex, le_bool isolate);
92
virtual void shape(le_int32 outIndex, le_int32 shapeOffset);
94
CharShaper(LEUnicode *outputChars);
100
static const LEUnicode isolateShapes[];
102
static LEUnicode getToIsolateShape(LEUnicode ch);