OpenTTD Source  20241108-master-g80f628063a
UniscribeParagraphLayoutFactory Class Reference

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

#include <string_uniscribe.h>

Public Types

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

Static Public Member Functions

static ParagraphLayouterGetParagraphLayout (CharType *buff, CharType *buff_end, FontMap &fontMapping)
 Get the actual ParagraphLayout for the given buffer. More...
 
static size_t AppendToBuffer (CharType *buff, const CharType *buffer_last, char32_t c)
 Append a wide character to the internal buffer. More...
 

Static Public Attributes

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

Detailed Description

Helper class to construct a new UniscribeParagraphLayout.

Definition at line 23 of file string_uniscribe.h.

Member Function Documentation

◆ AppendToBuffer()

static size_t UniscribeParagraphLayoutFactory::AppendToBuffer ( CharType buff,
const CharType buffer_last,
char32_t  c 
)
inlinestatic

Append a wide character to the internal buffer.

Parameters
buffThe buffer to append to.
buffer_lastThe end of the buffer.
cThe character to add.
Returns
The number of buffer spaces that were used.

Definition at line 46 of file string_uniscribe.h.

◆ GetParagraphLayout()

ParagraphLayouter * UniscribeParagraphLayoutFactory::GetParagraphLayout ( CharType buff,
CharType buff_end,
FontMap fontMapping 
)
static

Get the actual ParagraphLayout for the given buffer.

Parameters
buffThe begin of the buffer.
buff_endThe location after the last element in the buffer.
fontMappingTHe mapping of the fonts.
Returns
The ParagraphLayout instance.

Definition at line 279 of file string_uniscribe.cpp.

References UniscribeItemizeString(), and UniscribeShapeRun().


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