|
OpenTTD Source
14.0-beta3
|
#include "../../stdafx.h"#include "../../debug.h"#include "../../blitter/factory.hpp"#include "../../core/alloc_func.hpp"#include "../../core/math_func.hpp"#include "../../core/mem_func.hpp"#include "../../error_func.h"#include "../../fileio_func.h"#include "../../fontcache.h"#include "../../fontcache/truetypefontcache.h"#include "../../fontdetection.h"#include "../../library_loader.h"#include "../../string_func.h"#include "../../strings_func.h"#include "../../zoom_func.h"#include "font_win32.h"#include "../../table/control_codes.h"#include <windows.h>#include <shlobj.h>#include "os/windows/win32.h"#include "safeguards.h"Go to the source code of this file.
Data Structures | |
| struct | EFCParam |
Macros | |
| #define | ANTIALIASED_QUALITY 4 |
Functions | |
| static int CALLBACK | EnumFontCallback (const ENUMLOGFONTEX *logfont, const NEWTEXTMETRICEX *metric, DWORD type, LPARAM lParam) |
| bool | SetFallbackFont (FontCacheSettings *settings, const std::string &, int winlangid, MissingGlyphSearcher *callback) |
| We would like to have a fallback font as the current one doesn't contain all characters we need. More... | |
| static bool | TryLoadFontFromFile (const std::string &font_name, LOGFONT &logfont) |
| static void | LoadWin32Font (FontSize fs, const LOGFONT &logfont, uint size, const char *font_name) |
| void | LoadWin32Font (FontSize fs) |
| Loads the GDI font. More... | |
| void | LoadWin32Font (FontSize fs, const std::string &file_name, uint size) |
| Load a TrueType font from a file. More... | |
Functions related to font handling on Win32.
Definition in file font_win32.cpp.
| void LoadWin32Font | ( | FontSize | fs | ) |
Loads the GDI font.
If a GDI font description is present, e.g. from the automatic font fallback search, use it. Otherwise, try to resolve it by font name.
| fs | The font size to load. |
Definition at line 386 of file font_win32.cpp.
References FS_MONO, GetFontCacheSubSetting(), MemSetT(), and settings.
| void LoadWin32Font | ( | 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 423 of file font_win32.cpp.
| bool SetFallbackFont | ( | struct FontCacheSettings * | settings, |
| const std::string & | language_isocode, | ||
| int | winlangid, | ||
| class MissingGlyphSearcher * | callback | ||
| ) |
We would like to have a fallback font as the current one doesn't contain all characters we need.
This function must set all fonts of settings.
| settings | the settings to overwrite the fontname of. |
| language_isocode | the language, e.g. en_GB. |
| winlangid | the language ID windows style. |
| callback | The function to call to check for missing glyphs. |
Definition at line 93 of file font_win32.cpp.