Skip to content

Commit

Permalink
feat(asdf): asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
realbikmaev committed Sep 21, 2023
1 parent b8824fe commit 6d7a11b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 11 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit 6d7a11b

Please sign in to comment.