X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/4388f060552cc537e71e957d32f35e9d75a61233..ef6cf650f4a75c3f97de06b51fa104f2069b9ea2:/icuSources/layout/LayoutEngine.h diff --git a/icuSources/layout/LayoutEngine.h b/icuSources/layout/LayoutEngine.h index b76f5748..84794ec5 100644 --- a/icuSources/layout/LayoutEngine.h +++ b/icuSources/layout/LayoutEngine.h @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 1998-2011 - All Rights Reserved + * (C) Copyright IBM Corp. and others 1998-2014 - All Rights Reserved */ #ifndef __LAYOUTENGINE_H @@ -9,7 +9,7 @@ /** * \file - * \brief C++ API: Virtual base class for complex text layout. + * \brief C++ API: DEPRECATED: Virtual base class for complex text layout. */ U_NAMESPACE_BEGIN @@ -19,6 +19,10 @@ class LEGlyphFilter; class LEGlyphStorage; /** + * NOTE: This class is deprecated, please instead use HarfBuzz. + * See: http://www.freedesktop.org/wiki/Software/HarfBuzz/ + * and http://userguide.icu-project.org/layoutengine + * * This is a virtual base class used to do complex text layout. The text must all * be in a single font, script, and language. An instance of a LayoutEngine can be * created by calling the layoutEngineFactory method. Fonts are identified by @@ -59,15 +63,18 @@ class LEGlyphStorage; * @see LEFontInstance * @see ScriptAndLanguageTags.h * - * @stable ICU 2.8 + * @deprecated ICU 54. See {@link icu::LayoutEngine} + * Instead, please use HarfBuzz. + * see http://www.freedesktop.org/wiki/Software/HarfBuzz/ + * and http://userguide.icu-project.org/layoutengine */ class U_LAYOUT_API LayoutEngine : public UObject { public: #ifndef U_HIDE_INTERNAL_API - /** @internal Flag to request kerning. */ + /** @internal Flag to request kerning. Use LE_Kerning_FEATURE_FLAG instead. */ static const le_int32 kTypoFlagKern; - /** @internal Flag to request ligatures. */ - static const le_int32 kTypoFlagLiga; + /** @internal Flag to request ligatures. Use LE_Ligatures_FEATURE_FLAG instead. */ + static const le_int32 kTypoFlagLiga; #endif /* U_HIDE_INTERNAL_API */ protected: @@ -252,12 +259,18 @@ protected: * some other way must override this method. * * @param tableTag - the four byte table tag. + * @param length - length to use * * @return the address of the table. * * @internal */ - virtual const void *getFontTable(LETag tableTag) const; + virtual const void *getFontTable(LETag tableTag, size_t &length) const; + + /** + * @deprecated ICU 54. See {@link icu::LayoutEngine} + */ + virtual const void *getFontTable(LETag tableTag) const { size_t ignored; return getFontTable(tableTag, ignored); } /** * This method does character to glyph mapping. The default implementation @@ -330,7 +343,7 @@ public: * method. It is declared virtual so that it will be invoked by the * subclass destructors. * - * @stable ICU 2.8 + * @deprecated ICU 54. See {@link icu::LayoutEngine} */ virtual ~LayoutEngine(); @@ -357,7 +370,7 @@ public: * method first to free the glyph, character index and position arrays * allocated by the previous call. * - * @stable ICU 2.8 + * @deprecated ICU 54. See {@link icu::LayoutEngine} */ virtual le_int32 layoutChars(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, float x, float y, LEErrorCode &success); @@ -368,7 +381,7 @@ public: * * @return the number of glyphs in the glyph array * - * @stable ICU 2.8 + * @deprecated ICU 54. See {@link icu::LayoutEngine} */ le_int32 getGlyphCount() const; @@ -380,7 +393,7 @@ public: * @param glyphs - the destiniation glyph array * @param success - set to an error code if the operation fails * - * @stable ICU 2.8 + * @deprecated ICU 54. See {@link icu::LayoutEngine} */ void getGlyphs(LEGlyphID glyphs[], LEErrorCode &success) const; @@ -394,7 +407,7 @@ public: * @param extraBits - this value will be ORed with each glyph index * @param success - set to an error code if the operation fails * - * @stable ICU 2.8 + * @deprecated ICU 54. See {@link icu::LayoutEngine} */ virtual void getGlyphs(le_uint32 glyphs[], le_uint32 extraBits, LEErrorCode &success) const; @@ -406,7 +419,7 @@ public: * @param charIndices - the destiniation character index array * @param success - set to an error code if the operation fails * - * @stable ICU 2.8 + * @deprecated ICU 54. See {@link icu::LayoutEngine} */ void getCharIndices(le_int32 charIndices[], LEErrorCode &success) const; @@ -419,7 +432,7 @@ public: * @param indexBase - an offset which will be added to each index * @param success - set to an error code if the operation fails * - * @stable ICU 2.8 + * @deprecated ICU 54. See {@link icu::LayoutEngine} */ void getCharIndices(le_int32 charIndices[], le_int32 indexBase, LEErrorCode &success) const; @@ -432,7 +445,7 @@ public: * @param positions - the destiniation position array * @param success - set to an error code if the operation fails * - * @stable ICU 2.8 + * @deprecated ICU 54. See {@link icu::LayoutEngine} */ void getGlyphPositions(float positions[], LEErrorCode &success) const; @@ -448,7 +461,7 @@ public: * @param y - the glyph's Y position * @param success - set to an error code if the operation fails * - * @stable ICU 2.8 + * @deprecated ICU 54. See {@link icu::LayoutEngine} */ void getGlyphPosition(le_int32 glyphIndex, float &x, float &y, LEErrorCode &success) const; @@ -457,7 +470,7 @@ public: * so that the LayoutEngine can be reused to layout a different * characer array. (This method is also called by the destructor) * - * @stable ICU 2.8 + * @deprecated ICU 54. See {@link icu::LayoutEngine} */ virtual void reset(); @@ -475,27 +488,27 @@ public: * * @see LEFontInstance * - * @stable ICU 2.8 + * @deprecated ICU 54. See {@link icu::LayoutEngine} */ static LayoutEngine *layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, LEErrorCode &success); /** * Override of existing call that provides flags to control typography. - * @stable ICU 3.4 + * @deprecated ICU 54. See {@link icu::LayoutEngine} */ static LayoutEngine *layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typo_flags, LEErrorCode &success); /** * ICU "poor man's RTTI", returns a UClassID for the actual class. * - * @stable ICU 2.8 + * @deprecated ICU 54. See {@link icu::LayoutEngine} */ virtual UClassID getDynamicClassID() const; /** * ICU "poor man's RTTI", returns a UClassID for this class. * - * @stable ICU 2.8 + * @deprecated ICU 54. See {@link icu::LayoutEngine} */ static UClassID getStaticClassID();