28#include <QFontMetricsF>
160 res.mLastLineAscentOffset = res.mFirstLineAscentOffset;
194 : metrics.lineHeightPainterUnits;
197 thisLineHeightUsingAscentDescent = std::max( thisLineHeightUsingAscentDescent, metrics.
maxBlockFixedItemHeight );
200 documentMetrics.
currentLabelBaseline += verticalMarginBeforeBlock + thisLineHeightUsingAscentDescent;
201 documentMetrics.
currentRectBaseline += verticalMarginBeforeBlock + thisLineHeightUsingLineSpacing;
202 documentMetrics.
currentPointBaseline += verticalMarginBeforeBlock + thisLineHeightUsingLineSpacing;
208 documentMetrics.
heightLabelMode += verticalMarginBeforeBlock + thisLineHeightUsingAscentDescent;
209 documentMetrics.
heightPointRectMode += verticalMarginBeforeBlock + thisLineHeightUsingLineSpacing;
210 documentMetrics.
heightCapHeightMode += verticalMarginBeforeBlock + thisLineHeightUsingLineSpacing;
211 documentMetrics.
heightAscentMode += verticalMarginBeforeBlock + thisLineHeightUsingLineSpacing;
257 res.mDocument.
append( outputBlock );
268void QgsTextDocumentMetrics::processFragment(
281 if ( fragment.
isTab() )
284 double nextTabStop = 0;
288 nextTabStop = thisBlockMetrics.
blockXMax;
291 if ( tabStop >= thisBlockMetrics.
blockXMax )
293 nextTabStop = tabStop;
302 const double fragmentWidth = nextTabStop - thisBlockMetrics.
blockXMax;
305 thisBlockMetrics.
blockXMax += fragmentWidth;
313 currentOutputBlock.
append( fragment );
317 const QgsTextCharacterFormat &fragmentFormat = fragment.
characterFormat();
319 double fragmentHeightForVerticallyOffsetText = 0;
320 double fragmentYMaxAdjust = 0;
322 QFont updatedFont = font;
325 QFontMetricsF fm( updatedFont );
353 fm = QFontMetricsF( updatedFont );
373 fm = QFontMetricsF( updatedFont );
391 &fragmentHeightForVerticallyOffsetText,
394 scaleFactor]( BlockMetrics &thisBlockMetrics,
double fragmentWidth,
const QgsTextFragment &fragment ) {
396 thisBlockMetrics.blockYMaxAdjustLabel = std::max( thisBlockMetrics.blockYMaxAdjustLabel, fragmentYMaxAdjust );
397 thisBlockMetrics.blockHeightUsingAscentAccountingForVerticalOffset
398 = std::max( std::max( thisBlockMetrics.maxBlockAscent, fragmentHeightForVerticallyOffsetText ), thisBlockMetrics.blockHeightUsingAscentAccountingForVerticalOffset );
400 thisBlockMetrics.fragmentHorizontalAdvance << fragmentWidth;
402 thisBlockMetrics.blockWidth += fragmentWidth;
403 thisBlockMetrics.blockXMax += fragmentWidth;
405 thisBlockMetrics.fragmentFonts << updatedFont;
407 const double verticalOrientationFragmentHeight = thisBlockMetrics.isFirstNonTabFragment
408 ? ( fm.ascent() / scaleFactor * fragment.
text().size() + ( fragment.
text().size() - 1 ) * updatedFont.letterSpacing() / scaleFactor )
409 : ( fragment.
text().size() * ( fm.ascent() / scaleFactor + updatedFont.letterSpacing() / scaleFactor ) );
410 thisBlockMetrics.blockHeightVerticalOrientation += verticalOrientationFragmentHeight;
412 thisBlockMetrics.isFirstNonTabFragment =
false;
418 double imageHeight = 0;
419 double imageWidth = 0;
426 const QSizeF originalSizeMmAt96Dpi = imageSize / 3.7795275590551185;
428 imageWidth = originalSizeMmAt96Dpi.width() * pixelsPerMm;
429 imageHeight = originalSizeMmAt96Dpi.height() * pixelsPerMm;
436 imageWidth = originalImageSize.width() * imageHeight / originalImageSize.height();
443 imageHeight = originalImageSize.height() * imageWidth / originalImageSize.width();
454 && ( thisBlockMetrics.blockXMax + imageWidth > documentContext.
maximumWidth() )
455 && !currentOutputBlock.
empty() )
458 finalizeBlock( res, format, documentMetrics, currentOutputBlock, thisBlockMetrics );
459 thisBlockMetrics.isFirstBlock =
false;
463 thisBlockMetrics.blockHeightUsingAscentDescent = std::max( thisBlockMetrics.blockHeightUsingAscentDescent, imageHeight + fm.descent() / scaleFactor );
464 thisBlockMetrics.blockHeightUsingLineSpacing = std::max( thisBlockMetrics.blockHeightUsingLineSpacing, imageHeight + fm.leading() );
466 thisBlockMetrics.maxBlockAscent = std::max( thisBlockMetrics.maxBlockAscent, imageHeight );
467 thisBlockMetrics.maxBlockCapHeight = std::max( thisBlockMetrics.maxBlockCapHeight, imageHeight );
468 thisBlockMetrics.fragmentAscent << imageHeight;
469 thisBlockMetrics.fragmentDescent << 0;
470 thisBlockMetrics.maxLineSpacing = std::max( thisBlockMetrics.maxLineSpacing, imageHeight + fm.leading() / scaleFactor );
471 thisBlockMetrics.maxBlockLeading = std::max( thisBlockMetrics.maxBlockLeading, fm.leading() / scaleFactor );
472 thisBlockMetrics.maxBlockMaxWidth = std::max( thisBlockMetrics.maxBlockMaxWidth, imageWidth );
473 thisBlockMetrics.maxBlockFixedItemHeight = std::max( thisBlockMetrics.maxBlockFixedItemHeight, imageHeight );
474 thisBlockMetrics.fragmentFixedHeights << imageHeight;
475 updateCommonBlockMetrics( thisBlockMetrics, imageWidth, fragment );
476 currentOutputBlock.
append( fragment );
480 const double fragmentHeightUsingAscentDescent = ( fm.ascent() + fm.descent() ) / scaleFactor;
481 const double fragmentHeightUsingLineSpacing = fm.lineSpacing() / scaleFactor;
483 auto finalizeTextFragment = [fragmentHeightUsingAscentDescent,
484 fragmentHeightUsingLineSpacing,
488 &updateCommonBlockMetrics]( BlockMetrics &thisBlockMetrics,
const QgsTextFragment &fragment,
double fragmentWidth ) {
489 thisBlockMetrics.blockHeightUsingAscentDescent = std::max( thisBlockMetrics.blockHeightUsingAscentDescent, fragmentHeightUsingAscentDescent );
491 thisBlockMetrics.blockHeightUsingLineSpacing = std::max( thisBlockMetrics.blockHeightUsingLineSpacing, fragmentHeightUsingLineSpacing );
492 const double ascent = fm.ascent() / scaleFactor;
493 thisBlockMetrics.fragmentAscent << ascent;
494 thisBlockMetrics.maxBlockAscent = std::max( thisBlockMetrics.maxBlockAscent, ascent );
495 thisBlockMetrics.maxBlockAscentForTextFragments = std::max( thisBlockMetrics.maxBlockAscentForTextFragments, ascent );
497 thisBlockMetrics.maxBlockCapHeight = std::max( thisBlockMetrics.maxBlockCapHeight, fm.capHeight() / scaleFactor );
499 const double descent = fm.descent() / scaleFactor;
500 thisBlockMetrics.fragmentDescent << descent;
502 thisBlockMetrics.maxBlockDescent = std::max( thisBlockMetrics.maxBlockDescent, descent );
503 thisBlockMetrics.maxBlockMaxWidth = std::max( thisBlockMetrics.maxBlockMaxWidth, fm.maxWidth() / scaleFactor );
505 if ( ( fm.lineSpacing() / scaleFactor ) > thisBlockMetrics.maxLineSpacing )
507 thisBlockMetrics.maxLineSpacing = fm.lineSpacing() / scaleFactor;
508 thisBlockMetrics.maxBlockLeading = fm.leading() / scaleFactor;
510 thisBlockMetrics.fragmentFixedHeights << -1;
511 updateCommonBlockMetrics( thisBlockMetrics, fragmentWidth, fragment );
512 currentOutputBlock.append( fragment );
515 double fragmentWidth = fm.horizontalAdvance( fragment.text() ) / scaleFactor;
523 const QStringList words = fragment.text().split(
' ' );
524 QStringList linesToProcess;
525 QStringList wordsInCurrentLine;
526 double remainingWidthInCurrentLine = documentContext.
maximumWidth() - thisBlockMetrics.blockXMax;
527 for (
const QString &word : words )
529 const double wordWidth = fm.horizontalAdvance( word ) / scaleFactor;
530 if ( wordWidth > remainingWidthInCurrentLine )
533 if ( !wordsInCurrentLine.isEmpty() )
534 linesToProcess << wordsInCurrentLine.join(
' ' );
535 wordsInCurrentLine.clear();
536 linesToProcess << word;
537 remainingWidthInCurrentLine = documentContext.
maximumWidth();
541 wordsInCurrentLine.append( word );
544 if ( !wordsInCurrentLine.isEmpty() )
545 linesToProcess << wordsInCurrentLine.join(
' ' );
547 remainingWidthInCurrentLine = documentContext.
maximumWidth() - thisBlockMetrics.blockXMax;
548 for (
int lineIndex = 0; lineIndex < linesToProcess.size(); ++lineIndex )
550 QString remainingText = linesToProcess.at( lineIndex );
551 int lastPos = remainingText.lastIndexOf(
' ' );
552 while ( lastPos > -1 )
555 if ( ( fm.horizontalAdvance( remainingText ) / scaleFactor ) <= remainingWidthInCurrentLine )
560 const double widthTextToLastPos = fm.horizontalAdvance( remainingText.left( lastPos ) ) / scaleFactor;
561 if ( widthTextToLastPos <= remainingWidthInCurrentLine )
563 QgsTextFragment thisLineFragment;
565 thisLineFragment.
setText( remainingText.left( lastPos ) );
566 finalizeTextFragment( thisBlockMetrics, thisLineFragment, widthTextToLastPos );
568 finalizeBlock( res, format, documentMetrics, currentOutputBlock, thisBlockMetrics );
569 thisBlockMetrics.isFirstBlock =
false;
570 remainingWidthInCurrentLine = documentContext.
maximumWidth();
571 remainingText = remainingText.mid( lastPos + 1 );
574 lastPos = remainingText.lastIndexOf(
' ', lastPos - 1 );
578 if ( ( fm.horizontalAdvance( remainingText ) / scaleFactor ) > remainingWidthInCurrentLine && !currentOutputBlock.empty() )
580 finalizeBlock( res, format, documentMetrics, currentOutputBlock, thisBlockMetrics );
581 thisBlockMetrics.isFirstBlock =
false;
582 remainingWidthInCurrentLine = documentContext.
maximumWidth();
585 QgsTextFragment thisLineFragment;
587 thisLineFragment.
setText( remainingText );
588 finalizeTextFragment( thisBlockMetrics, thisLineFragment, fm.horizontalAdvance( remainingText ) / scaleFactor );
590 if ( lineIndex < linesToProcess.size() - 1 )
593 finalizeBlock( res, format, documentMetrics, currentOutputBlock, thisBlockMetrics );
594 thisBlockMetrics.isFirstBlock =
false;
595 remainingWidthInCurrentLine = documentContext.
maximumWidth();
602 finalizeTextFragment( thisBlockMetrics, fragment, fragmentWidth );
614 const QFont font = format.
scaledFont( context, scaleFactor, &res.mIsNullSize );
627 const QList< QgsTextFormat::Tab > tabPositions = format.
tabPositions();
639 res.mFragmentFonts.reserve( documentMetrics.
blockSize );
641 for (
int blockIndex = 0; blockIndex < documentMetrics.
blockSize; blockIndex++ )
648 const int fragmentSize = block.
size();
679 for (
int fragmentIndex = 0; fragmentIndex < fragmentSize; ++fragmentIndex )
682 processFragment( res, format, context, documentContext, scaleFactor, documentMetrics, thisBlockMetrics, font, fragment, outputBlock );
685 finalizeBlock( res, format, documentMetrics, outputBlock, thisBlockMetrics );
697 if ( !res.mBaselineOffsetsLabelMode.isEmpty() )
699 const double labelModeBaselineAdjust = res.mBaselineOffsetsLabelMode.constLast() + res.mLastLineAscentOffset;
700 const double pointModeBaselineAdjust = res.mBaselineOffsetsPointMode.constLast();
701 for (
int i = 0; i < documentMetrics.
blockSize; ++i )
703 res.mBaselineOffsetsLabelMode[i] -= labelModeBaselineAdjust;
704 res.mBaselineOffsetsPointMode[i] -= pointModeBaselineAdjust;
708 if ( !res.mBlockMaxCharacterWidth.isEmpty() )
710 QList< double > adjustedRightToLeftXOffsets;
711 double currentOffset = 0;
712 const int size = res.mBlockMaxCharacterWidth.size();
714 double widthVerticalOrientation = 0;
715 for (
int i = 0; i < size; ++i )
717 const double rightToLeftBlockMaxCharacterWidth = res.mBlockMaxCharacterWidth[size - 1 - i];
720 adjustedRightToLeftXOffsets << currentOffset;
721 currentOffset += rightToLeftLineSpacing;
724 widthVerticalOrientation += rightToLeftBlockMaxCharacterWidth;
726 widthVerticalOrientation += rightToLeftLineSpacing;
728 std::reverse( adjustedRightToLeftXOffsets.begin(), adjustedRightToLeftXOffsets.end() );
729 res.mVerticalOrientationXOffsets = adjustedRightToLeftXOffsets;
738 res.mOuterBoundsLabelMode = QRectF(
750 switch ( orientation )
757 return mDocumentSizePointRectMode;
760 return mDocumentSizeCapHeightMode;
763 return mDocumentSizeAscentMode;
766 return mDocumentSizeLabelMode;
771 return mDocumentSizeVerticalOrientation;
781 switch ( orientation )
793 return mOuterBoundsLabelMode;
807 return mBlockWidths.value( blockIndex );
812 return mBlockHeights.value( blockIndex );
817 return mFirstLineCapHeight;
822 double verticalAdjustmentForBlockMargins = 0;
823 for (
int i = 0; i < blockIndex; ++i )
825 double marginBeforeBlock = 0;
826 verticalAdjustmentForBlockMargins += marginBeforeBlock;
832 return mBaselineOffsetsRectMode.value( blockIndex ) + verticalAdjustmentForBlockMargins;
834 return mBaselineOffsetsCapHeightMode.value( blockIndex ) + verticalAdjustmentForBlockMargins;
836 return mBaselineOffsetsAscentBased.value( blockIndex ) + verticalAdjustmentForBlockMargins;
838 return mBaselineOffsetsPointMode.value( blockIndex ) + verticalAdjustmentForBlockMargins;
840 return mBaselineOffsetsLabelMode.value( blockIndex ) + verticalAdjustmentForBlockMargins;
847 return mFragmentHorizontalAdvance.value( blockIndex ).value( fragmentIndex );
857 return mFragmentVerticalOffsetsRectMode.value( blockIndex ).value( fragmentIndex );
859 return mFragmentVerticalOffsetsPointMode.value( blockIndex ).value( fragmentIndex );
861 return mFragmentVerticalOffsetsLabelMode.value( blockIndex ).value( fragmentIndex );
868 return mFragmentFixedHeights.value( blockIndex ).value( fragmentIndex );
873 return mFragmentAscent.value( blockIndex ).value( fragmentIndex );
878 return mFragmentDescent.value( blockIndex ).value( fragmentIndex );
883 return mVerticalOrientationXOffsets.value( blockIndex );
888 return mBlockMaxCharacterWidth.value( blockIndex );
893 return mBlockMaxDescent.value( blockIndex );
898 return mBlockMaxAscent.value( blockIndex );
903 return mFragmentFonts.value( blockIndex ).value( fragmentIndex );
908 if ( blockIndex < 0 )
909 return mVerticalMarginsBetweenBlocks.value( 0 );
911 return mVerticalMarginsBetweenBlocks.value( blockIndex + 1 );
916 return mLeftBlockMargins.value( blockIndex );
921 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