/*
- * (C) Copyright IBM Corp. 1998-2011 - All Rights Reserved
+ * (C) Copyright IBM Corp. and others 1998-2014 - All Rights Reserved
*/
#ifndef __LAYOUTENGINE_H
/**
* \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
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
* @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:
* 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
* 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();
* 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);
*
* @return the number of glyphs in the glyph array
*
- * @stable ICU 2.8
+ * @deprecated ICU 54. See {@link icu::LayoutEngine}
*/
le_int32 getGlyphCount() const;
* @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;
* @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;
* @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;
* @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;
* @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;
* @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;
* 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();
*
* @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();