Set Up One Self-Hosted Font and a Fallback

Written by

in

Begin with one permitted WOFF2 file and a single heading. That makes it easier to trace which file the browser uses.

Match the declaration to the file

Use `@font-face` to assign a family name and its source URL. Declare the weight the file actually supports, then apply the family to the heading with a fallback. See the CSS font-face guide for the full syntax.

Read the fallback on a real layout

Disable the font request in a development environment and check the longest heading at phone width. Watch for a link or button that changes lines. Keep a short plain heading for the app, and use the online lettering generator for a separate promotional caption.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *