sveltevietnam.dev icon indicating copy to clipboard operation
sveltevietnam.dev copied to clipboard

Font Optimization

Open vnphanquang opened this issue 1 year ago • 0 comments

Look into Google Fonts for Inter and Lora, and copy the subsetted files from google font. Remember to check license. Self host fonts should be more performant in general; we have not done any testing or benchmark to verify this claim though.

  • [ ] re-optimize / re-copy subsetted fonts for Inter
  • [ ] re-optimize / re-copy subsetted fonts for Lora. Currently using a variable font, perhaps we don't need that (only using one or two font weights at the moment).
  • [ ] set fallback font matching (size-adjust, ascent-override, descent-override). These are currently not fully supported in Safari, but worth putting it in for users in other browsers.

Resources

How to avoid layout shifts caused by web fonts

Reduce web font size

How I set up Glyphhanger on macOS for optimizing and converting font files for the Web

vnphanquang avatar May 14 '24 09:05 vnphanquang