diff options
author | crupest <crupest@outlook.com> | 2019-06-27 00:18:48 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-06-27 00:18:48 +0800 |
commit | baa7cf141b8121473edceae16c1a20a6d47bd202 (patch) | |
tree | 9349633a9d0bc286fe29f480bd70e4c2ad1f3075 /include/cru/win/graph/direct/font.hpp | |
parent | f404a3b2eb7bb9865d0c6f938538899996a53d8c (diff) | |
download | cru-baa7cf141b8121473edceae16c1a20a6d47bd202.tar.gz cru-baa7cf141b8121473edceae16c1a20a6d47bd202.tar.bz2 cru-baa7cf141b8121473edceae16c1a20a6d47bd202.zip |
......
Diffstat (limited to 'include/cru/win/graph/direct/font.hpp')
-rw-r--r-- | include/cru/win/graph/direct/font.hpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/cru/win/graph/direct/font.hpp b/include/cru/win/graph/direct/font.hpp new file mode 100644 index 00000000..44fa7edd --- /dev/null +++ b/include/cru/win/graph/direct/font.hpp @@ -0,0 +1,28 @@ +#pragma once +#include "../win_pre_config.hpp" + +#include "cru/platform/graph/font.hpp" + +#include <string_view> + +namespace cru::win::graph { +struct IWinNativeFactory; + +class WinFontDescriptor : public Object, + public virtual platform::graph::IFontDescriptor { + public: + explicit WinFontDescriptor(IWinNativeFactory* factory, + const std::wstring_view& font_family, + float font_size); + WinFontDescriptor(const WinFontDescriptor& other) = delete; + WinFontDescriptor(WinFontDescriptor&& other) = delete; + WinFontDescriptor& operator=(const WinFontDescriptor& other) = delete; + WinFontDescriptor& operator=(WinFontDescriptor&& other) = delete; + ~WinFontDescriptor() override = default; + + IDWriteTextFormat* GetDWriteTextFormat() const { return text_format_.Get(); } + + private: + Microsoft::WRL::ComPtr<IDWriteTextFormat> text_format_; +}; +} // namespace cru::win::graph |