jon
jon

Reputation: 1581

How do webfonts that don't contain certain chars behave?

I have a webfont that doesn't support Cyrillic. The font only has latin chars. If I try and display some Cyrillic chars, instead of displaying blank or corrupt chars (as I would expect it) it bypasses the webfont and displays them in a system font instead. Whilst this is a good thing I don't know why or how. As I understand it, if a font specified in the CSS isn't supported by a browser or the browser doesn't support webfonts it is then that a substitute font is put in place. However this is happening if the characters used aren't supported. Is my understanding of this correct?

Upvotes: 1

Views: 232

Answers (2)

Stacca
Stacca

Reputation: 831

it can be difficult when using a font that is not supported in your language. It varies from font to font and browser to browser. So there is no hard and fast rule sorry.

I would recommend making sure you HTML is set to support Unicode fonts.

<meta charset="utf-8">

I would also programme your font so it is in a stack,(has a default to full back on if unsupported) And give it and test in all browsers to see if it defaults or doesn't show. You may wish to find a font that is suited to that language.

Upvotes: 2

ecc
ecc

Reputation: 1510

Most browsers do missing character fallback by default, so you never see blank characters when something's missing. If the developer uses a font family stack like font-family: MyCyrillicFont, Arial, sans-serif your browser will use the next available font. Otherwise, the browser itself has a default font setting (that the user can typically choose).

In short, browsers have fallbacks on the characters level.

Upvotes: 1

Related Questions