1

For testing purposes, I would like Chrome to ignore my CSS's font source priority: The priority is "first local versions, and if not found locally, then load from url":

/* sans latin */
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('font/source/sans-latin.woff2') format('woff2'), url('font/source/sans-all.woff') format('woff');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

As my development computer has "Source Sans Pro Regular" and/or "SourceSansPro-Regular" installed, Chrome always uses these local font versions. But I want to test what happens when those local versions don't exist, thereby making Chrome use the url version.

I'm aware of Can I force the browser to use CSS @font-face instead of font installed on system?, but with this question here I'm looking for a development switch or similar.

Abdull
  • 26,371
  • 26
  • 130
  • 172
  • Why you can't simple delete local file? – Simone Rossaini Sep 28 '20 at 07:56
  • @SimoneRossaini > Why you can't simple delete local file? Because the "local" font files are operating system-installed files. I need them for other purposes such as word processing. – Abdull Sep 28 '20 at 08:01
  • Could you substitute a different value for local() in your testing environment? Something that doesn't exist: e.g. local('doesnotexist')? – Richard Hunter Sep 28 '20 at 08:18

1 Answers1

0

(Using Chrome 95)

To ignore local(..) fonts, open Chrome DevTools and open the Rendering tool. There is an option Disable local fonts. When this option is disabled, from the next page reload onwards, local(..) sources will be ignored.

Abdull
  • 26,371
  • 26
  • 130
  • 172