RAMSES Documentation  27.0.130
Information for RAMSES users and developers
Static Public Member Functions | Public Attributes | List of all members
ramses::FontCascade Struct Reference

struct to define a font cascade More...

#include <FontCascade.h>

Collaboration diagram for ramses::FontCascade:
[legend]

Static Public Member Functions

static RAMSES_API std::u32string FilterAndFindFontInstancesForString (const FontCascade &fontCascade, const std::u32string &str, FontInstanceOffsets &fontOffsets)
 Process a character string according to given FontCascade. More...
 

Public Attributes

const IFontAccessorfontAccessor
 interface to use to resolve FontInstanceId to a FontInstance More...
 
std::u32string charsToRemove
 String of characters that will be removed from a processed string. More...
 
OrderedFontList fontPriorityList
 Ordered list of font instance ids to try for each character. More...
 
FontInstanceId fallbackFont
 Fallback font used for fallbackChar when none in fontPriorityList matched. More...
 
char32_t fallbackChar
 Fallback character when no match was found in fontPriorityList. More...
 

Detailed Description

struct to define a font cascade

Allows to define a list of fonts that are tried sequentially for character availability. The first font that supports a given character is returned. Also supports generic fallback characters and blacklisted characters.

Member Function Documentation

◆ FilterAndFindFontInstancesForString()

static RAMSES_API std::u32string ramses::FontCascade::FilterAndFindFontInstancesForString ( const FontCascade fontCascade,
const std::u32string &  str,
FontInstanceOffsets fontOffsets 
)
static

Process a character string according to given FontCascade.

Creates a string with characters removed or replaced according to given FontInstance. Additionally creates FontInstanceOffsets specifying the font instance to use for all returned characters. Intended to be used in conjunction with TextCache::getPositionedGlyphs.

Parameters
[in]fontCascadethe font cascade used to process str
[in]strthe character string to process
[out]fontOffsetsvector of FontOffset describing the font to use
Returns
The processed string

Member Data Documentation

◆ charsToRemove

std::u32string ramses::FontCascade::charsToRemove

String of characters that will be removed from a processed string.

◆ fallbackChar

char32_t ramses::FontCascade::fallbackChar

Fallback character when no match was found in fontPriorityList.

◆ fallbackFont

FontInstanceId ramses::FontCascade::fallbackFont

Fallback font used for fallbackChar when none in fontPriorityList matched.

◆ fontAccessor

const IFontAccessor& ramses::FontCascade::fontAccessor

interface to use to resolve FontInstanceId to a FontInstance

◆ fontPriorityList

OrderedFontList ramses::FontCascade::fontPriorityList

Ordered list of font instance ids to try for each character.


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