OpenTTD Source: src/os/macosx/font_osx.h File Reference

OpenTTD Source 14.0-beta3

Data Structures | Functions
font_osx.h File Reference
`#include "../../fontcache/truetypefontcache.h"`
`#include "os/macosx/macos.h"`
`#include <CoreFoundation/CoreFoundation.h>`

Go to the source code of this file.

## Data Structures
class | CoreTextFontCache

## Functions
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...

## Detailed Description

Functions related to font handling on MacOS.

Definition in file font_osx.h.

## Function Documentation

## ◆ LoadCoreTextFont() [1/2]

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.

Parameters

  fs | The font size to load.

Definition at line 341 of file font_osx.cpp.

References GetFontCacheSubSetting(), MacOSVersionIsAtLeast(), and settings.

## ◆ LoadCoreTextFont() [2/2]

void LoadCoreTextFont | ( | FontSize | fs,
|  | const std::string & | file_name,
|  | uint | size
| ) |  |

Load a TrueType font from a file.

Parameters

  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.