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
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
Unknown Object (File)
Tue, Oct 22, 18:21
Unknown Object (File)
Tue, Oct 22, 17:54
Unknown Object (File)
Tue, Oct 22, 08:34
Unknown Object (File)
Mon, Oct 21, 21:18
Unknown Object (File)
Sun, Oct 20, 04:06
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 Passed
Unit
No Test Coverage
Branch
webfonts
Build Status
Buildable 4953
Build 5234: arc lint + arc unit

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