28#include <QFontMetricsF>
160 res.mLastLineAscentOffset = res.mFirstLineAscentOffset;
196 thisLineHeightUsingAscentDescent = std::max( thisLineHeightUsingAscentDescent, metrics.
maxBlockFixedItemHeight );
199 documentMetrics.
currentLabelBaseline += verticalMarginBeforeBlock + thisLineHeightUsingAscentDescent;
200 documentMetrics.
currentRectBaseline += verticalMarginBeforeBlock + thisLineHeightUsingLineSpacing;
201 documentMetrics.
currentPointBaseline += verticalMarginBeforeBlock + thisLineHeightUsingLineSpacing;
207 documentMetrics.
heightLabelMode += verticalMarginBeforeBlock + thisLineHeightUsingAscentDescent;
208 documentMetrics.
heightPointRectMode += verticalMarginBeforeBlock + thisLineHeightUsingLineSpacing;
209 documentMetrics.
heightCapHeightMode += verticalMarginBeforeBlock + thisLineHeightUsingLineSpacing;
210 documentMetrics.
heightAscentMode += verticalMarginBeforeBlock + thisLineHeightUsingLineSpacing;
256 res.mDocument.
append( outputBlock );
269 if ( fragment.
isTab() )
272 double nextTabStop = 0;
276 nextTabStop = thisBlockMetrics.
blockXMax;
279 if ( tabStop >= thisBlockMetrics.
blockXMax )
281 nextTabStop = tabStop;
290 const double fragmentWidth = nextTabStop - thisBlockMetrics.
blockXMax;
293 thisBlockMetrics.
blockXMax += fragmentWidth;
301 currentOutputBlock.
append( fragment );
305 const QgsTextCharacterFormat &fragmentFormat = fragment.
characterFormat();
307 double fragmentHeightForVerticallyOffsetText = 0;
308 double fragmentYMaxAdjust = 0;
310 QFont updatedFont = font;
313 QFontMetricsF fm( updatedFont );
341 fm = QFontMetricsF( updatedFont );
361 fm = QFontMetricsF( updatedFont );
379 &fragmentHeightForVerticallyOffsetText,
382 scaleFactor]( BlockMetrics & thisBlockMetrics,
double fragmentWidth,
const QgsTextFragment & fragment )
385 thisBlockMetrics.blockYMaxAdjustLabel = std::max( thisBlockMetrics.blockYMaxAdjustLabel, fragmentYMaxAdjust );
386 thisBlockMetrics.blockHeightUsingAscentAccountingForVerticalOffset = std::max( std::max( thisBlockMetrics.maxBlockAscent, fragmentHeightForVerticallyOffsetText ), thisBlockMetrics.blockHeightUsingAscentAccountingForVerticalOffset );
388 thisBlockMetrics.fragmentHorizontalAdvance << fragmentWidth;
390 thisBlockMetrics.blockWidth += fragmentWidth;
391 thisBlockMetrics.blockXMax += fragmentWidth;
393 thisBlockMetrics.fragmentFonts << updatedFont;
395 const double verticalOrientationFragmentHeight = thisBlockMetrics.isFirstNonTabFragment ? ( fm.ascent() / scaleFactor * fragment.
text().size() + ( fragment.
text().size() - 1 ) * updatedFont.letterSpacing() / scaleFactor )
396 : ( fragment.
text().size() * ( fm.ascent() / scaleFactor + updatedFont.letterSpacing() / scaleFactor ) );
397 thisBlockMetrics.blockHeightVerticalOrientation += verticalOrientationFragmentHeight;
399 thisBlockMetrics.isFirstNonTabFragment =
false;
405 double imageHeight = 0;
406 double imageWidth = 0;
413 const QSizeF originalSizeMmAt96Dpi = imageSize / 3.7795275590551185;
415 imageWidth = originalSizeMmAt96Dpi.width() * pixelsPerMm;
416 imageHeight = originalSizeMmAt96Dpi.height() * pixelsPerMm;
423 imageWidth = originalImageSize.width() * imageHeight / originalImageSize.height();
430 imageHeight = originalImageSize.height() * imageWidth / originalImageSize.width();
440 && ( thisBlockMetrics.blockXMax + imageWidth > documentContext.
maximumWidth() )
441 && !currentOutputBlock.
empty() )
444 finalizeBlock( res, format, documentMetrics, currentOutputBlock, thisBlockMetrics );
445 thisBlockMetrics.isFirstBlock =
false;
449 thisBlockMetrics.blockHeightUsingAscentDescent = std::max( thisBlockMetrics.blockHeightUsingAscentDescent, imageHeight + fm.descent() / scaleFactor );
450 thisBlockMetrics.blockHeightUsingLineSpacing = std::max( thisBlockMetrics.blockHeightUsingLineSpacing, imageHeight + fm.leading() );
452 thisBlockMetrics.maxBlockAscent = std::max( thisBlockMetrics.maxBlockAscent, imageHeight );
453 thisBlockMetrics.maxBlockCapHeight = std::max( thisBlockMetrics.maxBlockCapHeight, imageHeight );
454 thisBlockMetrics.fragmentAscent << imageHeight;
455 thisBlockMetrics.fragmentDescent << 0;
456 thisBlockMetrics.maxLineSpacing = std::max( thisBlockMetrics.maxLineSpacing, imageHeight + fm.leading() / scaleFactor );
457 thisBlockMetrics.maxBlockLeading = std::max( thisBlockMetrics.maxBlockLeading, fm.leading() / scaleFactor );
458 thisBlockMetrics.maxBlockMaxWidth = std::max( thisBlockMetrics.maxBlockMaxWidth, imageWidth );
459 thisBlockMetrics.maxBlockFixedItemHeight = std::max( thisBlockMetrics.maxBlockFixedItemHeight, imageHeight );
460 thisBlockMetrics.fragmentFixedHeights << imageHeight;
461 updateCommonBlockMetrics( thisBlockMetrics, imageWidth, fragment );
462 currentOutputBlock.
append( fragment );
466 const double fragmentHeightUsingAscentDescent = ( fm.ascent() + fm.descent() ) / scaleFactor;
467 const double fragmentHeightUsingLineSpacing = fm.lineSpacing() / scaleFactor;
469 auto finalizeTextFragment = [fragmentHeightUsingAscentDescent,
470 fragmentHeightUsingLineSpacing,
474 &updateCommonBlockMetrics
475 ]( BlockMetrics & thisBlockMetrics,
const QgsTextFragment & fragment,
double fragmentWidth )
477 thisBlockMetrics.blockHeightUsingAscentDescent = std::max( thisBlockMetrics.blockHeightUsingAscentDescent, fragmentHeightUsingAscentDescent );
479 thisBlockMetrics.blockHeightUsingLineSpacing = std::max( thisBlockMetrics.blockHeightUsingLineSpacing, fragmentHeightUsingLineSpacing );
480 const double ascent = fm.ascent() / scaleFactor;
481 thisBlockMetrics.fragmentAscent << ascent;
482 thisBlockMetrics.maxBlockAscent = std::max( thisBlockMetrics.maxBlockAscent, ascent );
483 thisBlockMetrics.maxBlockAscentForTextFragments = std::max( thisBlockMetrics.maxBlockAscentForTextFragments, ascent );
485 thisBlockMetrics.maxBlockCapHeight = std::max( thisBlockMetrics.maxBlockCapHeight, fm.capHeight() / scaleFactor );
487 const double descent = fm.descent() / scaleFactor;
488 thisBlockMetrics.fragmentDescent << descent;
490 thisBlockMetrics.maxBlockDescent = std::max( thisBlockMetrics.maxBlockDescent, descent );
491 thisBlockMetrics.maxBlockMaxWidth = std::max( thisBlockMetrics.maxBlockMaxWidth, fm.maxWidth() / scaleFactor );
493 if ( ( fm.lineSpacing() / scaleFactor ) > thisBlockMetrics.maxLineSpacing )
495 thisBlockMetrics.maxLineSpacing = fm.lineSpacing() / scaleFactor;
496 thisBlockMetrics.maxBlockLeading = fm.leading() / scaleFactor;
498 thisBlockMetrics.fragmentFixedHeights << -1;
499 updateCommonBlockMetrics( thisBlockMetrics, fragmentWidth, fragment );
500 currentOutputBlock.append( fragment );
503 double fragmentWidth = fm.horizontalAdvance( fragment.text() ) / scaleFactor;
507 && ( thisBlockMetrics.blockXMax + fragmentWidth > documentContext.
maximumWidth() ) )
512 const QStringList words = fragment.text().split(
' ' );
513 QStringList linesToProcess;
514 QStringList wordsInCurrentLine;
515 double remainingWidthInCurrentLine = documentContext.
maximumWidth() - thisBlockMetrics.blockXMax;
516 for (
const QString &word : words )
518 const double wordWidth = fm.horizontalAdvance( word ) / scaleFactor;
519 if ( wordWidth > remainingWidthInCurrentLine )
522 if ( !wordsInCurrentLine.isEmpty() )
523 linesToProcess << wordsInCurrentLine.join(
' ' );
524 wordsInCurrentLine.clear();
525 linesToProcess << word;
526 remainingWidthInCurrentLine = documentContext.
maximumWidth();
530 wordsInCurrentLine.append( word );
533 if ( !wordsInCurrentLine.isEmpty() )
534 linesToProcess << wordsInCurrentLine.join(
' ' );
536 remainingWidthInCurrentLine = documentContext.
maximumWidth() - thisBlockMetrics.blockXMax;
537 for (
int lineIndex = 0; lineIndex < linesToProcess.size(); ++lineIndex )
539 QString remainingText = linesToProcess.at( lineIndex );
540 int lastPos = remainingText.lastIndexOf(
' ' );
541 while ( lastPos > -1 )
544 if ( ( fm.horizontalAdvance( remainingText ) / scaleFactor ) <= remainingWidthInCurrentLine )
549 const double widthTextToLastPos = fm.horizontalAdvance( remainingText.left( lastPos ) ) / scaleFactor;
550 if ( widthTextToLastPos <= remainingWidthInCurrentLine )
552 QgsTextFragment thisLineFragment;
554 thisLineFragment.
setText( remainingText.left( lastPos ) );
555 finalizeTextFragment( thisBlockMetrics, thisLineFragment, widthTextToLastPos );
557 finalizeBlock( res, format, documentMetrics, currentOutputBlock, thisBlockMetrics );
558 thisBlockMetrics.isFirstBlock =
false;
559 remainingWidthInCurrentLine = documentContext.
maximumWidth();
560 remainingText = remainingText.mid( lastPos + 1 );
563 lastPos = remainingText.lastIndexOf(
' ', lastPos - 1 );
567 if ( ( fm.horizontalAdvance( remainingText ) / scaleFactor ) > remainingWidthInCurrentLine && !currentOutputBlock.empty() )
569 finalizeBlock( res, format, documentMetrics, currentOutputBlock, thisBlockMetrics );
570 thisBlockMetrics.isFirstBlock =
false;
571 remainingWidthInCurrentLine = documentContext.
maximumWidth();
574 QgsTextFragment thisLineFragment;
576 thisLineFragment.
setText( remainingText );
577 finalizeTextFragment( thisBlockMetrics, thisLineFragment, fm.horizontalAdvance( remainingText ) / scaleFactor );
579 if ( lineIndex < linesToProcess.size() - 1 )
582 finalizeBlock( res, format, documentMetrics, currentOutputBlock, thisBlockMetrics );
583 thisBlockMetrics.isFirstBlock =
false;
584 remainingWidthInCurrentLine = documentContext.
maximumWidth();
591 finalizeTextFragment( thisBlockMetrics, fragment, fragmentWidth );
601 const QFont font = format.
scaledFont( context, scaleFactor, &res.mIsNullSize );
614 const QList< QgsTextFormat::Tab > tabPositions = format.
tabPositions();
620 ? tab.position() * font.pixelSize() / scaleFactor
627 res.mFragmentFonts.reserve( documentMetrics.
blockSize );
629 for (
int blockIndex = 0; blockIndex < documentMetrics.
blockSize; blockIndex++ )
636 const int fragmentSize = block.
size();
671 for (
int fragmentIndex = 0; fragmentIndex < fragmentSize; ++fragmentIndex )
674 processFragment( res, format, context, documentContext, scaleFactor, documentMetrics, thisBlockMetrics, font, fragment, outputBlock );
677 finalizeBlock( res, format, documentMetrics, outputBlock, thisBlockMetrics );
689 if ( !res.mBaselineOffsetsLabelMode.isEmpty() )
691 const double labelModeBaselineAdjust = res.mBaselineOffsetsLabelMode.constLast() + res.mLastLineAscentOffset;
692 const double pointModeBaselineAdjust = res.mBaselineOffsetsPointMode.constLast();
693 for (
int i = 0; i < documentMetrics.
blockSize; ++i )
695 res.mBaselineOffsetsLabelMode[i] -= labelModeBaselineAdjust;
696 res.mBaselineOffsetsPointMode[i] -= pointModeBaselineAdjust;
700 if ( !res.mBlockMaxCharacterWidth.isEmpty() )
702 QList< double > adjustedRightToLeftXOffsets;
703 double currentOffset = 0;
704 const int size = res.mBlockMaxCharacterWidth.size();
706 double widthVerticalOrientation = 0;
707 for (
int i = 0; i < size; ++i )
709 const double rightToLeftBlockMaxCharacterWidth = res.mBlockMaxCharacterWidth[size - 1 - i ];
712 adjustedRightToLeftXOffsets << currentOffset;
713 currentOffset += rightToLeftLineSpacing;
716 widthVerticalOrientation += rightToLeftBlockMaxCharacterWidth;
718 widthVerticalOrientation += rightToLeftLineSpacing;
720 std::reverse( adjustedRightToLeftXOffsets.begin(), adjustedRightToLeftXOffsets.end() );
721 res.mVerticalOrientationXOffsets = adjustedRightToLeftXOffsets;
739 switch ( orientation )
746 return mDocumentSizePointRectMode;
749 return mDocumentSizeCapHeightMode;
752 return mDocumentSizeAscentMode;
755 return mDocumentSizeLabelMode;
760 return mDocumentSizeVerticalOrientation;
770 switch ( orientation )
782 return mOuterBoundsLabelMode;
796 return mBlockWidths.value( blockIndex );
801 return mBlockHeights.value( blockIndex );
806 return mFirstLineCapHeight;
811 double verticalAdjustmentForBlockMargins = 0;
812 for (
int i = 0; i < blockIndex; ++i )
814 double marginBeforeBlock = 0;
815 verticalAdjustmentForBlockMargins += marginBeforeBlock;
821 return mBaselineOffsetsRectMode.value( blockIndex ) + verticalAdjustmentForBlockMargins;
823 return mBaselineOffsetsCapHeightMode.value( blockIndex ) + verticalAdjustmentForBlockMargins;
825 return mBaselineOffsetsAscentBased.value( blockIndex ) + verticalAdjustmentForBlockMargins;
827 return mBaselineOffsetsPointMode.value( blockIndex ) + verticalAdjustmentForBlockMargins;
829 return mBaselineOffsetsLabelMode.value( blockIndex ) + verticalAdjustmentForBlockMargins;
836 return mFragmentHorizontalAdvance.value( blockIndex ).value( fragmentIndex );
846 return mFragmentVerticalOffsetsRectMode.value( blockIndex ).value( fragmentIndex );
848 return mFragmentVerticalOffsetsPointMode.value( blockIndex ).value( fragmentIndex );
850 return mFragmentVerticalOffsetsLabelMode.value( blockIndex ).value( fragmentIndex );
857 return mFragmentFixedHeights.value( blockIndex ).value( fragmentIndex );
862 return mFragmentAscent.value( blockIndex ).value( fragmentIndex );
867 return mFragmentDescent.value( blockIndex ).value( fragmentIndex );
872 return mVerticalOrientationXOffsets.value( blockIndex );
877 return mBlockMaxCharacterWidth.value( blockIndex );
882 return mBlockMaxDescent.value( blockIndex );
887 return mBlockMaxAscent.value( blockIndex );
892 return mFragmentFonts.value( blockIndex ).value( fragmentIndex );
897 if ( blockIndex < 0 )
898 return mVerticalMarginsBetweenBlocks.value( 0 );
900 return mVerticalMarginsBetweenBlocks.value( blockIndex + 1 );
905 return mLeftBlockMargins.value( blockIndex );
910 return mRightBlockMargins.value( blockIndex );
TextLayoutMode
Text layout modes.
@ Labeling
Labeling-specific layout mode.
@ Point
Text at point of origin layout mode.
@ RectangleAscentBased
Similar to Rectangle mode, but uses ascents only when calculating font and line heights.
@ RectangleCapHeightBased
Similar to Rectangle mode, but uses cap height only when calculating font heights for the first line ...
@ Rectangle
Text within rectangle layout mode.
TextOrientation
Text orientations.
@ Vertical
Vertically oriented text.
@ RotationBased
Horizontally or vertically oriented text based on rotation (only available for map labeling).
@ Horizontal
Horizontally oriented text.
@ Normal
Adjacent characters are positioned in the standard way for text in the writing system in use.
@ SubScript
Characters are placed below the base line for normal text.
@ SuperScript
Characters are placed above the base line for normal text.
@ Percentage
Percentage of another measurement (e.g., canvas size, feature size).
@ Points
Points (e.g., for font sizes).
@ RenderBlocking
Render and load remote sources in the same thread to ensure rendering remote sources (svg and images)...
@ WrapLines
Automatically wrap long lines of text.
static QgsImageCache * imageCache()
Returns the application's image cache, used for caching resampled versions of raster images.
QSize originalSize(const QString &path, bool blocking=false) const
Returns the original size (in pixels) of the image at the specified path.
double top() const
Returns the top margin.
double right() const
Returns the right margin.
double bottom() const
Returns the bottom margin.
double left() const
Returns the left margin.
Contains information about the context of a rendering operation.
double scaleFactor() const
Returns the scaling factor for the render to convert painter units to physical sizes.
double convertToPainterUnits(double size, Qgis::RenderUnit unit, const QgsMapUnitScale &scale=QgsMapUnitScale(), Qgis::RenderSubcomponentProperty property=Qgis::RenderSubcomponentProperty::Generic) const
Converts a size from the specified units to painter units (pixels).
Qgis::RenderContextFlags flags() const
Returns combination of flags used for rendering.
double lineHeight() const
Returns the line height in points, or NaN if the line height is not set and should be auto calculated...
double lineHeightPercentage() const
Returns the line height percentage size (as fraction of font size from 0.0 to 1.0),...
QgsMargins margins() const
Returns the block margins, in points.
Represents a block of text consisting of one or more QgsTextFragment objects.
int size() const
Returns the number of fragments in the block.
const QgsTextBlockFormat & blockFormat() const
Returns the block formatting for the fragment.
void clear()
Clears the block, removing all its contents.
void reserve(int count)
Reserves the specified count of fragments for optimised fragment appending.
void setBlockFormat(const QgsTextBlockFormat &format)
Sets the block format for the fragment.
void append(const QgsTextFragment &fragment)
Appends a fragment to the block.
const QgsTextFragment & at(int index) const
Returns the fragment at the specified index.
bool empty() const
Returns true if the block is empty.
void updateFontForFormat(QFont &font, const QgsRenderContext &context, double scaleFactor=1.0) const
Updates the specified font in place, applying character formatting options which are applicable on a ...
QSizeF imageSize() const
Returns the image size, if the format applies to a document image fragment.
QString imagePath() const
Returns the path to the image to render, if the format applies to a document image fragment.
Qgis::TextCharacterVerticalAlignment verticalAlignment() const
Returns the format vertical alignment.
bool hasVerticalAlignmentSet() const
Returns true if the format has an explicit vertical alignment set.
double fontPointSize() const
Returns the font point size, or -1 if the font size is not set and should be inherited.
Contains pre-calculated metrics of a QgsTextDocument.
double verticalOrientationXOffset(int blockIndex) const
Returns the vertical orientation x offset for the specified block.
double fragmentVerticalOffset(int blockIndex, int fragmentIndex, Qgis::TextLayoutMode mode) const
Returns the vertical offset from a text block's baseline which should be applied to the fragment at t...
double blockMaximumDescent(int blockIndex) const
Returns the maximum descent encountered in the specified block.
double fragmentDescent(int blockIndex, int fragmentIndex, Qgis::TextLayoutMode mode) const
Returns the descent of the fragment at the specified block and fragment index.
QSizeF documentSize(Qgis::TextLayoutMode mode, Qgis::TextOrientation orientation) const
Returns the overall size of the document.
double blockRightMargin(int blockIndex) const
Returns the margin for the right side of the specified block index.
double firstLineCapHeight() const
Returns the cap height for the first line of text.
static QgsTextDocumentMetrics calculateMetrics(const QgsTextDocument &document, const QgsTextFormat &format, const QgsRenderContext &context, double scaleFactor=1.0, const QgsTextDocumentRenderContext &documentContext=QgsTextDocumentRenderContext())
Returns precalculated text metrics for a text document, when rendered using the given base format and...
QFont fragmentFont(int blockIndex, int fragmentIndex) const
Returns the calculated font for the fragment at the specified block and fragment indices.
double blockMaximumCharacterWidth(int blockIndex) const
Returns the maximum character width for the specified block.
double baselineOffset(int blockIndex, Qgis::TextLayoutMode mode) const
Returns the offset from the top of the document to the text baseline for the given block index.
double fragmentFixedHeight(int blockIndex, int fragmentIndex, Qgis::TextLayoutMode mode) const
Returns the fixed height of the fragment at the specified block and fragment index,...
QRectF outerBounds(Qgis::TextLayoutMode mode, Qgis::TextOrientation orientation) const
Returns the outer bounds of the document, which is the documentSize() adjusted to account for any tex...
double blockLeftMargin(int blockIndex) const
Returns the margin for the left side of the specified block index.
double blockMaximumAscent(int blockIndex) const
Returns the maximum ascent encountered in the specified block.
double fragmentAscent(int blockIndex, int fragmentIndex, Qgis::TextLayoutMode mode) const
Returns the ascent of the fragment at the specified block and fragment index.
double blockHeight(int blockIndex) const
Returns the height of the block at the specified index.
double fragmentHorizontalAdvance(int blockIndex, int fragmentIndex, Qgis::TextLayoutMode mode) const
Returns the horizontal advance of the fragment at the specified block and fragment index.
bool isNullFontSize() const
Returns true if the metrics could not be calculated because the text format has a null font size.
const QgsTextDocument & document() const
Returns the document associated with the calculated metrics.
double blockWidth(int blockIndex) const
Returns the width of the block at the specified index.
double blockVerticalMargin(int blockIndex) const
Returns the vertical margin for the specified block index.
Encapsulates the context in which a text document is to be rendered.
Qgis::TextRendererFlags flags() const
Returns associated text renderer flags.
double maximumWidth() const
Returns the maximum width (in painter units) for rendered text.
Represents a document consisting of one or more QgsTextBlock objects.
void reserve(int count)
Reserves the specified count of blocks for optimised block appending.
void append(const QgsTextBlock &block)
Appends a block to the document.
Defines a tab position for a text format.
Container for all settings relating to text rendering.
QList< QgsTextFormat::Tab > tabPositions() const
Returns the list of tab positions for tab stops.
double lineHeight() const
Returns the line height for text.
double tabStopDistance() const
Returns the distance for tab stops.
QFont scaledFont(const QgsRenderContext &context, double scaleFactor=1.0, bool *isZeroSize=nullptr) const
Returns a font with the size scaled to match the format's size settings (including units and map unit...
Qgis::RenderUnit lineHeightUnit() const
Returns the units for the line height for text.
Qgis::RenderUnit tabStopDistanceUnit() const
Returns the units for the tab stop distance.
QgsMapUnitScale tabStopDistanceMapUnitScale() const
Returns the map unit scale object for the tab stop distance.
Stores a fragment of document along with formatting overrides to be used when rendering the fragment.
void setText(const QString &text)
Sets the text content of the fragment.
QString text() const
Returns the text content of the fragment.
void setCharacterFormat(const QgsTextCharacterFormat &format)
Sets the character format for the fragment.
const QgsTextCharacterFormat & characterFormat() const
Returns the character formatting for the fragment.
bool isImage() const
Returns true if the fragment represents an image.
bool isTab() const
Returns true if the fragment consists of just a tab character.
static constexpr double SUPERSCRIPT_SUBSCRIPT_FONT_SIZE_SCALING_FACTOR
Scale factor to use for super or subscript text which doesn't have an explicit font size set.
#define BUILTIN_UNREACHABLE
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference).
constexpr double SUPERSCRIPT_VERTICAL_BASELINE_ADJUSTMENT_FACTOR
constexpr double SUBSCRIPT_VERTICAL_BASELINE_ADJUSTMENT_FACTOR
double maxBlockFixedItemHeight
double maxBlockAscentForTextFragments
void resetCalculatedStats()
double blockHeightUsingLineSpacing
QList< QFont > fragmentFonts
QList< double > fragmentDescent
QList< double > fragmentFixedHeights
double lineHeightPainterUnits
QList< double > fragmentHorizontalAdvance
bool isFirstNonTabFragment
double blockHeightUsingAscentDescent
QFont previousNonSuperSubScriptFont
double blockHeightUsingAscentAccountingForVerticalOffset
QList< double > fragmentAscent
QList< double > fragmentVerticalOffsets
double blockYMaxAdjustLabel
double lineHeightPercentage
double blockHeightVerticalOrientation
double heightVerticalOrientation
double tabStopDistancePainterUnits
QList< double > tabStopDistancesPainterUnits
QVector< double > blockRightMargin
double heightCapHeightMode
double currentCapHeightBasedBaseline
QVector< double > blockLeftMargin
double currentLabelBaseline
QVector< double > blockVerticalLineSpacing
double currentRectBaseline
QVector< double > verticalMarginsBetweenBlocks
Calculated vertical margins between blocks.
double currentPointBaseline
double heightPointRectMode
double currentAscentBasedBaseline