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
F3928146: D3137.id8009.diff
Sun, Dec 22, 03:39
F3928144: D3137.id8008.diff
Sun, Dec 22, 03:39
F3928143: D3137.id8001.diff
Sun, Dec 22, 03:39
F3928007: D3137.id.diff
Sun, Dec 22, 02:54
F3927922: D3137.diff
Sun, Dec 22, 02:30
Unknown Object (File)
Tue, Dec 17, 01:35
Unknown Object (File)
Fri, Dec 13, 03:21
Unknown Object (File)
Sat, Dec 7, 08:16
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