aboutsummaryrefslogtreecommitdiff
path: root/src/osx/graphics/quartz/Font.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-03-10 18:03:49 +0800
committercrupest <crupest@outlook.com>2022-03-10 18:03:49 +0800
commit1cf1002f1d3cd81ddb920eb7196a067b566f11e2 (patch)
tree8a299d16f0f5074d876175a602190f477bd498ea /src/osx/graphics/quartz/Font.cpp
parent51f87e3ff980e62f9cb5ee656e5591412e2766eb (diff)
downloadcru-1cf1002f1d3cd81ddb920eb7196a067b566f11e2.tar.gz
cru-1cf1002f1d3cd81ddb920eb7196a067b566f11e2.tar.bz2
cru-1cf1002f1d3cd81ddb920eb7196a067b566f11e2.zip
...
Diffstat (limited to 'src/osx/graphics/quartz/Font.cpp')
-rw-r--r--src/osx/graphics/quartz/Font.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/osx/graphics/quartz/Font.cpp b/src/osx/graphics/quartz/Font.cpp
index 605a1453..a1b8bac2 100644
--- a/src/osx/graphics/quartz/Font.cpp
+++ b/src/osx/graphics/quartz/Font.cpp
@@ -9,7 +9,7 @@ using cru::platform::osx::Convert;
OsxCTFont::OsxCTFont(IGraphicsFactory* graphics_factory, const String& name,
float size)
- : OsxQuartzResource(graphics_factory) {
+ : OsxQuartzResource(graphics_factory), name_(name) {
CFStringRef n = Convert(name);
if (name.empty()) {
@@ -25,5 +25,6 @@ OsxCTFont::OsxCTFont(IGraphicsFactory* graphics_factory, const String& name,
OsxCTFont::~OsxCTFont() { CFRelease(ct_font_); }
+String OsxCTFont::GetFontName() { return name_; }
float OsxCTFont::GetFontSize() { return CTFontGetSize(ct_font_); }
} // namespace cru::platform::graphics::osx::quartz