Page MenuHomeDevCentral

Allow assets. to serve webfonts according to user agent
ClosedPublic

Authored by dereckson on May 26 2023, 23:47.
Tags
None
Referenced Files
F3777028: D3137.id8009.diff
Mon, Nov 25, 00:14
Unknown Object (File)
Sat, Nov 23, 11:59
Unknown Object (File)
Fri, Nov 22, 07:17
Unknown Object (File)
Fri, Nov 22, 05:48
Unknown Object (File)
Fri, Nov 22, 00:51
Unknown Object (File)
Mon, Nov 18, 06:56
Unknown Object (File)
Mon, Nov 18, 04:12
Unknown Object (File)
Sun, Nov 17, 19:51
Subscribers
None

Details

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

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson created this revision.
dereckson added inline comments.
roles/webserver-legacy/nginx/files/vhosts/nasqueron.org/assets.conf
45–52

Regexp takes priority against the new rule.

This revision is now accepted and ready to land.May 27 2023, 10:53