Git Product home page Git Product logo

Comments (4)

openmindculture avatar openmindculture commented on June 21, 2024

We can define and adjust custom fallback fonts, as explained by Simon Hearne and others. But using f-mods (ascent-override, descent-override, line-gap-override, advance-override), we can only adjust vertical glyph sizes, so that's not really helpful against flash of unstyled font. We can (and do) control container sizes to prevent layout shift.

https://www.speedkit.com/blog/reducing-layout-shift-with-custom-fallback-fonts/#How to Define Custom Fallback Fonts

There are still some important aspects to be learned, including the useful font drop online tool.

Calculating the required values might seem complex, but the information we need is already in your web font file. First you'll need the TTF or WOFF(2) file for your font; if you use Google Fonts then you can check find the TTF in the GitHub repository. If you have licensed a font from a foundry then the TTF should have been supplied already.

Once you have the font file, head on over to FontDrop and upload the file. Open the Data tab and scroll to the hhea - Horizontal Header Table. There you should find four key values: ascender, descender , line-gap and advanceWidthMax.

https://fontdrop.info/

https://simonhearne.com/2021/layout-shifts-webfonts/#reduce-layout-shift-with-f-mods

image

from kleiderordnung-berlin.

openmindculture avatar openmindculture commented on June 21, 2024

With such limited opportunities for fallback font adjustment, there is not much to be done, except to ensure layout does not shift, which it does not do anymore due to better container control already implemented before.

from kleiderordnung-berlin.

openmindculture avatar openmindculture commented on June 21, 2024

Contact form fonts not fine on Edge on Windows (and on mobile Chrome, see #46 (comment))

desktop edge

Android Chrome

from kleiderordnung-berlin.

openmindculture avatar openmindculture commented on June 21, 2024

Contact Form Style Follow-Up in #46

from kleiderordnung-berlin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.