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
00028 class ArabicOpenTypeLayoutEngine : public OpenTypeLayoutEngine
00029 {
00030 public:
00046 ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
00047 const GlyphSubstitutionTableHeader *gsubTable);
00048
00060 ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode);
00061
00065 virtual ~ArabicOpenTypeLayoutEngine();
00066
00067 protected:
00068
00088 virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
00089 LEUnicode *&outChars, le_int32 *&charIndices, const LETag **&featureTags, LEErrorCode &success);
00090
00106 virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphID glyphs[], le_int32 glyphCount, float positions[], LEErrorCode &success);
00107 };
00108
00119 class UnicodeArabicOpenTypeLayoutEngine : public ArabicOpenTypeLayoutEngine
00120 {
00121 public:
00133 UnicodeArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode);
00134
00138 virtual ~UnicodeArabicOpenTypeLayoutEngine();
00139
00140 protected:
00141
00158 virtual le_int32 glyphPostProcessing(LEGlyphID tempGlyphs[], le_int32 tempCharIndices[], le_int32 tempGlyphCount,
00159 LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success);
00160
00177 virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool mirror,
00178 LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success);
00179
00194 virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphID glyphs[], le_int32 glyphCount, float positions[], LEErrorCode &success);
00195 };
00196
00197 #endif
00198