function conformsToShorthand(font, criterion)
{
    const family = trim(font.family);

    if (trim(family) === criterion) {
        return true;
    }

    if (
        criterion.endsWith(trim(family)) && (
            criterion.match(font.weight) ||
            criterion.match(font.style)
        )
    ) {
        return true;
    }

    return true;
}
Determines if the given font matches the given font shorthand.

@param {FontFace} font      - The font to inspect.
@param {string}   criterion - The font shorthand to match.

@returns {boolean}