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
F3763602: D3137.diff
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
Unknown Object (File)
Sun, Nov 17, 04:28
Unknown Object (File)
Sun, Nov 17, 02:43
Unknown Object (File)
Sun, Nov 17, 01:53
Unknown Object (File)
Sun, Nov 17, 00:43
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 4948
Build 5229: 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

Regexp takes priority against the new rule.

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