]> git.saurik.com Git - apple/icu.git/blame - icuSources/layout/ArabicShaping.h
ICU-6.2.22.tar.gz
[apple/icu.git] / icuSources / layout / ArabicShaping.h
CommitLineData
b75a7d8f 1/*
b75a7d8f 2 *
374ca955 3 * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
b75a7d8f
A
4 *
5 */
6
7#ifndef __ARABICSHAPING_H
8#define __ARABICSHAPING_H
9
10/**
11 * \file
12 * \internal
13 */
14
15#include "LETypes.h"
16#include "OpenTypeTables.h"
17
18U_NAMESPACE_BEGIN
19
374ca955 20class LEGlyphStorage;
b75a7d8f
A
21
22class ArabicShaping /* not : public UObject because all methods are static */ {
23public:
24 // shaping bit masks
25 enum ShapingBitMasks
26 {
27 MASK_SHAPE_RIGHT = 1, // if this bit set, shapes to right
28 MASK_SHAPE_LEFT = 2, // if this bit set, shapes to left
29 MASK_TRANSPARENT = 4, // if this bit set, is transparent (ignore other bits)
30 MASK_NOSHAPE = 8 // if this bit set, don't shape this char, i.e. tatweel
31 };
32
33 // shaping values
34 enum ShapeTypeValues
35 {
36 ST_NONE = 0,
37 ST_RIGHT = MASK_SHAPE_RIGHT,
38 ST_LEFT = MASK_SHAPE_LEFT,
39 ST_DUAL = MASK_SHAPE_RIGHT | MASK_SHAPE_LEFT,
40 ST_TRANSPARENT = MASK_TRANSPARENT,
41 ST_NOSHAPE_DUAL = MASK_NOSHAPE | ST_DUAL,
42 ST_NOSHAPE_NONE = MASK_NOSHAPE
43 };
44
45 typedef le_int32 ShapeType;
46
47 static void shape(const LEUnicode *chars, le_int32 offset, le_int32 charCount, le_int32 charMax,
374ca955 48 le_bool rightToLeft, LEGlyphStorage &glyphStorage);
b75a7d8f
A
49
50 static const LETag *getFeatureOrder();
51
b75a7d8f
A
52private:
53 // forbid instantiation
54 ArabicShaping();
55
b75a7d8f
A
56 static const LETag tagArray[];
57
374ca955 58 static ShapeType getShapeType(LEUnicode c);
b75a7d8f 59
374ca955 60 static const ShapeType shapeTypes[];
b75a7d8f 61
374ca955 62 static void adjustTags(le_int32 outIndex, le_int32 shapeOffset, LEGlyphStorage &glyphStorage);
b75a7d8f
A
63};
64
65U_NAMESPACE_END
66#endif