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
F3692576: D3137.id.diff
Fri, Oct 25, 21:15
F3692455: D3137.id8009.diff
Fri, Oct 25, 19:35
F3692432: D3137.id8001.diff
Fri, Oct 25, 19:30
F3692323: D3137.id8008.diff
Fri, Oct 25, 17:33
F3692301: D3137.diff
Fri, Oct 25, 17:30
F3692214: D3137.id8009.diff
Fri, Oct 25, 16:40
Unknown Object (File)
Thu, Oct 24, 07:42
Unknown Object (File)
Wed, Oct 23, 10:34
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