From 6d7a11baeac03d8f5d11019069718ece58c2c964 Mon Sep 17 00:00:00 2001 From: Khaidar Bikmaev Date: Thu, 21 Sep 2023 15:29:05 +0000 Subject: [PATCH] feat(asdf): asdf --- TODO.md | 12 +++++++++++- package.json | 4 +++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index 9521f15..6792673 100644 --- a/TODO.md +++ b/TODO.md @@ -3,10 +3,20 @@ - another cool thing is to use `css2?text=` option where we first gather all the letters we actually use and then generate a font with only those letters - resolve issue with svelte preprocess and vite shenanigans where only changes to `tailwind.config.js` or `app.css` trigger page reload that updates the fonts - also another question is why the fuck do we need full reload to load fonts and can't regular HMR handle that? -- setup ci that runs bash extract.sh daily +- setup ci that runs `bash extract.sh` daily - write proper README lmao - handle these fonts manually for some reason our `extract.py` ain't picking em up - [Open Sans](https://fonts.google.com/specimen/Open+Sans) - [Noto Sans](https://fonts.google.com/noto/specimen/Noto+Sans) - [Roboto](https://fonts.google.com/specimen/Roboto) - another problem is we fuck up handling of variable fonts like [Inter](https://fonts.google.com/specimen/Inter?sort=popularity) where we create only `font-Inter-400` + + - way to detect them is check that `axes` is not null + - if roboto is wght 100 to 900 generate range(100, 1000, 100) + - for any other axis generate dynamic utilities like eg for roboto `font-wdth-[75]` which in turn is `font-variation-settings: 'wdth' 75;` + + - probably better to use css vars here tbh `font-wdth-[75]` would change `var(--font-roboto-wdth)` + - still [this](https://www.npmjs.com/package/tailwind-variable-font) + - also we may be should declare variable fonts separately: `font-Roboto-v` or `font-Roboto-var` + +- there are fallbacks defined in metadata we can may be add em to utils.json `font-family` key diff --git a/package.json b/package.json index 865bc41..b2a8e0d 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,8 @@ "sync-request": "^6.1.0" }, "peerDependencies": { - "tailwindcss": "^3.0.1" + "tailwindcss": "^3.0.1", + "walkdir": "^0.4.1", + "sync-request": "^6.1.0" } }