aboutsummaryrefslogtreecommitdiff
path: root/src/platform/graphics/quartz/Font.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/platform/graphics/quartz/Font.cpp')
-rw-r--r--src/platform/graphics/quartz/Font.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/platform/graphics/quartz/Font.cpp b/src/platform/graphics/quartz/Font.cpp
index 62052b0a..8821062f 100644
--- a/src/platform/graphics/quartz/Font.cpp
+++ b/src/platform/graphics/quartz/Font.cpp
@@ -1,26 +1,20 @@
#include "cru/platform/graphics/quartz/Font.h"
-#include "cru/platform/osx/Convert.h"
-#include "cru/platform/graphics/quartz/Convert.h"
#include "cru/platform/graphics/quartz/Resource.h"
namespace cru::platform::graphics::quartz {
-using cru::platform::osx::Convert;
-
OsxCTFont::OsxCTFont(IGraphicsFactory* graphics_factory, const String& name,
float size)
: OsxQuartzResource(graphics_factory), name_(name) {
- CFStringRef n = Convert(name);
+ auto n = name.ToCFStringRef();
if (name.empty()) {
ct_font_ =
CTFontCreateUIFontForLanguage(kCTFontUIFontSystem, size, nullptr);
} else {
- ct_font_ = CTFontCreateWithName(n, size, nullptr);
+ ct_font_ = CTFontCreateWithName(n.ref, size, nullptr);
}
Ensures(ct_font_);
-
- CFRelease(n);
}
OsxCTFont::~OsxCTFont() { CFRelease(ct_font_); }