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