2 * This file is part of OpenTTD.
3 * 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.
4 * 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.
5 * 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 /** @file fontdetection.h Functions related to detecting/finding the right font. */
10 #ifndef FONTDETECTION_H
11 #define FONTDETECTION_H
13 #include "fontcache.h"
18 #include FT_FREETYPE_H
21 * Load a freetype font face with the given font name.
22 * @param font_name The name of the font to load.
23 * @param face The face that has been found.
24 * @return The error we encountered.
26 FT_Error
GetFontByFaceName(const char *font_name
, FT_Face
*face
);
28 #endif /* WITH_FREETYPE */
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(struct FreeTypeSettings
*settings
, const char *language_isocode
, int winlangid
, class MissingGlyphSearcher
*callback
);