From ce23d40a41c2b886130a8cca20002c912ef477fa Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Tue, 20 Jun 2023 14:12:06 +0200 Subject: [PATCH 01/19] UI: stylelintrc.cjs: disable "font-family-name-quotes" to allow quoted font names Signed-off-by: Tim Janik --- ui/stylelintrc.cjs | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/stylelintrc.cjs b/ui/stylelintrc.cjs index 7f1239c5..16ca8af6 100644 --- a/ui/stylelintrc.cjs +++ b/ui/stylelintrc.cjs @@ -10,6 +10,7 @@ module.exports = { "custom-property-empty-line-before": null, "declaration-block-no-shorthand-property-overrides": null, "declaration-empty-line-before": null, + "font-family-name-quotes": null, "length-zero-no-unit": null, "no-descending-specificity": null, "no-duplicate-selectors": null, From 93d99c295e2482092b140b10dc57a5561fa2764d Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Tue, 20 Jun 2023 13:43:01 +0200 Subject: [PATCH 02/19] UI: Makefile.mk: download InterVariable.woff2 Signed-off-by: Tim Janik --- ui/Makefile.mk | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ui/Makefile.mk b/ui/Makefile.mk index 89dd808a..bd1c8641 100644 --- a/ui/Makefile.mk +++ b/ui/Makefile.mk @@ -233,12 +233,17 @@ $(ui/cjs.targets): $>/ui/%.cjs: ui/%.js | $>/ui/b/ $>/ui/.build1-stamp: $(ui/cjs.targets) # == Inter Typeface == -$>/ui/fonts/Inter-Medium.woff2: ui/Makefile.mk | $>/ui/fonts/ +$>/ui/fonts/InterVariable.woff2: ui/Makefile.mk | $>/ui/fonts/ $(QECHO) FETCH Inter Typeface - $Q cd $(@D) $(call foreachpair, AND_DOWNLOAD_SHAURL, \ - 9cd56084faa8cc5ee75bf6f3d01446892df88928731ee9321e544a682aec55ef https://github.com/rsms/inter/raw/v3.10/docs/font-files/Inter-Medium.woff2 ) + $Q $(RM) -r $>/ui/fonts/tmp-inter/ && mkdir $>/ui/fonts/tmp-inter/ + $Q cd $>/ui/fonts/tmp-inter/ $(call foreachpair, AND_DOWNLOAD_SHAURL, \ + 41b1253ed9b5e9cb5093249c8dd71f0094cb4dfb4ef92ec69125fcb90566e4c7 https://github.com/rsms/inter/releases/download/v4.0-beta9g/Inter-4.0-beta9g.zip ) + $Q cd $>/ui/fonts/tmp-inter/ \ + && unzip -q Inter-4.0-beta9g.zip \ + && mv web/InterVariable.woff2 .. + $Q $(RM) -r $>/ui/fonts/tmp-inter/ $Q touch $@ -$>/ui/.build1-stamp: $>/ui/fonts/Inter-Medium.woff2 +$>/ui/.build1-stamp: $>/ui/fonts/InterVariable.woff2 # == AnklangIcons == $>/ui/fonts/AnklangIcons.css: ui/Makefile.mk | $>/ui/fonts/ From e1a9791a75c1f77d5aa5a9b46a2935fb524e3626 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Wed, 21 Jun 2023 19:18:58 +0200 Subject: [PATCH 03/19] UI: b/icon.js: add small comment Signed-off-by: Tim Janik --- ui/b/icon.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/b/icon.js b/ui/b/icon.js index 540501f8..8dab614b 100644 --- a/ui/b/icon.js +++ b/ui/b/icon.js @@ -82,6 +82,7 @@ class BIcon extends LitComponent { createRenderRoot() { Util.add_style_sheet (this, STYLE_URL); + // icon fonts must be loaded into document and shadowRoot ancestors Util.add_style_sheet (this, '/fonts/AnklangIcons.css'); Util.add_style_sheet (this, '/fonts/material-icons.css'); Util.add_style_sheet (this, '/fonts/forkawesome-webfont.css'); From c2e9ed3909eace60c459132e837303f10710e68f Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Wed, 21 Jun 2023 15:52:29 +0200 Subject: [PATCH 04/19] UI: index.html: cleanup preloads, add @font-face for "InterVariable" Signed-off-by: Tim Janik --- ui/index.html | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/ui/index.html b/ui/index.html index 46af956c..fa246e53 100644 --- a/ui/index.html +++ b/ui/index.html @@ -27,17 +27,18 @@ - - - - - - - - - + + + + + + + + + +