OpenTTD Source 20260218-master-g2123fca5ea
ParagraphLayouter::VisualRun Class Referenceabstract

Visual run contains data about the bit of text with the same font. More...

#include <gfx_layout.h>

Inheritance diagram for ParagraphLayouter::VisualRun:
CoreTextParagraphLayout::CoreTextVisualRun FallbackParagraphLayout::FallbackVisualRun ICUParagraphLayout::ICUVisualRun UniscribeParagraphLayout::UniscribeVisualRun

Public Member Functions

virtual const FontGetFont () const =0
 Get the font.
virtual size_t GetGlyphCount () const =0
 Get the number of glyphs.
virtual std::span< const GlyphIDGetGlyphs () const =0
 Get the glyphs to draw.
virtual std::span< const PositionGetPositions () const =0
 Get the positions for each of the glyphs.
virtual int GetLeading () const =0
 Get the font leading, or distance between the baselines of consecutive lines.
virtual std::span< const int > GetGlyphToCharMap () const =0
 The offset for each of the glyphs to the character run that was passed to the Layouter.

Detailed Description

Visual run contains data about the bit of text with the same font.

Definition at line 132 of file gfx_layout.h.

Member Function Documentation

◆ GetFont()

virtual const Font * ParagraphLayouter::VisualRun::GetFont ( ) const
pure virtual

◆ GetGlyphCount()

virtual size_t ParagraphLayouter::VisualRun::GetGlyphCount ( ) const
pure virtual

◆ GetGlyphs()

virtual std::span< const GlyphID > ParagraphLayouter::VisualRun::GetGlyphs ( ) const
pure virtual

◆ GetGlyphToCharMap()

virtual std::span< const int > ParagraphLayouter::VisualRun::GetGlyphToCharMap ( ) const
pure virtual

The offset for each of the glyphs to the character run that was passed to the Layouter.

Returns
The offsets.

Implemented in CoreTextParagraphLayout::CoreTextVisualRun, FallbackParagraphLayout::FallbackVisualRun, ICUParagraphLayout::ICUVisualRun, and UniscribeParagraphLayout::UniscribeVisualRun.

Referenced by Layouter::GetCharAtPosition(), and Layouter::GetCharPosition().

◆ GetLeading()

virtual int ParagraphLayouter::VisualRun::GetLeading ( ) const
pure virtual

Get the font leading, or distance between the baselines of consecutive lines.

Returns
The leading in pixels.

Implemented in CoreTextParagraphLayout::CoreTextVisualRun, FallbackParagraphLayout::FallbackVisualRun, ICUParagraphLayout::ICUVisualRun, and UniscribeParagraphLayout::UniscribeVisualRun.

◆ GetPositions()

virtual std::span< const Position > ParagraphLayouter::VisualRun::GetPositions ( ) const
pure virtual

The documentation for this class was generated from the following file: