29 #include <sciplot/Utils.hpp>
30 #include <sciplot/specs/Specs.hpp>
35 template <
typename DerivedSpecs>
43 auto fontName(std::string name) -> DerivedSpecs&;
46 auto fontSize(std::size_t size) -> DerivedSpecs&;
49 auto repr() const -> std::
string;
53 std::
string m_fontname;
56 std::
string m_fontsize;
62 template <
typename DerivedSpecs>
66 template <
typename DerivedSpecs>
70 return static_cast<DerivedSpecs&
>(*this);
73 template <
typename DerivedSpecs>
76 m_fontsize = std::to_string(size);
77 return static_cast<DerivedSpecs&
>(*this);
80 template <
typename DerivedSpecs>
84 if(m_fontname.size() || m_fontsize.size())
85 ss <<
"font '" << m_fontname <<
"," << m_fontsize <<
"'";
auto repr() const -> std::string
Convert this FontSpecsOf object into a gnuplot formatted string.
Definition: FontSpecsOf.hpp:81
FontSpecsOf()
Construct a default FontSpecsOf instance.
Definition: FontSpecsOf.hpp:63
auto fontSize(std::size_t size) -> DerivedSpecs &
Set the point size of the font (e.g., 10, 12, 16).
Definition: FontSpecsOf.hpp:74
The base class for other specs classes (e.g., LineSpecsOf, DrawSpecs, BorderSpecs,...
Definition: Specs.hpp:36
auto fontName(std::string name) -> DerivedSpecs &
Set the name of the font (e.g., Helvetica, Georgia, Times).
Definition: FontSpecsOf.hpp:67
The class used to specify font options.
Definition: FontSpecsOf.hpp:60
The class used to attach font options to a type.
Definition: FontSpecsOf.hpp:37