void setGraphemeFormats(const QVector< QgsTextCharacterFormat > &formats)
Sets the character formats associated with the text graphemes().
double characterHeight() const
Character height (actually font metrics height, not individual character height).
QgsTextCharacterFormat graphemeFormat(int index) const
Returns the character format for the grapheme at the specified index.
double characterWidth(int position) const
Returns the width of the character at the specified position.
QString grapheme(int index) const
Returns the grapheme at the specified index.
int count() const
Returns the total number of characters.
Contains precalculated properties regarding text metrics for text to be renderered at a later stage.
int graphemeFormatCount() const
Returns the number of grapheme formats available.
QgsPrecalculatedTextMetrics(const QStringList &graphemes, double characterHeight, const QVector< double > &characterWidths)
Constructor for QgsPrecalculatedTextMetrics.
QStringList graphemes() const
Returns the list of graphemes contained in the text.