Confugurung and controlling deafult and fallback fonts.

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
Post Reply
andjc
New Member
Posts: 1
Joined: October 5th, 2014, 10:45 pm

Confugurung and controlling deafult and fallback fonts.

Post by andjc »

Hi,

I need to be able to control the fallback font that Firefox is using to display text in a web page.

I need to set fonts for a couple of differnet Unicode blocks, where the glyphs used differ from language to language, and where we currently get pot luck with font rendering. So far the only way I can see to have any control over fallback fonts is to strip all fonts that support the unicode blocks in question from the computer, leaving only a single font on the system.

Obviously this is less than ideal.

I was wondering if there was another way to achieve this?

I had thought about user specific styles ... but as far as i know, Firefox doesn't support unicode-range.

Another possibility I guess is javascript based regex, does any one have any other solutions that might work?

Andj
User avatar
DanRaisch
Moderator
Posts: 127243
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: Confugurung and controlling deafult and fallback fonts.

Post by DanRaisch »

Moving to Web Development.
User avatar
Frenzie
Posts: 2135
Joined: May 5th, 2004, 10:40 am
Location: Belgium
Contact:

Re: Confugurung and controlling deafult and fallback fonts.

Post by Frenzie »

Here's another less than ideal workaround: http://fransdejonge.com/2009/12/ipa-fonts-on-the-web/
Intelligent alien life does exist, otherwise they would have contacted us.
Dom1953
Posts: 52
Joined: July 24th, 2014, 6:02 am
Location: Australia

Re: Confugurung and controlling deafult and fallback fonts.

Post by Dom1953 »

You are correct that Firefox does not support Unicode ranges. Given that, firstly inform the browser of the content language using the "lang" attribute which can be applied to the whole or elements within a document.

By definition web content providers do not control the "fallback" font the user has selected in their options. This is the font their browser uses when it does not recognize any of the font family members you specify. Having said that, it is possible you need go no further if you specify "lang" values. Firefox users can go to

menu (☰ icon) > Options (⚙ icon) > Content (tab) > Advanced (button)

make sure they have "Allow pages to choose their own fonts, instead of my selections above" checked (or unchecked as they prefer) and by dropping down the box labelled "Fonts for" choose their language or region, and specify default fonts which they have on their system for their own language.

Explaining this to viewers across different and multiple language versions of firefox could be interesting.

See also Styling using language attributes under W3C Internationalisation.
Post Reply