aboutsummaryrefslogtreecommitdiff
path: root/src/osx/graphics/quartz/Font.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/osx/graphics/quartz/Font.cpp')
-rw-r--r--src/osx/graphics/quartz/Font.cpp7
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);