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