void FontDescription::setTraits(FontTraits traits) { setStyle(traits.style()); setVariant(traits.variant()); setWeight(traits.weight()); setStretch(traits.stretch()); }
static inline unsigned stretchDistanceToDesired(FontTraits desired, FontTraits candidate) { return abs(static_cast<int>(desired.stretch() - candidate.stretch())); }