diff options
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 |