2

When a font is being used in Firefox that is missing the required glyph and it falls back to the next available font it seems that firefox makes some attempt to detect the charset of those characters and then apply their individual font preference by language (character-by-character).

Normally this sounds like an ok idea, but it doesn't work right with Japanese since Japanese is composed of "Kana" and "Kanji".

I made a simple test page with some Japanese text on it and I specified the font-family to a Japanese font and it all displays properly. I then changed the specified font to one that doesn't contain either kana or kanji (like Arial), so this triggers fallback.

At least for me, the result is kanji falling back to the font specified for Latin and kana falling back to the font specified for Japanese. This can make Japanese text look really ugly having multiple fonts in a single sentence.

NOTE: These fallback fonts are both Japanese fonts with full coverage of kana and kanji, there is no secondary fallback happening here, Firefox is separating them when it chooses fallback for some reason. What's even more strange is it chooses the Latin preference for kanji. I would like it to choose Japanese obviously, but even Chinese would make more sense than Latin.

Is it at least possible to just tell firefox to not attempt to detect the charset when falling back? At least this way Japanese text will render with the same font.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.