OpenTTD Source 20260206-master-g4d4e37dbf1
ICUParagraphLayoutFactory Class Reference

Helper class to construct a new ICUParagraphLayout. More...

#include <gfx_layout_icu.h>

Public Types

typedef UChar CharType
 Helper for GetLayouter, to get the right type.

Static Public Member Functions

static std::unique_ptr< ParagraphLayouterGetParagraphLayout (UChar *buff, UChar *buff_end, FontMap &font_mapping)
static size_t AppendToBuffer (UChar *buff, const UChar *buffer_last, char32_t c)
static void InitializeLayouter ()
 Initialize data needed for the ICU layouter.
static std::unique_ptr< icu::BreakIterator > GetBreakIterator ()
 Get a thread-safe line break iterator.

Static Public Attributes

static const bool SUPPORTS_RTL = true
 Helper for GetLayouter, to get whether the layouter supports RTL.

Static Private Attributes

static std::unique_ptr< icu::BreakIterator > break_iterator

Detailed Description

Helper class to construct a new ICUParagraphLayout.

Definition at line 21 of file gfx_layout_icu.h.

Member Typedef Documentation

◆ CharType

Helper for GetLayouter, to get the right type.

Definition at line 24 of file gfx_layout_icu.h.

Member Function Documentation

◆ AppendToBuffer()

size_t ICUParagraphLayoutFactory::AppendToBuffer ( UChar * buff,
const UChar * buffer_last,
char32_t c )
static

Definition at line 535 of file gfx_layout_icu.cpp.

◆ GetBreakIterator()

std::unique_ptr< icu::BreakIterator > ICUParagraphLayoutFactory::GetBreakIterator ( )
static

Get a thread-safe line break iterator.

Returns
unique_ptr managed BreakIterator instance.

Definition at line 397 of file gfx_layout_icu.cpp.

◆ GetParagraphLayout()

std::unique_ptr< ParagraphLayouter > ICUParagraphLayoutFactory::GetParagraphLayout ( UChar * buff,
UChar * buff_end,
FontMap & font_mapping )
static

Definition at line 356 of file gfx_layout_icu.cpp.

◆ InitializeLayouter()

void ICUParagraphLayoutFactory::InitializeLayouter ( )
static

Initialize data needed for the ICU layouter.

Definition at line 385 of file gfx_layout_icu.cpp.

References _current_language.

Referenced by Layouter::Initialize().

Field Documentation

◆ break_iterator

std::unique_ptr< icu::BreakIterator > ICUParagraphLayoutFactory::break_iterator
staticprivate

Definition at line 34 of file gfx_layout_icu.h.

◆ SUPPORTS_RTL

const bool ICUParagraphLayoutFactory::SUPPORTS_RTL = true
static

Helper for GetLayouter, to get whether the layouter supports RTL.

Definition at line 26 of file gfx_layout_icu.h.


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