Yahoo Answers is shutting down on 4 May 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

?
Lv 6

How to automatically change webpage font if selected font is unavailable?

I have a webpage and it uses the font DaunPenh with a mixture of size and appearance settings to match what is used on the businesses business cards and posters. Although this font appears correctly on Windows (7 & 8) it does not appear correctly on an Ubuntu running computer I have access to. It changes the font to something else which it can then display the text in but all of the settings used for the other font are still applied, thus leaving a mess of writing which does not look right on the page (picture below shows). All of the font settings etc are controlled by a CSS file which is used on every page of the website.

So the question is: Is there a way for the website to change the font settings if DaunPenh is unavailable automatically so a selected font with selected size and other settings is chosen?

Update:

2 Answers

Relevance
  • 8 years ago
    Favourite answer

    Browsers are already built to handle this issue. You can specify in your CSS a list of which fonts to try to use, and what order to try them in.

  • 8 years ago

    Suggestion: Change it so it looks right in Ubuntu, then make a script to identify the program you used to view that site that redirects it to that CSS file with that code? If it is a browser compatibility issue anyway.

Still have questions? Get answers by asking now.