aboutsummaryrefslogtreecommitdiff
path: root/src/platform/graphics/quartz/Font.cpp
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-06-15 01:02:30 +0800
committerYuqian Yang <crupest@crupest.life>2025-06-15 01:02:30 +0800
commitd868d7b0d463ede80b761f87f10d4e25f52989c3 (patch)
treeeb61e339f15b6b8b4cc1a246b4281631e701d6e0 /src/platform/graphics/quartz/Font.cpp
parent7ac84c9d200d43f50155ce1e8316ada12043f7a8 (diff)
downloadcru-d868d7b0d463ede80b761f87f10d4e25f52989c3.tar.gz
cru-d868d7b0d463ede80b761f87f10d4e25f52989c3.tar.bz2
cru-d868d7b0d463ede80b761f87f10d4e25f52989c3.zip
Remove some files of OSX. Symbol Point is conflict and needs to be
fixed.
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_); }