From 6e14209aae534a8c808d97f1111d8181726f96f5 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 6 Jan 2020 00:18:07 +0100 Subject: [PATCH] Font: add FontDescription class. --- .../Spectre/Graphics/Font/FontDescription.h | 22 +++++++++++++++++++ source/Graphics/Font/FontDescription.cpp | 16 ++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 include/Spectre/Graphics/Font/FontDescription.h create mode 100644 source/Graphics/Font/FontDescription.cpp diff --git a/include/Spectre/Graphics/Font/FontDescription.h b/include/Spectre/Graphics/Font/FontDescription.h new file mode 100644 index 0000000..284e5e2 --- /dev/null +++ b/include/Spectre/Graphics/Font/FontDescription.h @@ -0,0 +1,22 @@ + +#ifndef SPECTRE_GRAPHICS_FONT_FONTDESCRIPTION_H +#define SPECTRE_GRAPHICS_FONT_FONTDESCRIPTION_H + +namespace sp { + +class FontDescription +{ +public : + void hinting(bool value = true); + + bool isHintingEnabled() const; + +protected : + + // True if hinting is enabled. false otherwise. + bool m_hinting = true; +}; + +} // namespace sp + +#endif /* SPECTRE_GRAPHICS_FONT_FONTDESCRIPTION_H */ diff --git a/source/Graphics/Font/FontDescription.cpp b/source/Graphics/Font/FontDescription.cpp new file mode 100644 index 0000000..c37ffdc --- /dev/null +++ b/source/Graphics/Font/FontDescription.cpp @@ -0,0 +1,16 @@ + +#include + +namespace sp { + +void FontDescription::hinting(bool value) +{ + m_hinting = value; +} + +bool FontDescription::isHintingEnabled() const +{ + return m_hinting; +} + +} // namespace sp