(svn r23265) -Codechange: replace the setfallbackfont callback function with a class to call back

This commit is contained in:
rubidium
2011-11-19 18:43:00 +00:00
parent 32b28bb868
commit 447884fddb
4 changed files with 96 additions and 37 deletions

View File

@@ -14,6 +14,7 @@
#include "strings_type.h"
#include "string_type.h"
#include "gfx_type.h"
class StringParameters {
StringParameters *parent; ///< If not NULL, this instance references data from this parent instance.
@@ -196,6 +197,34 @@ const char *GetCurrentLanguageIsoCode();
int CDECL StringIDSorter(const StringID *a, const StringID *b);
/**
* A searcher for missing glyphs.
*/
class MissingGlyphSearcher {
public:
/** Make sure everything gets destructed right. */
virtual ~MissingGlyphSearcher() {}
/**
* Get the next string to search through.
* @return The next string or NULL if there is none.
*/
virtual const char *NextString() = 0;
/**
* Get the default (font) size of the string.
* @return The font size.
*/
virtual FontSize DefaultSize() = 0;
/**
* Reset the search, i.e. begin from the beginning again.
*/
virtual void Reset() = 0;
bool FindMissingGlyphs(const char **str);
};
void CheckForMissingGlyphsInLoadedLanguagePack(bool base_font = true);
#endif /* STRINGS_FUNC_H */