00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __ARABICLAYOUTENGINE_H
00010 #define __ARABICLAYOUTENGINE_H
00011
00012 #include "LETypes.h"
00013 #include "LEFontInstance.h"
00014 #include "LEGlyphFilter.h"
00015 #include "LayoutEngine.h"
00016 #include "OpenTypeLayoutEngine.h"
00017
00018 #include "GlyphSubstitutionTables.h"
00019 #include "GlyphDefinitionTables.h"
00020 #include "GlyphPositioningTables.h"
00021
00022 U_NAMESPACE_BEGIN
00023
00030 class ArabicOpenTypeLayoutEngine : public OpenTypeLayoutEngine
00031 {
00032 public:
00048 ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
00049 const GlyphSubstitutionTableHeader *gsubTable);
00050
00062 ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode);
00063
00067 virtual ~ArabicOpenTypeLayoutEngine();
00068
00069 protected:
00070
00090 virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
00091 LEUnicode *&outChars, le_int32 *&charIndices, const LETag **&featureTags, LEErrorCode &success);
00092
00108 virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphID glyphs[], le_int32 glyphCount, float positions[], LEErrorCode &success);
00109 };
00110
00121 class UnicodeArabicOpenTypeLayoutEngine : public ArabicOpenTypeLayoutEngine
00122 {
00123 public:
00135 UnicodeArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode);
00136
00140 virtual ~UnicodeArabicOpenTypeLayoutEngine();
00141
00142 protected:
00143
00160 virtual le_int32 glyphPostProcessing(LEGlyphID tempGlyphs[], le_int32 tempCharIndices[], le_int32 tempGlyphCount,
00161 LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success);
00162
00179 virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool mirror,
00180 LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success);
00181
00196 virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphID glyphs[], le_int32 glyphCount, float positions[], LEErrorCode &success);
00197 };
00198
00199 U_NAMESPACE_END
00200 #endif
00201