OpenTTD Source  20240919-master-gdf0233f4c2
LanguagePackGlyphSearcher Class Reference

Helper for searching through the language pack. More...

Inheritance diagram for LanguagePackGlyphSearcher:
MissingGlyphSearcher

Private Member Functions

void Reset () override
 Reset the search, i.e. More...
 
FontSize DefaultSize () override
 Get the default (font) size of the string. More...
 
std::optional< std::string_view > NextString () override
 Get the next string to search through. More...
 
bool Monospace () override
 Whether to search for a monospace font or not. More...
 
void SetFontNames ([[maybe_unused]] FontCacheSettings *settings, [[maybe_unused]] const char *font_name, [[maybe_unused]] const void *os_data) override
 

Private Attributes

uint i
 Iterator for the primary language tables.
 
uint j
 Iterator for the secondary language tables.
 

Additional Inherited Members

- Public Member Functions inherited from MissingGlyphSearcher
virtual ~MissingGlyphSearcher ()=default
 Make sure everything gets destructed right.
 
virtual void SetFontNames (struct FontCacheSettings *settings, const char *font_name, const void *os_data=nullptr)=0
 Set the right font names. More...
 
bool FindMissingGlyphs ()
 Check whether there are glyphs missing in the current language. More...
 

Detailed Description

Helper for searching through the language pack.

Definition at line 2186 of file strings.cpp.

Member Function Documentation

◆ DefaultSize()

FontSize LanguagePackGlyphSearcher::DefaultSize ( )
inlineoverrideprivatevirtual

Get the default (font) size of the string.

Returns
The font size.

Implements MissingGlyphSearcher.

Definition at line 2196 of file strings.cpp.

References FS_NORMAL.

◆ Monospace()

bool LanguagePackGlyphSearcher::Monospace ( )
inlineoverrideprivatevirtual

Whether to search for a monospace font or not.

Returns
True if searching for monospace.

Implements MissingGlyphSearcher.

Definition at line 2216 of file strings.cpp.

◆ NextString()

std::optional<std::string_view> LanguagePackGlyphSearcher::NextString ( )
inlineoverrideprivatevirtual

Get the next string to search through.

Returns
The next string or nullopt if there is none.

Implements MissingGlyphSearcher.

Definition at line 2201 of file strings.cpp.

References TEXT_TAB_END.

◆ Reset()

void LanguagePackGlyphSearcher::Reset ( )
inlineoverrideprivatevirtual

Reset the search, i.e.

begin from the beginning again.

Implements MissingGlyphSearcher.

Definition at line 2190 of file strings.cpp.


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