def test_font_face_descriptors():
    page, = render_pages(
        '''
        <style>
          @font-face {
            src: url(weasyprint.otf);
            font-family: weasyprint-variant;
            font-variant: sub
                          discretionary-ligatures
                          oldstyle-nums
                          slashed-zero;
          }
          span { font-family: weasyprint-variant }
        </style>'''
        '<span>kk</span>'
        '<span>subs</span>'
        '<span>dlig</span>'
        '<span>onum</span>'
        '<span>zero</span>')
    html, = page.children
    body, = html.children
    line, = body.children
    kern, subs, dlig, onum, zero = line.children
    assert kern.width == 1.5 * 16
    assert subs.width == 1.5 * 16
    assert dlig.width == 1.5 * 16
    assert onum.width == 1.5 * 16
    assert zero.width == 1.5 * 16
<style>
@font-face {
src: url(weasyprint.otf);
font-family: weasyprint-variant;
font-variant: sub
discretionary-ligatures
oldstyle-nums
slashed-zero;
}
span { font-family: weasyprint-variant }
</style>
tests/test_fonts.py