21 constexpr static int max()
25 constexpr static int half()
31 value(narrow_cast<uint8_t>(
static_cast<int>(weight) + (style == font_style::italic ? half() : 0)))
38 [[nodiscard]]
size_t hash()
const noexcept
49 [[nodiscard]]
constexpr font_style style()
const noexcept
52 return static_cast<font_style
>(value >= half());
57 value = narrow_cast<uint8_t>(
static_cast<int>(rhs) + (style() == font_style::italic ? half() : 0));
62 constexpr font_variant& set_style(font_style rhs)
noexcept
64 value = narrow_cast<uint8_t>(
static_cast<int>(weight()) + (rhs == font_style::italic ? half() : 0));
69 constexpr operator int()
const noexcept
81 hilet w = font_weight_alterative(weight(), i % half());
82 hilet it = (style() == font_style::italic) == (i < half());
83 return {w,
static_cast<font_style
>(it)};
88 return std::format(
"{}", rhs.weight(), rhs.style() == font_style::italic ?
"/italic" :
"");
93 return lhs << to_string(rhs);
#define hi_axiom(expression,...)
Specify an axiom; an expression that is true.
Definition assert.hpp:253