diff options
author | crupest <crupest@outlook.com> | 2022-06-02 18:59:55 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-06-02 18:59:55 +0800 |
commit | 190487aec26f8c64ae488cc7bfb0ee068c7ddbb6 (patch) | |
tree | 629663dfc8c62a60326b58a5727608784079ecab /src/platform/graphics | |
parent | 95b5a61149b4edee4caec03a9c8f87ae4a1845af (diff) | |
download | cru-190487aec26f8c64ae488cc7bfb0ee068c7ddbb6.tar.gz cru-190487aec26f8c64ae488cc7bfb0ee068c7ddbb6.tar.bz2 cru-190487aec26f8c64ae488cc7bfb0ee068c7ddbb6.zip |
...
Diffstat (limited to 'src/platform/graphics')
-rw-r--r-- | src/platform/graphics/cairo/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/platform/graphics/cairo/PangoFont.cpp | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/platform/graphics/cairo/CMakeLists.txt b/src/platform/graphics/cairo/CMakeLists.txt index 31fa46d2..a9b78aac 100644 --- a/src/platform/graphics/cairo/CMakeLists.txt +++ b/src/platform/graphics/cairo/CMakeLists.txt @@ -8,6 +8,7 @@ if (UNIX) CairoGeometry.cpp CairoGraphicsFactory.cpp CairoResource.cpp + PangoFont.cpp ) target_compile_definitions(CruPlatformGraphicsCairo PRIVATE CRU_PLATFORM_GRAPHICS_CAIRO_EXPORT_API) target_link_libraries(CruPlatformGraphicsCairo PUBLIC CruPlatformGraphics PUBLIC ${LIB_CAIRO} ${LIB_PANGO}) diff --git a/src/platform/graphics/cairo/PangoFont.cpp b/src/platform/graphics/cairo/PangoFont.cpp new file mode 100644 index 00000000..f43b6c55 --- /dev/null +++ b/src/platform/graphics/cairo/PangoFont.cpp @@ -0,0 +1,15 @@ +#include "cru/platform/graphics/cairo/PangoFont.h" + +namespace cru::platform::graphics::cairo { +PangoFont::PangoFont(CairoGraphicsFactory* factory, String font_family, + float font_size) + : CairoResource(factory), + font_family_(std::move(font_family)), + font_size_(font_size) {} + +PangoFont::~PangoFont() {} + +String PangoFont::GetFontName() { return font_family_; } + +float PangoFont::GetFontSize() { return font_size_; } +} // namespace cru::platform::graphics::cairo |