|
OpenTTD Source
1.10.0-RC1
|
Functions related to localized text support on OSX. More...
#include "../../stdafx.h"#include "string_osx.h"#include "../../string_func.h"#include "../../strings_func.h"#include "../../table/control_codes.h"#include "../../fontcache.h"#include "macos.h"#include <CoreFoundation/CoreFoundation.h>Go to the source code of this file.
Data Structures | |
| class | CoreTextParagraphLayout |
| Wrapper for doing layouts with CoreText. More... | |
| class | CoreTextParagraphLayout::CoreTextVisualRun |
| Visual run contains data about the bit of text with the same font. More... | |
| class | CoreTextParagraphLayout::CoreTextLine |
| A single line worth of VisualRuns. More... | |
Functions | |
| static CGFloat | SpriteFontGetWidth (void *ref_con) |
| Get the width of an encoded sprite font character. More... | |
| void | MacOSResetScriptCache (FontSize size) |
| Delete CoreText font reference for a specific font size. More... | |
| void | MacOSSetCurrentLocaleName (const char *iso_code) |
| Store current language locale as a CoreFounation locale. More... | |
| int | MacOSStringCompare (const char *s1, const char *s2) |
| Compares two strings using case insensitive natural sort. More... | |
Variables | |
| static CFAutoRelease< CFLocaleRef > | _osx_locale |
| Cached current locale. More... | |
| static CFAutoRelease< CTFontRef > | _font_cache [FS_END] |
| CoreText cache for font information, cleared when OTTD changes fonts. More... | |
| static CTRunDelegateCallbacks | _sprite_font_callback |
Functions related to localized text support on OSX.
Definition in file string_osx.cpp.
| void MacOSResetScriptCache | ( | FontSize | size | ) |
Delete CoreText font reference for a specific font size.
Definition at line 260 of file string_osx.cpp.
References _font_cache.
Referenced by CoreTextParagraphLayoutFactory::AppendToBuffer(), and Layouter::ResetFontCache().
| void MacOSSetCurrentLocaleName | ( | const char * | iso_code | ) |
Store current language locale as a CoreFounation locale.
Definition at line 266 of file string_osx.cpp.
References _osx_locale, and MacOSVersionIsAtLeast().
Referenced by CoreTextParagraphLayoutFactory::AppendToBuffer().
| int MacOSStringCompare | ( | const char * | s1, |
| const char * | s2 | ||
| ) |
Compares two strings using case insensitive natural sort.
| s1 | First string to compare. |
| s2 | Second string to compare. |
Definition at line 281 of file string_osx.cpp.
References _osx_locale, and MacOSVersionIsAtLeast().
Referenced by CoreTextParagraphLayoutFactory::AppendToBuffer().
|
static |
Get the width of an encoded sprite font character.
Definition at line 111 of file string_osx.cpp.
References GetGlyphWidth().
|
static |
CoreText cache for font information, cleared when OTTD changes fonts.
Definition at line 25 of file string_osx.cpp.
Referenced by CoreTextParagraphLayoutFactory::GetParagraphLayout(), and MacOSResetScriptCache().
|
static |
Cached current locale.
Definition at line 23 of file string_osx.cpp.
Referenced by MacOSSetCurrentLocaleName(), and MacOSStringCompare().
|
static |
Definition at line 119 of file string_osx.cpp.