0

Is it possible to test whether a certain device has a font available to the web browser?

ie. If device does not have Roboto available, do Roboto @font-face loading.

Niels
  • 353
  • 1
  • 6
  • 15
  • it's probably best to load it always because testing for it takes time, and fonts are loaded in the head, before the user can see anything, so you don't want to waste time checking at that point. – dandavis Sep 15 '14 at 00:06
  • @dandavis Except I'm trying to avoid a big download for mobile if it's not necessary, and to prevent blocking of the UI before the font has loaded. – Niels Sep 15 '14 at 03:58
  • 1
    https://developer.mozilla.org/en-US/docs/Web/CSS/@supports has poor mobile support. the problem with js-based detection is that the script need layout to test for dimension changes, and stuff in the head doesn't have layout, or if it does, makes things even worse by quirking out a body tag early... – dandavis Sep 15 '14 at 06:38

0 Answers0