|
OpenTTD Source
14.0-beta1
|
#include "../../stdafx.h"#include "../../debug.h"#include "font_osx.h"#include "../../core/math_func.hpp"#include "../../blitter/factory.hpp"#include "../../error_func.h"#include "../../fileio_func.h"#include "../../fontdetection.h"#include "../../string_func.h"#include "../../strings_func.h"#include "../../zoom_func.h"#include "macos.h"#include "../../table/control_codes.h"#include "safeguards.h"Go to the source code of this file.
Functions | |
| bool | SetFallbackFont (FontCacheSettings *settings, const std::string &language_isocode, int, MissingGlyphSearcher *callback) |
| We would like to have a fallback font as the current one doesn't contain all characters we need. More... | |
| static CTFontDescriptorRef | LoadFontFromFile (const std::string &font_name) |
| void | LoadCoreTextFont (FontSize fs) |
| Loads the TrueType font. More... | |
| void | LoadCoreTextFont (FontSize fs, const std::string &file_name, uint size) |
| Load a TrueType font from a file. More... | |
Functions related to font handling on MacOS.
Definition in file font_osx.cpp.
| void LoadCoreTextFont | ( | FontSize | fs | ) |
Loads the TrueType font.
If a CoreText 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 341 of file font_osx.cpp.
References GetFontCacheSubSetting(), MacOSVersionIsAtLeast(), and settings.
| void LoadCoreTextFont | ( | 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 392 of file font_osx.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 27 of file font_osx.cpp.
References lengthof.