Font: add FontDescription class.
This commit is contained in:
parent
2dd1187ff2
commit
6e14209aae
2 changed files with 38 additions and 0 deletions
22
include/Spectre/Graphics/Font/FontDescription.h
Normal file
22
include/Spectre/Graphics/Font/FontDescription.h
Normal file
|
|
@ -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 */
|
||||||
16
source/Graphics/Font/FontDescription.cpp
Normal file
16
source/Graphics/Font/FontDescription.cpp
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
|
||||||
|
#include <Spectre/Graphics/Font/FontDescription.h>
|
||||||
|
|
||||||
|
namespace sp {
|
||||||
|
|
||||||
|
void FontDescription::hinting(bool value)
|
||||||
|
{
|
||||||
|
m_hinting = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FontDescription::isHintingEnabled() const
|
||||||
|
{
|
||||||
|
return m_hinting;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace sp
|
||||||
Loading…
Add table
Add a link
Reference in a new issue