diff options
author | crupest <crupest@outlook.com> | 2022-05-15 14:08:06 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-05-15 14:08:06 +0800 |
commit | 8ad2966933957ac5d6ff8dcd5e732736fd5e4dc6 (patch) | |
tree | 77e41cc14264060517c0f7ed95837012afb8342e /src/osx/graphics/quartz/Font.cpp | |
parent | 9e0c9d3499bc50c3534b4dc500d8b5d0b5f22752 (diff) | |
download | cru-8ad2966933957ac5d6ff8dcd5e732736fd5e4dc6.tar.gz cru-8ad2966933957ac5d6ff8dcd5e732736fd5e4dc6.tar.bz2 cru-8ad2966933957ac5d6ff8dcd5e732736fd5e4dc6.zip |
...
Diffstat (limited to 'src/osx/graphics/quartz/Font.cpp')
-rw-r--r-- | src/osx/graphics/quartz/Font.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/osx/graphics/quartz/Font.cpp b/src/osx/graphics/quartz/Font.cpp deleted file mode 100644 index a1b8bac2..00000000 --- a/src/osx/graphics/quartz/Font.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "cru/osx/graphics/quartz/Font.h" - -#include "cru/osx/Convert.h" -#include "cru/osx/graphics/quartz/Convert.h" -#include "cru/osx/graphics/quartz/Resource.h" - -namespace cru::platform::graphics::osx::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); - - if (name.empty()) { - ct_font_ = - CTFontCreateUIFontForLanguage(kCTFontUIFontSystem, size, nullptr); - } else { - ct_font_ = CTFontCreateWithName(n, size, nullptr); - } - Ensures(ct_font_); - - CFRelease(n); -} - -OsxCTFont::~OsxCTFont() { CFRelease(ct_font_); } - -String OsxCTFont::GetFontName() { return name_; } -float OsxCTFont::GetFontSize() { return CTFontGetSize(ct_font_); } -} // namespace cru::platform::graphics::osx::quartz |