(svn r27707) -Fix: Make the result of NewGRF's CARGO_NAME string code reliably print...
[openttd.git] / src / fontdetection.h
blobedb961e6d3138493958e1aef9ef8fece7934f342
1 /* $Id$ */
3 /*
4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 */
10 /** @file fontdetection.h Functions related to detecting/finding the right font. */
12 #ifndef FONTDETECTION_H
13 #define FONTDETECTION_H
15 #include "fontcache.h"
17 #ifdef WITH_FREETYPE
19 #include <ft2build.h>
20 #include FT_FREETYPE_H
22 /**
23 * Load a freetype font face with the given font name.
24 * @param font_name The name of the font to load.
25 * @param face The face that has been found.
26 * @return The error we encountered.
28 FT_Error GetFontByFaceName(const char *font_name, FT_Face *face);
30 /**
31 * We would like to have a fallback font as the current one
32 * doesn't contain all characters we need.
33 * This function must set all fonts of settings.
34 * @param settings the settings to overwrite the fontname of.
35 * @param language_isocode the language, e.g. en_GB.
36 * @param winlangid the language ID windows style.
37 * @param callback The function to call to check for missing glyphs.
38 * @return true if a font has been set, false otherwise.
40 bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, int winlangid, class MissingGlyphSearcher *callback);
42 #endif /* WITH_FREETYPE */
44 #endif