Skip to content

Support the new tech() and format() syntax in @font-face #254

@yisibl

Description

@yisibl

The specification has updated the syntax, which has been implemented in Firefox 105.

e.g.

// format() function must precede tech() if both are present
{ src: 'url("foo.ttf") format(opentype) tech(feature-opentype)', valid: true },
{ src: 'url("foo.ttf") tech(feature-opentype) format(opentype)', valid: false },

Spec: https://drafts.csswg.org/css-fonts/#font-face-src-parsing

<url> [ format(<font-format>)]? [ tech( <font-tech>#)]? | local(<font-face-name>)
<font-format>= [<string> | collection | embedded-opentype | opentype
 | svg | truetype | woff | woff2 ]
<font-tech>= [<font-feature-tech> | <color-font-tech>
 | variations | palettes | incremental ]
<font-feature-tech>= [feature-opentype | feature-aat | feature-graphite]
<color-font-tech>= [color-COLRv0 | color-COLRv1 | color-SVG | color-sbix | color-CBDT ]

See also:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions