Switch to using @fontsource for Inter & Inconsolata (#28540)

* Switch to using @fontsource for Inter & Inconsolata

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Remove unused font Open_Sans

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Switch to less broken imports

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Switch to Ubuntu 24.04

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Discard changes to res/themes/dark/css/dark.pcss

* Discard changes to res/themes/legacy-light/css/_fonts.pcss

* Discard changes to res/themes/light-high-contrast/css/light-high-contrast.pcss

* Discard changes to res/themes/light/css/light.pcss

* Discard changes to .github/workflows/end-to-end-tests.yaml

* Set outputDir for fonts

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Use headed mode for Playwright

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Switch to new Chrome headless mode instead

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Cache bust playwright browser install in CI

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update screenshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Try with 22.04

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update to Ubuntu Noble

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2024-12-04 11:55:27 +00:00 committed by GitHub
parent 1d51323451
commit db5b3359c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
174 changed files with 40 additions and 352 deletions

View file

@ -750,9 +750,11 @@ module.exports = (env, argv) => {
*/
function getAssetOutputPath(url, resourcePath) {
const isKaTeX = resourcePath.includes("KaTeX");
const isFontSource = resourcePath.includes("@fontsource");
// `res` is the parent dir for our own assets in various layers
// `dist` is the parent dir for KaTeX assets
const prefix = /^.*[/\\](dist|res)[/\\]/;
// `files` is the parent dir for @fontsource assets
const prefix = /^.*[/\\](dist|res|files)[/\\]/;
/**
* Only needed for https://github.com/element-hq/element-web/pull/15939
@ -778,6 +780,10 @@ function getAssetOutputPath(url, resourcePath) {
outputDir = outputDir.substring(compoundMatch.index + compoundMatch[0].length);
}
if (isFontSource) {
outputDir = "fonts";
}
if (isKaTeX) {
// Add a clearly named directory segment, rather than leaving the KaTeX
// assets loose in each asset type directory.