HomeDevCentral

Allow assets. to serve webfonts according to user agent

Description

Allow assets. to serve webfonts according to user agent

Summary:
Modern browsers at 97% according What can I use supports woff2.
As a fallback, we offer TTF.

A more careful user-agent analysis could be done in Lua, to serve
EOT/SVG/WOFF/WOFF2/TTF but now woff2 is supported everywhere,
the point is somewhat moot.

According the user-agent header, the visitor is served
<font>.css-with-woff2 or <font>.css-with-ttf.

Ref T1881.

Test Plan: Serve Source Sans Pro with D3138

Reviewers: dereckson

Reviewed By: dereckson

Maniphest Tasks: T1881

Differential Revision: https://devcentral.nasqueron.org/D3137

Details

Provenance
derecksonAuthored on May 26 2023, 23:42
derecksonPushed on May 27 2023, 10:53
Reviewer
dereckson
Differential Revision
D3137: Allow assets. to serve webfonts according to user agent
Parents
rOPSabeed0b798be: Define Access-Control-Allow-Origin for CSS for assets.
Branches
Unknown
Tags
Unknown
Tasks
T1881: Migrate all fonts assets