Home > Mobile >  How do I make the unicode-range in @font-face for only load Latin characters? (css)
How do I make the unicode-range in @font-face for only load Latin characters? (css)

Time:12-26

I'm using only the Latin range characters for website, but in my woff2/ttf there are many other types of characters like Š Č â... How do I sets the specific range for only Latin characters using unicode-range - @font-face ?

CodePudding user response:

As the aim is to lighten the download of a complete font then unicode-range will not help.

See MDN

The unicode-range CSS descriptor sets the specific range of characters to be used from a font defined by @font-face and made available for use on the current page. If the page doesn't use any character in this range, the font is not downloaded; if it uses at least one, the whole font is downloaded.

The only way forward would seem to be to create another font using only the required characters.

  • Related