|
OpenTTD Source
14.0-beta3
|
#include "../stdafx.h"#include "../debug.h"#include "../fontcache.h"#include "../fontdetection.h"#include "../blitter/factory.hpp"#include "../core/math_func.hpp"#include "../zoom_func.h"#include "../fileio_func.h"#include "../error_func.h"#include "truetypefontcache.h"#include "../table/control_codes.h"#include "../safeguards.h"#include <ft2build.h>#include <FT_FREETYPE_H>#include <FT_GLYPH_H>#include <FT_TRUETYPE_TABLES_H>Go to the source code of this file.
Data Structures | |
| class | FreeTypeFontCache |
| Font cache for fonts that are based on a freetype font. More... | |
Functions | |
| static FT_Error | LoadFont (FontSize fs, FT_Face face, const char *font_name, uint size) |
| void | LoadFreeTypeFont (FontSize fs) |
| Loads the freetype font. More... | |
| void | LoadFreeTypeFont (FontSize fs, const std::string &file_name, uint size) |
| Load a TrueType font from a file. More... | |
| void | UninitFreeType () |
| Free everything allocated w.r.t. More... | |
Variables | |
| FT_Library | _library = nullptr |
FreeType font cache implementation.
Definition in file freetypefontcache.cpp.
| void LoadFreeTypeFont | ( | FontSize | fs | ) |
Loads the freetype font.
First type to load the fontname as if it were a path. If that fails, try to resolve the filename of the font using fontconfig, where the format is 'font family name' or 'font family name, font style'.
| fs | The font size to load. |
Definition at line 161 of file freetypefontcache.cpp.
References GetFontCacheSubSetting(), and settings.
| void LoadFreeTypeFont | ( | FontSize | fs, |
| const std::string & | file_name, | ||
| uint | size | ||
| ) |
Load a TrueType font from a file.
| fs | The font size to load. |
| file_name | Path to the font file. |
| size | Requested font size. |
Definition at line 211 of file freetypefontcache.cpp.
| void UninitFreeType | ( | ) |