- /**
- * @brief Replaces script runs for the given range of characters.
- *
- * If the @p numberOfCharactersToRemove is zero, this operation is like an insert.
- * If the @p numberOfCharactersToInsert is zero, this operation is like a remove.
- *
- * @param[in] characterIndex Index of the first character where to replace the scripts.
- * @param[in] numberOfCharactersToRemove The number of characters to be the script removed.
- * @param[in] scriptRuns Pointer to a buffer with the script runs.
- * @param[in] numberOfCharactersToInsert The number of characters to be the script inserted.
- */
- void ReplaceScripts( CharacterIndex characterIndex,
- Length numberOfCharactersToRemove,
- const ScriptRun* const scriptRuns,
- Length numberOfCharactersToInsert );
-
- /**
- * @brief Sets the font runs.
- *
- * Replaces any fonts previously set.
- *
- * A run is a group of consecutive characters. A font run contains the font id for a run.
- *
- * @note If the number of runs is zero the font buffer is cleared.
- *
- * @param[in] fonts Pointer to a buffer with all the font runs.
- * @param[in] numberOfRuns The number of font runs.
- */
- void SetFonts( const FontRun* const fonts,
- Length numberOfRuns );
-
- /**
- * @brief Retrieves the number of font runs and the index of the first one for the given range of characters.
- *
- * A run is a group of consecutive characters. A font run contains the font id for a run.
- *
- * @param[in] characterIndex Index to the first character.
- * @param[in] numberOfCharacters The number of characters.
- * @param[out] firstFontRun Index to the font run containing the character index.
- * @param[out] numberOfFontRuns The number of font runs.
- */
- void GetNumberOfFontRuns( CharacterIndex characterIndex,
- Length numberOfCharacters,
- FontRunIndex& firstFontRun,
- Length& numberOfFontRuns ) const;
-
- /**
- * @brief Retrieves the font runs for the given range of characters.
- *
- * The @p fontRuns buffer needs to be big enough to copy the number of font runs.
- * Call GetNumberOfFontRuns() to retrieve the number of font runs.
- *
- * @param[out] fontRuns Pointer to a buffer where the font runs are copied.
- * @param[in] characterIndex Index to the first character.
- * @param[in] numberOfCharacters The number of characters.
- */
- void GetFontRuns( FontRun* fontRuns,
- CharacterIndex characterIndex,
- Length numberOfCharacters ) const;
-
- /**
- * @brief Retrieves the font id for the given character index.
- *
- * @param[in] characterIndex Index to the first character.
- *
- * @return The font id.
- */
- FontId GetFont( CharacterIndex characterIndex ) const;
-
- /**
- * @brief Replaces font runs for the given range of characters.
- *
- * If the @p numberOfCharactersToRemove is zero, this operation is like an insert.
- * If the @p numberOfCharactersToInsert is zero, this operation is like a remove.
- *
- * @param[in] characterIndex Index of the first character where to replace the fonts.
- * @param[in] numberOfCharactersToRemove The number of characters to be the font removed.
- * @param[in] fontRuns Pointer to a buffer with the font runs.
- * @param[in] numberOfCharactersToInsert The number of characters to be the font inserted.
- */
- void ReplaceFonts( CharacterIndex characterIndex,
- Length numberOfCharactersToRemove,
- const FontRun* const fontRuns,
- Length numberOfCharactersToInsert );
-
- // Break info interface.
-
- /**
- * @brief Sets the line break info.
- *
- * See GetLineBreakInfo() to get how the line break info is encoded.
- *
- * Replaces any line break info previously set.
- *
- * @note If the @length is zero the break info buffer is cleared.
- *
- * @param[in] lineBreakInfo Pointer to a buffer with the line break info.
- * @param[in] length The size of the buffer.
- */
- void SetLineBreakInfo( const LineBreakInfo* const lineBreakInfo,
- Length length );