blob: c35f53fa73dc9c328d1e8f5498db86d36c638fb6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include "cru/osx/graphics/quartz/Font.hpp"
#include "cru/osx/graphics/quartz/Convert.hpp"
#include "cru/osx/graphics/quartz/Resource.hpp"
namespace cru::platform::graphics::osx::quartz {
OsxCTFont::OsxCTFont(IGraphicsFactory* graphics_factory, const String& name,
float size)
: OsxQuartzResource(graphics_factory) {
CFStringRef n = Convert(name);
ct_font_ = CTFontCreateWithName(n, size, nullptr);
CFRelease(n);
}
OsxCTFont::~OsxCTFont() { CFRelease(ct_font_); }
} // namespace cru::platform::graphics::osx::quartz
|