aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/graphics/cairo/PangoFont.h
blob: e06cbc712374d06ede2ffc6421107fd74a17bcbf (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
26
27
28
29
#pragma once
#include "Base.h"

#include <cru/platform/graphics/Font.h>

#include <pango/pango.h>

namespace cru::platform::graphics::cairo {
class CRU_PLATFORM_GRAPHICS_CAIRO_API PangoFont : public CairoResource,
                                                  public virtual IFont {
 public:
  PangoFont(CairoGraphicsFactory* factory, std::string font_family, float font_size);

  ~PangoFont() override;

 public:
  std::string GetFontName() override;
  float GetFontSize() override;

  PangoFontDescription* GetPangoFontDescription() {
    return pango_font_description_;
  }

 private:
  std::string font_family_;
  float font_size_;
  PangoFontDescription* pango_font_description_;
};
}  // namespace cru::platform::graphics::cairo