OpenTTD Source: ICURun Class Reference

OpenTTD Source 15.3

Public Member Functions | Data Fields
ICURun Class Reference

Helper class to store the information of all the runs of a paragraph in. More...

## Public Member Functions
| ICURun (int start, int length, UBiDiLevel level, UScriptCode script=USCRIPT_UNKNOWN, Font *font=nullptr)
void | Shape (UChar *buff, size_t length)
| Shape a single run.

## Data Fields
int | start
| Start of the run in the buffer.
int | length
| Length of the run in the buffer.
UBiDiLevel | level
| Embedding level of the run.
UScriptCode | script
| Script of the run.
Font * | font
| Font of the run.
std::vector< GlyphID > | glyphs
| The glyphs of the run. Valid after Shape() is called.
std::vector< int > | advance
| The advance (width) of the glyphs. Valid after Shape() is called.
std::vector< int > | glyph_to_char
| The mapping from glyphs to characters. Valid after Shape() is called.
std::vector< ParagraphLayouter::Position > | positions
| The positions of the glyphs. Valid after Shape() is called.
int | total_advance = 0
| The total advance of the run. Valid after Shape() is called.

## Detailed Description

Helper class to store the information of all the runs of a paragraph in.

During itemization, more and more information is filled in.

Definition at line 37 of file gfx_layout_icu.cpp.

## Constructor & Destructor Documentation

## ◆ ICURun()

ICURun::ICURun | ( | int | start,
|  | int | length,
|  | UBiDiLevel | level,
|  | UScriptCode | script = `USCRIPT_UNKNOWN`,
|  | Font * | font = `nullptr`
| ) |  |
| inline

Definition at line 51 of file gfx_layout_icu.cpp.

## Member Function Documentation

## ◆ Shape()

void ICURun::Shape | ( | UChar * | buff,
|  | size_t | buff_length
| ) |  |

Shape a single run.

Parameters

  buff | The buffer of which a partial (depending on start/length of the run) will be shaped.
  length | The length of the buffer.

Definition at line 150 of file gfx_layout_icu.cpp.

References _current_language, FONT_SCALE, LanguagePackHeader::isocode, and ScaleSpriteTrad().

## Field Documentation

## ◆ advance

std::vector<int> ICURun::advance

The advance (width) of the glyphs. Valid after Shape() is called.

Definition at line 46 of file gfx_layout_icu.cpp.

## ◆ font

Font* ICURun::font

Font of the run.

Definition at line 43 of file gfx_layout_icu.cpp.

## ◆ glyph_to_char

std::vector<int> ICURun::glyph_to_char

The mapping from glyphs to characters. Valid after Shape() is called.

Definition at line 47 of file gfx_layout_icu.cpp.

## ◆ glyphs

std::vector<GlyphID> ICURun::glyphs

The glyphs of the run. Valid after Shape() is called.

Definition at line 45 of file gfx_layout_icu.cpp.

## ◆ length

int ICURun::length

Length of the run in the buffer.

Definition at line 40 of file gfx_layout_icu.cpp.

## ◆ level

UBiDiLevel ICURun::level

Embedding level of the run.

Definition at line 41 of file gfx_layout_icu.cpp.

## ◆ positions

std::vector<ParagraphLayouter::Position> ICURun::positions

The positions of the glyphs. Valid after Shape() is called.

Definition at line 48 of file gfx_layout_icu.cpp.

Referenced by ICUParagraphLayout::ICUVisualRun::ICUVisualRun().

## ◆ script

UScriptCode ICURun::script

Script of the run.

Definition at line 42 of file gfx_layout_icu.cpp.

## ◆ start

int ICURun::start

Start of the run in the buffer.

Definition at line 39 of file gfx_layout_icu.cpp.

## ◆ total_advance

int ICURun::total_advance = 0

The total advance of the run. Valid after Shape() is called.

Definition at line 49 of file gfx_layout_icu.cpp.

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

- src/gfx_layout_icu.cpp