|
OpenTTD Source 20251117-master-g7398d2e290
|
Functions related to localized text support on OSX. More...
Go to the source code of this file.
Data Structures | |
| class | OSXStringIterator |
| String iterator using CoreText as a backend. More... | |
| struct | OSXStringIterator::CharInfo |
| Break info for a character. More... | |
| class | CoreTextParagraphLayoutFactory |
| Helper class to construct a new CoreTextParagraphLayout. More... | |
Functions | |
| void | MacOSResetScriptCache (FontSize size) |
| Delete CoreText font reference for a specific font size. | |
| void | MacOSSetCurrentLocaleName (std::string_view iso_code) |
| Store current language locale as a CoreFoundation locale. | |
| int | MacOSStringCompare (std::string_view s1, std::string_view s2) |
| Compares two strings using case insensitive natural sort. | |
| int | MacOSStringContains (std::string_view str, std::string_view value, bool case_insensitive) |
| Search if a string is contained in another string using the current locale. | |
| void | MacOSRegisterExternalFont (std::string_view file_path) |
| Register an external font file with the CoreText system. | |
Functions related to localized text support on OSX.
Definition in file string_osx.h.
| void MacOSRegisterExternalFont | ( | std::string_view | file_path | ) |
Register an external font file with the CoreText system.
Definition at line 305 of file string_osx.cpp.
References MacOSVersionIsAtLeast().
| void MacOSResetScriptCache | ( | FontSize | size | ) |
Delete CoreText font reference for a specific font size.
Definition at line 299 of file string_osx.cpp.
References _font_cache.
Referenced by Layouter::ResetFontCache().
| void MacOSSetCurrentLocaleName | ( | std::string_view | iso_code | ) |
Store current language locale as a CoreFoundation locale.
Definition at line 316 of file string_osx.cpp.
References _osx_locale, and MacOSVersionIsAtLeast().
Referenced by ReadLanguagePack().
| int MacOSStringCompare | ( | std::string_view | s1, |
| std::string_view | s2 | ||
| ) |
Compares two strings using case insensitive natural sort.
| s1 | First string to compare. |
| s2 | Second string to compare. |
Definition at line 331 of file string_osx.cpp.
References _osx_locale, and MacOSVersionIsAtLeast().
Referenced by StrNaturalCompare().
| int MacOSStringContains | ( | std::string_view | str, |
| std::string_view | value, | ||
| bool | case_insensitive | ||
| ) |
Search if a string is contained in another string using the current locale.
| str | String to search in. |
| value | String to search for. |
| case_insensitive | Search case-insensitive. |
Definition at line 355 of file string_osx.cpp.
References _osx_locale, and MacOSVersionIsAtLeast().
Referenced by StrNaturalContains(), and StrNaturalContainsIgnoreCase().