|
OpenTTD Source 20260414-master-g8a7bc482ad
|
Base for missing glyph searchers that look for missing glyphs in strings. More...
#include <strings_func.h>
Public Member Functions | |
| BaseStringMissingGlyphSearcher (FontSizes fontsizes) | |
| Create this string glyph searcher. | |
| void | DetermineRequiredGlyphs (FontSizes fontsizes) override |
| Determine set of glyphs required for the current language. | |
| virtual std::optional< std::string_view > | NextString ()=0 |
| Get the next string to search through. | |
| virtual FontSize | DefaultSize ()=0 |
| Get the default (font) size of the string. | |
| virtual void | Reset ()=0 |
| Reset the search, i.e. | |
| Public Member Functions inherited from MissingGlyphSearcher | |
| MissingGlyphSearcher (FontSizes fontsizes) | |
| Create this glyph searcher. | |
| virtual | ~MissingGlyphSearcher ()=default |
| Ensure the destructor of the sub classes are called as well. | |
Additional Inherited Members | |
| Data Fields inherited from MissingGlyphSearcher | |
| const FontSizes | fontsizes |
| Font sizes this searcher will try to find. | |
| FontSizes | missing_fontsizes {} |
| Font sizes to actually search for. | |
| std::set< char32_t > | missing_glyphs {} |
| Glyphs to search for. | |
Base for missing glyph searchers that look for missing glyphs in strings.
Definition at line 180 of file strings_func.h.
|
inline |
Create this string glyph searcher.
Definition at line 186 of file strings_func.h.
References MissingGlyphSearcher::fontsizes, and MissingGlyphSearcher::MissingGlyphSearcher().
Referenced by LanguagePackGlyphSearcher::LanguagePackGlyphSearcher().
|
pure virtual |
Get the default (font) size of the string.
Implemented in LanguagePackGlyphSearcher, and TextfileWindow.
Referenced by DetermineRequiredGlyphs().
|
overridevirtual |
Determine set of glyphs required for the current language.
Implements MissingGlyphSearcher.
Definition at line 2309 of file strings.cpp.
References DefaultSize(), MissingGlyphSearcher::fontsizes, FontCache::Get(), IsInsideMM(), IsTextDirectionChar(), FontCache::MapCharToGlyph(), MissingGlyphSearcher::missing_fontsizes, MissingGlyphSearcher::missing_glyphs, NextString(), and Reset().
|
pure virtual |
Get the next string to search through.
Implemented in LanguagePackGlyphSearcher, and TextfileWindow.
Referenced by DetermineRequiredGlyphs().
|
pure virtual |
Reset the search, i.e.
begin from the beginning again.
Implemented in LanguagePackGlyphSearcher, and TextfileWindow.
Referenced by DetermineRequiredGlyphs().