14 enum_font_weight m_efontweight;
23 m_efontweight(e_font_weight_normal),
32 m_efontweight(efontweight),
39 font_weight(::i32 iFontWeight)
42 set_font_weight(iFontWeight);
47 constexpr static enum_font_weight sink(::i32 iFontWeight)
53 return e_font_weight_dont_care;
56 else if (iFontWeight <= 150)
59 return e_font_weight_thin;
62 else if (iFontWeight <= 250)
65 return e_font_weight_extra_light;
68 else if (iFontWeight <= 325)
71 return e_font_weight_light;
74 else if (iFontWeight <= 375)
77 return e_font_weight_semi_light;
80 else if (iFontWeight <= 450)
83 return e_font_weight_normal;
86 else if (iFontWeight <= 550)
89 return e_font_weight_medium;
92 else if (iFontWeight <= 650)
95 return e_font_weight_semibold;
98 else if (iFontWeight <= 750)
101 return e_font_weight_bold;
104 else if (iFontWeight <= 850)
107 return e_font_weight_extra_bold;
110 else if (iFontWeight <= 925)
113 return e_font_weight_heavy;
119 return e_font_weight_ultra_black;
126 constexpr enum_font_weight efontweight()
const {
return m_efontweight; }
130 constexpr operator enum_font_weight()
const {
return efontweight(); }
131 constexpr operator ::i32()
const {
return as_i32(); }
134 constexpr ::std::weak_ordering operator <=>(
const enum_font_weight efontweight)
const
146 return m_efontweight <=> efontweight;
153 template < prototype_
integral INTEGRAL >
154 constexpr ::std::strong_ordering operator <=>(
const INTEGRAL iFontWeight)
const
162 template < prototype_
integral INTEGRAL >
163 void set_font_weight(INTEGRAL iFontWeight)
166 m_efontweight = sink(iFontWeight);
167 m_iFontWeight = maximum(minimum(I16_MAXIMUM, iFontWeight), -1);
172 font_weight & operator = (enum_font_weight efontweight)
175 m_efontweight = efontweight;
183 template < prototype_
integral INTEGRAL >
184 font_weight & operator = (INTEGRAL iFontWeight)
187 set_font_weight(iFontWeight);
Definition font_weight.h:10
::i16 m_iFontWeight
m_iFontWeight maybe "fraction" of a font weight
Definition font_weight.h:16