1 /* $Id: fontdetection.h 25450 2013-06-23 18:32:02Z rubidium $ */
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/>.
10 /** @file fontdetection.h Functions related to detecting/finding the right font. */
12 #ifndef FONTDETECTION_H
13 #define FONTDETECTION_H
15 #include "fontcache.h"
20 #include FT_FREETYPE_H
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
);
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 */