diff options
author | crupest <crupest@outlook.com> | 2021-10-22 21:42:45 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-10-22 21:42:45 +0800 |
commit | 3e84cf013b31c52405a76b8e8778a5991d096290 (patch) | |
tree | 4d3b2d2ef5a9625c55f798d88281073e806ee83f /src/osx/graphics/quartz/Font.cpp | |
parent | ed640ca9e3c7482856a0248ea38adafc86a7d4c8 (diff) | |
download | cru-3e84cf013b31c52405a76b8e8778a5991d096290.tar.gz cru-3e84cf013b31c52405a76b8e8778a5991d096290.tar.bz2 cru-3e84cf013b31c52405a76b8e8778a5991d096290.zip |
...
Diffstat (limited to 'src/osx/graphics/quartz/Font.cpp')
-rw-r--r-- | src/osx/graphics/quartz/Font.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/osx/graphics/quartz/Font.cpp b/src/osx/graphics/quartz/Font.cpp index 72d6d56d..1499bda6 100644 --- a/src/osx/graphics/quartz/Font.cpp +++ b/src/osx/graphics/quartz/Font.cpp @@ -12,7 +12,12 @@ OsxCTFont::OsxCTFont(IGraphicsFactory* graphics_factory, const String& name, : OsxQuartzResource(graphics_factory) { CFStringRef n = Convert(name); - ct_font_ = CTFontCreateWithName(n, size, nullptr); + if (name.empty()) { + ct_font_ = + CTFontCreateUIFontForLanguage(kCTFontUIFontSystem, size, nullptr); + } else { + ct_font_ = CTFontCreateWithName(n, size, nullptr); + } Ensures(ct_font_); CFRelease(n); |