How-to Guide

Loading Custom Web Fonts on a Practice Website Without Invisible Text on a Phone

Short answer

A custom font is a file the phone must download before it can show your words in your brand style. Use one or two font families, serve them as WOFF2, and tell the browser to show a plain stand-in while it waits. That keeps the phone number readable on a slow connection.

By Liam CostelloUpdated 5 min read
Get my free auditor call (561) 291-2681

When the words are not there yet

On a weak signal, some practice sites show a blank space where the headline should be, then the words appear a few seconds later. The page was waiting for a font file. For a visitor who wanted the office hours, those seconds are the difference between reading the page and pressing Back.

web.dev's guide to font best practices, which we read before writing, names two costs. If a web font has not loaded, browsers typically delay drawing the text, which can delay the first thing the visitor sees. And when the font swaps in, a stand-in font and the real one take up different space, which can make the page shift.

What browsers do by default

The same article states that Chromium-based browsers and Firefox block text rendering for up to three seconds when the font has not loaded, while Safari blocks text indefinitely. So the default experience differs by browser, and an iPhone can be the worst case. You control this with a setting called font-display.

font-display valueWhat the visitor sees, and the trade-off web.dev notes
optionalPlain text at once, and the web font is used only if it arrives very quickly. Best for speed and no font-swap shift, but a late font is skipped.
swapPlain text at once, then the web font replaces it. Words are never hidden, but a late swap can jar the layout.
blockBlank text for a short time, then the web font. The brand look comes first, but text can be invisible while waiting.

A short, safe checklist

  1. 1Count the fonts. Each family, weight and italic style is a separate file. Many practice themes load six or more when two would do.
  2. 2Serve them as WOFF2, the format web.dev recommends using on its own, because it compresses about 30 percent better than WOFF.
  3. 3Choose font-display swap for body text so the words appear immediately, or optional if you want the least movement.
  4. 4Declare the fonts early in the page's own style block so the browser finds them sooner, rather than behind a long chain of style files.
  5. 5If the fonts come from another company's server, ask your designer whether the connection is opened early. web.dev suggests a preconnect hint for that case.

Be careful with preloading

Preloading a font makes it discoverable sooner, but web.dev cautions that it takes browser resources from other files. Use it for the one or two fonts the top of the page needs, and not as a general fix. The article says that adjusting the stylesheets often addresses the root cause better.

How to see the problem yourself

  1. 1Open the page in Chrome, right-click and choose Inspect, then open the Network tab.
  2. 2Set throttling to a slow mobile profile and reload the page with the cache disabled.
  3. 3Watch the first few seconds. If the headline is blank, or the text visibly changes shape, you have a font-loading issue.
  4. 4Check the Network list for font files and count them. Note the total size and share it with your designer.

A plain system font is a perfectly respectable choice for body text, and it removes this whole problem. Keep any special font for the practice name and headings, and pair it with a stand-in of similar width to limit shifting. Our guide on fixing a page that jumps while loading shows how to measure the result, and the Core Web Vitals checklist puts speed checks in one place.

Frequently asked questions

What is font-display?

It is a setting in the font's style rules that tells the browser what to show while the font file downloads. Values such as swap, optional and block trade speed against appearance.

Which value should a practice choose?

Swap is a good default for body text because words appear at once. Optional is the least likely to cause movement, at the cost of sometimes skipping the brand font.

Is a Google Fonts link a problem?

Not by itself. The page should load only the weights it needs and request them early. Count what the page actually downloads rather than assuming.

Does this affect rankings?

We cannot promise any ranking effect. Slow or invisible text hurts the visitor first, and it touches Google's speed measures, so it is a reasonable thing to tidy.

Can we skip custom fonts entirely?

Yes. System fonts need no download. Many practices keep a custom font for the heading only, which keeps the brand look and the speed.

Sources

Keep reading

Ready to Grow Your Practice?

Primara is now accepting new independent practices nationwide. Most new engagements begin within one week.

Send Us a Message

We respond within one business day.

* Required field

We'll call to confirm your consultation.

No spam, ever. HIPAA-aware agency. We respond within one business day. For urgent inquiries, call (561) 291-2681.

Founder-LedHIPAA-AwareServing Practices Nationwide