diff --git a/python/core/auto_generated/textrenderer/qgstextcharacterformat.sip.in b/python/core/auto_generated/textrenderer/qgstextcharacterformat.sip.in index 01ba7da7d7d..4ddecbf3995 100644 --- a/python/core/auto_generated/textrenderer/qgstextcharacterformat.sip.in +++ b/python/core/auto_generated/textrenderer/qgstextcharacterformat.sip.in @@ -193,7 +193,7 @@ Sets whether the format has overline ``enabled``. void updateFontForFormat( QFont &font, const QgsRenderContext &context, double scaleFactor = 1.0 ) const; %Docstring Updates the specified ``font`` in place, applying character formatting options which -are applicable on a font level. +are applicable on a font level when rendered in the given ``context``. The optional ``scaleFactor`` parameter can specify a font size scaling factor. It is recommended to set this to :py:class:`QgsTextRenderer`.FONT_WORKAROUND_SCALE and then manually calculations diff --git a/src/core/labeling/qgstextlabelfeature.h b/src/core/labeling/qgstextlabelfeature.h index f10ec5042fb..16e43d9117c 100644 --- a/src/core/labeling/qgstextlabelfeature.h +++ b/src/core/labeling/qgstextlabelfeature.h @@ -119,6 +119,7 @@ class CORE_EXPORT QgsTextLabelFeature : public QgsLabelFeature /** * Sets the \a document and document \a metrics for the label. + * * \see document() * \since QGIS 3.14 */ diff --git a/src/core/textrenderer/qgstextcharacterformat.h b/src/core/textrenderer/qgstextcharacterformat.h index df3f51de899..822ea2ecc98 100644 --- a/src/core/textrenderer/qgstextcharacterformat.h +++ b/src/core/textrenderer/qgstextcharacterformat.h @@ -196,7 +196,7 @@ class CORE_EXPORT QgsTextCharacterFormat /** * Updates the specified \a font in place, applying character formatting options which - * are applicable on a font level. + * are applicable on a font level when rendered in the given \a context. * * The optional \a scaleFactor parameter can specify a font size scaling factor. It is recommended to set this to * QgsTextRenderer::FONT_WORKAROUND_SCALE and then manually calculations diff --git a/src/core/textrenderer/qgstextdocumentmetrics.cpp b/src/core/textrenderer/qgstextdocumentmetrics.cpp index 308051322c2..81c5b2299c1 100644 --- a/src/core/textrenderer/qgstextdocumentmetrics.cpp +++ b/src/core/textrenderer/qgstextdocumentmetrics.cpp @@ -35,8 +35,6 @@ QgsTextDocumentMetrics QgsTextDocumentMetrics::calculateMetrics( const QgsTextDo // for absolute line heights const double lineHeightPainterUnits = context.convertToPainterUnits( format.lineHeight(), format.lineHeightUnit() ); - // TODO orientation handling - double width = 0; double heightLabelMode = 0; double heightPointRectMode = 0; diff --git a/src/core/textrenderer/qgstextmetrics.h b/src/core/textrenderer/qgstextmetrics.h index 4fdf27848f1..eb3b7a19585 100644 --- a/src/core/textrenderer/qgstextmetrics.h +++ b/src/core/textrenderer/qgstextmetrics.h @@ -73,21 +73,29 @@ class CORE_EXPORT QgsPrecalculatedTextMetrics /** * Returns the character height of the character at the specified position (actually font metrics height, not individual character height). + * + * \since QGIS 3.28 */ double characterHeight( int position ) const { return mCharacterHeights[position]; } /** * Returns the descent of the character at the specified position. + * + * \since QGIS 3.28 */ double characterDescent( int position ) const { return mCharacterDescents[position]; } /** * Returns the maximum height of any character found in the text. + * + * \since QGIS 3.28 */ double maximumCharacterHeight() const { return mMaximumCharacterHeight; } /** * Returns the maximum descent of any character found in the text. + * + * \since QGIS 3.28 */ double maximumCharacterDescent() const { return mMaximumCharacterDescent; }