OpenTTD
MissingGlyphSearcher Class Referenceabstract

A searcher for missing glyphs. More...

#include <strings_func.h>

Inheritance diagram for MissingGlyphSearcher:
LanguagePackGlyphSearcher TextfileWindow BaseSetTextfileWindow< TBaseSet > ContentTextfileWindow NewGRFTextfileWindow ScriptTextfileWindow

Public Member Functions

virtual ~MissingGlyphSearcher ()
 Make sure everything gets destructed right. More...
 
virtual const char * NextString ()=0
 Get the next string to search through. More...
 
virtual FontSize DefaultSize ()=0
 Get the default (font) size of the string. More...
 
virtual void Reset ()=0
 Reset the search, i.e. More...
 
virtual bool Monospace ()=0
 Whether to search for a monospace font or not. More...
 
virtual void SetFontNames (struct FreeTypeSettings *settings, const char *font_name)=0
 Set the right font names. More...
 
bool FindMissingGlyphs (const char **str)
 Check whether there are glyphs missing in the current language. More...
 

Detailed Description

A searcher for missing glyphs.

Definition at line 246 of file strings_func.h.

Constructor & Destructor Documentation

◆ ~MissingGlyphSearcher()

virtual MissingGlyphSearcher::~MissingGlyphSearcher ( )
inlinevirtual

Make sure everything gets destructed right.

Definition at line 249 of file strings_func.h.

References CheckForMissingGlyphs(), and settings.

Member Function Documentation

◆ DefaultSize()

virtual FontSize MissingGlyphSearcher::DefaultSize ( )
pure virtual

Get the default (font) size of the string.

Returns
The font size.

Implemented in LanguagePackGlyphSearcher, and TextfileWindow.

◆ FindMissingGlyphs()

bool MissingGlyphSearcher::FindMissingGlyphs ( const char **  str)

Check whether there are glyphs missing in the current language.

Parameters
[out]strPointer to an address for storing the text pointer.
Returns
If glyphs are missing, return true, else return false.
Postcondition
If true is returned and str is not NULL, *str points to a string that is found to contain at least one missing glyph.

Definition at line 2017 of file strings.cpp.

References InitFreeType().

Referenced by CheckForMissingGlyphs(), and SetFallbackFont().

◆ Monospace()

virtual bool MissingGlyphSearcher::Monospace ( )
pure virtual

Whether to search for a monospace font or not.

Returns
True if searching for monospace.

Implemented in LanguagePackGlyphSearcher, and TextfileWindow.

Referenced by SetFallbackFont().

◆ NextString()

virtual const char* MissingGlyphSearcher::NextString ( )
pure virtual

Get the next string to search through.

Returns
The next string or NULL if there is none.

Implemented in LanguagePackGlyphSearcher, and TextfileWindow.

◆ Reset()

virtual void MissingGlyphSearcher::Reset ( )
pure virtual

Reset the search, i.e.

begin from the beginning again.

Implemented in LanguagePackGlyphSearcher, and TextfileWindow.

◆ SetFontNames()

virtual void MissingGlyphSearcher::SetFontNames ( struct FreeTypeSettings settings,
const char *  font_name 
)
pure virtual

Set the right font names.

Parameters
settingsThe settings to modify.
font_nameThe new font name.

Implemented in LanguagePackGlyphSearcher, and TextfileWindow.

Referenced by SetFallbackFont().


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