jdk/src/share/native/sun/font/layout/IndicLayoutEngine.h
changeset 3935 afcdb712a9c5
parent 2 90ce3da70b43
child 5506 202f599c92aa
equal deleted inserted replaced
3933:38e8ef00316e 3935:afcdb712a9c5
    41 
    41 
    42 #include "GlyphSubstitutionTables.h"
    42 #include "GlyphSubstitutionTables.h"
    43 #include "GlyphDefinitionTables.h"
    43 #include "GlyphDefinitionTables.h"
    44 #include "GlyphPositioningTables.h"
    44 #include "GlyphPositioningTables.h"
    45 
    45 
       
    46 U_NAMESPACE_BEGIN
       
    47 
    46 class MPreFixups;
    48 class MPreFixups;
    47 class LEGlyphStorage;
    49 class LEGlyphStorage;
    48 
    50 
    49 /**
    51 /**
    50  * This class implements OpenType layout for Indic OpenType fonts, as
    52  * This class implements OpenType layout for Indic OpenType fonts, as
    75      * @see OpenTypeLayoutEngine
    77      * @see OpenTypeLayoutEngine
    76      * @see ScriptAndLangaugeTags.h for script and language codes
    78      * @see ScriptAndLangaugeTags.h for script and language codes
    77      *
    79      *
    78      * @internal
    80      * @internal
    79      */
    81      */
    80     IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
    82     IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
    81         le_int32 scriptCode, le_int32 languageCode,
    83                             le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
    82         le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
       
    83 
    84 
    84     /**
    85     /**
    85      * This constructor is used when the font requires a "canned" GSUB table which can't be known
    86      * This constructor is used when the font requires a "canned" GSUB table which can't be known
    86      * until after this constructor has been invoked.
    87      * until after this constructor has been invoked.
    87      *
    88      *
    92      * @see OpenTypeLayoutEngine
    93      * @see OpenTypeLayoutEngine
    93      * @see ScriptAndLangaugeTags.h for script and language codes
    94      * @see ScriptAndLangaugeTags.h for script and language codes
    94      *
    95      *
    95      * @internal
    96      * @internal
    96      */
    97      */
    97     IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
    98     IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
    98         le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags);
    99                               le_int32 typoFlags);
    99 
   100 
   100     /**
   101     /**
   101      * The destructor, virtual for correct polymorphic invocation.
   102      * The destructor, virtual for correct polymorphic invocation.
   102      *
   103      *
   103      * @internal
   104      * @internal
   104      */
   105      */
   105    virtual ~IndicOpenTypeLayoutEngine();
   106    virtual ~IndicOpenTypeLayoutEngine();
       
   107 
       
   108     /**
       
   109      * ICU "poor man's RTTI", returns a UClassID for the actual class.
       
   110      *
       
   111      * @stable ICU 2.8
       
   112      */
       
   113     virtual UClassID getDynamicClassID() const;
       
   114 
       
   115     /**
       
   116      * ICU "poor man's RTTI", returns a UClassID for this class.
       
   117      *
       
   118      * @stable ICU 2.8
       
   119      */
       
   120     static UClassID getStaticClassID();
   106 
   121 
   107 protected:
   122 protected:
   108 
   123 
   109     /**
   124     /**
   110      * This method does Indic OpenType character processing. It assigns the OpenType feature
   125      * This method does Indic OpenType character processing. It assigns the OpenType feature
   115      * Input parameters:
   130      * Input parameters:
   116      * @param chars - the input character context
   131      * @param chars - the input character context
   117      * @param offset - the index of the first character to process
   132      * @param offset - the index of the first character to process
   118      * @param count - the number of characters to process
   133      * @param count - the number of characters to process
   119      * @param max - the number of characters in the input context
   134      * @param max - the number of characters in the input context
   120      * @param rightToLeft - <code>TRUE</code> if the characters are in a
   135      * @param rightToLeft - <code>TRUE</code> if the characters are in a right to left directional run
   121      *    right to left directional run
   136      * @param glyphStorage - the glyph storage object. The glyph and character index arrays will be set.
   122      * @param glyphStorage - the glyph storage object. The glyph and character
   137      *                       the auxillary data array will be set to the feature tags.
   123      *    index arrays will be set. The auxillary data array will be set to the feature tags.
       
   124      *
   138      *
   125      * Output parameters:
   139      * Output parameters:
   126      * @param success - set to an error code if the operation fails
   140      * @param success - set to an error code if the operation fails
   127      *
   141      *
   128      * @return the output character count
   142      * @return the output character count
   129      *
   143      *
   130      * @internal
   144      * @internal
   131      */
   145      */
   132     virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset,
   146     virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
   133         le_int32 count, le_int32 max, le_bool rightToLeft,
   147             LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
   134         LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
       
   135 
   148 
   136     /**
   149     /**
   137      * This method does character to glyph mapping, applies the GSUB table and applies
   150      * This method does character to glyph mapping, applies the GSUB table and applies
   138      * any post GSUB fixups for left matras. It calls OpenTypeLayoutEngine::glyphProcessing
   151      * any post GSUB fixups for left matras. It calls OpenTypeLayoutEngine::glyphProcessing
   139      * to do the character to glyph mapping, and apply the GSUB table.
   152      * to do the character to glyph mapping, and apply the GSUB table.
   145      * Input parameters:
   158      * Input parameters:
   146      * @param chars - the input character context
   159      * @param chars - the input character context
   147      * @param offset - the index of the first character to process
   160      * @param offset - the index of the first character to process
   148      * @param count - the number of characters to process
   161      * @param count - the number of characters to process
   149      * @param max - the number of characters in the input context
   162      * @param max - the number of characters in the input context
   150      * @param rightToLeft - <code>TRUE</code> if the characters are in a
   163      * @param rightToLeft - <code>TRUE</code> if the characters are in a right to left directional run
   151      *    right to left directional run
       
   152      * @param featureTags - the feature tag array
   164      * @param featureTags - the feature tag array
   153      * @param glyphStorage - the glyph storage object. The glyph and char
   165      * @param glyphStorage - the glyph storage object. The glyph and char index arrays will be set.
   154      *    index arrays will be set.
       
   155      *
   166      *
   156      * Output parameters:
   167      * Output parameters:
   157      * @param success - set to an error code if the operation fails
   168      * @param success - set to an error code if the operation fails
   158      *
   169      *
   159      * @return the number of glyphs in the output glyph index array
   170      * @return the number of glyphs in the output glyph index array
   161      * Note: if the character index array was already set by the characterProcessing
   172      * Note: if the character index array was already set by the characterProcessing
   162      * method, this method won't change it.
   173      * method, this method won't change it.
   163      *
   174      *
   164      * @internal
   175      * @internal
   165      */
   176      */
   166     virtual le_int32 glyphProcessing(const LEUnicode chars[], le_int32 offset,
   177     virtual le_int32 glyphProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
   167         le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphStorage &glyphStorage,
   178             LEGlyphStorage &glyphStorage, LEErrorCode &success);
   168         LEErrorCode &success);
       
   169 
   179 
   170 private:
   180 private:
       
   181 
   171     MPreFixups *fMPreFixups;
   182     MPreFixups *fMPreFixups;
   172 };
   183 };
   173 
   184 
       
   185 U_NAMESPACE_END
   174 #endif
   186 #endif
       
   187