OpenTTD Source: UniscribeParagraphLayoutFactory Class Reference

OpenTTD Source 15.0-RC2

Public Types | Static Public Member Functions | Static Public Attributes
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 std::unique_ptr< ParagraphLayouter > | GetParagraphLayout (CharType *buff, CharType *buff_end, FontMap &font_mapping)
| Get the actual ParagraphLayout for the given buffer.
static size_t | AppendToBuffer (CharType *buff, const CharType *buffer_last, char32_t c)
| Append a wide character to the internal buffer.

## 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 Typedef Documentation

## ◆ CharType

typedef wchar_t UniscribeParagraphLayoutFactory::CharType

Helper for GetLayouter, to get the right type.

Definition at line 26 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

  buff | The buffer to append to.
  buffer_last | The end of the buffer.
  c | The character to add.

Returns
  The number of buffer spaces that were used.

Definition at line 46 of file string_uniscribe.h.

## ◆ GetParagraphLayout()

std::unique_ptr< ParagraphLayouter > UniscribeParagraphLayoutFactory::GetParagraphLayout | ( | CharType * | buff,
|  | CharType * | buff_end,
|  | FontMap & | font_mapping
| ) |  |
| static

Get the actual ParagraphLayout for the given buffer.

Parameters

  buff | The begin of the buffer.
  buff_end | The location after the last element in the buffer.
  font_mapping | The mapping of the fonts.

Returns
  The ParagraphLayout instance.

Definition at line 277 of file string_uniscribe.cpp.

References UniscribeItemizeString(), and UniscribeShapeRun().

## Field Documentation

## ◆ SUPPORTS_RTL

const bool UniscribeParagraphLayoutFactory::SUPPORTS_RTL = true
| static

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

Definition at line 28 of file string_uniscribe.h.

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

- src/os/windows/string_uniscribe.h
- src/os/windows/string_uniscribe.cpp