aboutsummaryrefslogtreecommitdiff
path: root/include/cru/osx/graphics/quartz/Font.h
blob: d53c6a20b4f1e7e35b9c742ad3ecf18ecb00e889 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once
#include "Resource.h"
#include "cru/common/Base.h"
#include "cru/platform/graphics/Font.h"

#include <CoreText/CoreText.h>

namespace cru::platform::graphics::osx::quartz {
class OsxCTFont : public OsxQuartzResource, public virtual IFont {
 public:
  OsxCTFont(IGraphicsFactory* graphics_factory, const String& name, float size);

  CRU_DELETE_COPY(OsxCTFont)
  CRU_DELETE_MOVE(OsxCTFont)

  ~OsxCTFont() override;

  CTFontRef GetCTFont() const { return ct_font_; }

  float GetFontSize() override;

 private:
  CTFontRef ct_font_;
};
}  // namespace cru::platform::graphics::osx::quartz