X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/b75a7d8f3b4adbae880cab104ce2c6a50eee4db2..2be6500137966bba13903b24204a44804f9e133a:/icuSources/layout/ArabicLayoutEngine.h diff --git a/icuSources/layout/ArabicLayoutEngine.h b/icuSources/layout/ArabicLayoutEngine.h index 7cd7fe78..a449701f 100644 --- a/icuSources/layout/ArabicLayoutEngine.h +++ b/icuSources/layout/ArabicLayoutEngine.h @@ -1,8 +1,7 @@ /* - * @(#)ArabicLayoutEngine.h 1.3 00/03/15 * - * (C) Copyright IBM Corp. 1998, 1999, 2000, 2001, 2002 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2008 - All Rights Reserved * */ @@ -42,15 +41,16 @@ public: * @param scriptCode - the script * @param langaugeCode - the language * @param gsubTable - the GSUB table + * @param success - set to an error code if the operation fails * * @see LayoutEngine::layoutEngineFactory * @see OpenTypeLayoutEngine - * @see ScriptAndLangaugeTags.h for script and language codes + * @see ScriptAndLanguageTags.h for script and language codes * * @internal */ ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, - const GlyphSubstitutionTableHeader *gsubTable); + le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success); /** * This constructor is used when the font requires a "canned" GSUB table which can't be known @@ -59,13 +59,15 @@ public: * @param fontInstance - the font * @param scriptCode - the script * @param langaugeCode - the language + * @param success - set to an error code if the operation fails * * @see OpenTypeLayoutEngine - * @see ScriptAndLangaugeTags.h for script and language codes + * @see ScriptAndLanguageTags.h for script and language codes * * @internal */ - ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode); + ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, + le_int32 typoFlags, LEErrorCode &success); /** * The destructor, virtual for correct polymorphic invocation. @@ -77,16 +79,16 @@ public: /** * ICU "poor man's RTTI", returns a UClassID for the actual class. * - * @draft ICU 2.2 + * @stable ICU 2.8 */ - virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); } + virtual UClassID getDynamicClassID() const; /** * ICU "poor man's RTTI", returns a UClassID for this class. * - * @draft ICU 2.2 + * @stable ICU 2.8 */ - static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; } + static UClassID getStaticClassID(); protected: @@ -99,7 +101,7 @@ protected: * @param offset - the index of the first character to process * @param count - the number of characters to process * @param max - the number of characters in the input context - * @param rightToLeft - true if the characters are in a right to left directional run + * @param rightToLeft - TRUE if the characters are in a right to left directional run * * Output parameters: * @param outChars - the output character arrayt @@ -112,7 +114,7 @@ protected: * @internal */ virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, - LEUnicode *&outChars, le_int32 *&charIndices, const LETag **&featureTags, LEErrorCode &success); + LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success); /** * This method applies the GPOS table if it is present, otherwise it ensures that all vowel @@ -123,7 +125,7 @@ protected: * @param chars - the input character context * @param offset - the offset of the first character to process * @param count - the number of characters to process - * @param reverse - true if the glyphs in the glyph array have been reordered + * @param reverse - TRUE if the glyphs in the glyph array have been reordered * @param glyphs - the input glyph array * @param glyphCount - the number of glyphs * @param positions - the position array, will be updated as needed @@ -131,15 +133,10 @@ protected: * * @internal */ - virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphID glyphs[], le_int32 glyphCount, float positions[], LEErrorCode &success); + virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success); -private: + // static void adjustMarkGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool rightToLeft, LEGlyphStorage &glyphStorage, LEErrorCode &success); - /** - * The address of this static class variable serves as this class's ID - * for ICU "poor man's RTTI". - */ - static const char fgClassID; }; /** @@ -164,13 +161,15 @@ public: * @param fontInstance - the font * @param scriptCode - the script * @param languageCode - the language + * @param success - set to an error code if the operation fails * * @see LEFontInstance * @see ScriptAndLanguageTags.h for script and language codes * * @internal */ - UnicodeArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode); + UnicodeArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, + le_int32 typoFlags, LEErrorCode &success); /** * The destructor, virtual for correct polymorphic invocation. @@ -199,8 +198,7 @@ protected: * * @internal */ - virtual le_int32 glyphPostProcessing(LEGlyphID tempGlyphs[], le_int32 tempCharIndices[], le_int32 tempGlyphCount, - LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success); + virtual le_int32 glyphPostProcessing(LEGlyphStorage &tempGlyphStorage, LEGlyphStorage &glyphStorage, LEErrorCode &success); /** * This method copies the input characters into the output glyph index array, @@ -210,18 +208,16 @@ protected: * @param chars - the input character context * @param offset - the offset of the first character to be mapped * @param count - the number of characters to be mapped - * @param reverse - if true, the output will be in reverse order - * @param mirror - if true, do character mirroring + * @param reverse - if TRUE, the output will be in reverse order + * @param mirror - if TRUE, do character mirroring + * @param glyphStorage - the glyph storage object. Glyph and char index arrays will be updated. * - * Output parameters: - * @param glyphs - the glyph array - * @param charIndices - the character index array * @param success - set to an error code if the operation fails * * @internal */ virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool mirror, - LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success); + LEGlyphStorage &glyphStorage, LEErrorCode &success); /** * This method ensures that all vowel and accent glyphs have a zero advance width by calling @@ -231,15 +227,13 @@ protected: * @param chars - the input character context * @param offset - the offset of the first character to process * @param count - the number of characters to process - * @param reverse - true if the glyphs in the glyph array have been reordered - * @param glyphs - the input glyph array - * @param glyphCount - the number of glyphs - * @param positions - the position array, will be updated as needed + * @param reverse - TRUE if the glyphs in the glyph array have been reordered + * @param glyphStorage - the glyph storage object. The glyph positions will be updated as needed. * @param success - output parameter set to an error code if the operation fails * * @internal */ - virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphID glyphs[], le_int32 glyphCount, float positions[], LEErrorCode &success); + virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success); }; U_NAMESPACE_END