summaryrefslogtreecommitdiff
path: root/src/strings_func.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-11-19 18:43:00 +0000
committerrubidium <rubidium@openttd.org>2011-11-19 18:43:00 +0000
commit447884fddbfbec520a927cfdaa1aaad5127cca9d (patch)
tree51727955c2bad4111b0ed6555c43e73a7b528e35 /src/strings_func.h
parent32b28bb86819411c427c694ec26616d0bc45fdb3 (diff)
downloadopenttd-447884fddbfbec520a927cfdaa1aaad5127cca9d.tar.xz
(svn r23265) -Codechange: replace the setfallbackfont callback function with a class to call back
Diffstat (limited to 'src/strings_func.h')
-rw-r--r--src/strings_func.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/strings_func.h b/src/strings_func.h
index ffced1f85..a95b316e2 100644
--- a/src/strings_func.h
+++ b/src/strings_func.h
@@ -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 */