This question about This website: Answered

Firefox minimum font size

The "Minimum Font Size" setting in recent firefox versions does not work with the pattern skin (at least) in Foswiki (or TWiki). It does work in Firefox v10. Granted this would seem like a Firefox bug, but I can't find any other sites where the Firefox "Minimum Font Size" setting does not work.

-- DevinBougie - 19 Dec 2012

In the font size settings, there should be a drop down at the top that says "Fonts for: ", which defaulted to "Western" based on the local system locale settings. The solution is to select "Other Languages" from that drop down and set the minimum font size there.

What's going on is that, for our locale, Firefox defaults to iso-8859-1 "Western" character encoding. Conversely, the wiki pages all start out with the HTML declaration:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">

Specifying lang="en_US" sets the character encoding to Unicode, which uses the "Other Languages" preferences in Firefox, not the "Western" settings.

This seems like a confusing preferences dialog in Firefox, as the settings there are really all about character encoding, not language.

-- DevinBougie - 29 Apr 2013

That sounds very strange indeed. lang and character encoding are two different things. The character encoding of the wiki page is set by the <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> in the HTML. The lang is used for a number of purposes (1) to guide the pronunciation when an screen reader is used (2) to set the type of quotation marks to use (3) as an aid to search engines. I'm not aware of any other impact of the lang setting on fonts. I'm also curious as to what you mean by "sets the character encoding to Unicode", since FF uses unicode internally, irrespective of the input encoding.
  • the "Character Encoding" setting in the Font dialog in FF is used to determine what encoding to use when reading pages that do not specify an encoding. All FW pages specify an encoding, so it should not apply.
  • "Allow pages to choose their own fonts, instead of my selections above:" has to be disabled before FF will override the explicit font settings in the document.
AFAICT the Pattern skin CSS specifies html>body{font-size:small} but does not specify any absolute font size. The minimum font sizes work fine for me in FF v20.

-- CrawfordCurrie - 30 Apr 2013

Hi Crawford,

Thanks for the thoughtful response. You're completely correct that my initial explanation (that Devin passed on) is all wrong. After looking at it again, I believe the correct explanation is that "en_US" is not a valid language code. According to the HTML and XHTML specs, and relevant RFCs, the only allowed separator for language subcodes is "-":

http://www.w3.org/TR/1999/REC-html401-19991224/struct/dirlang.html http://tools.ietf.org/html/rfc5646

So Firefox, being very picky about language codes, is not recognizing "en_US" as a Western language, so it uses the "other languages" settings. Changing the xml:lang and lang to "en-US", Firefox uses the Western language settings.

-- DanRiley - 30 Apr 2013

There are a number of documents covering language codes, all of which are thankfully consistent - and none of which permit the use of underscore.

I have raised Tasks.Item12482

-- CrawfordCurrie - 01 May 2013

 

QuestionForm edit

Subject This website
Extension
Version Foswiki 1.1.6
Status Answered
Related Topics
Topic revision: r5 - 01 May 2013, CrawfordCurrie - This page was cached on 16 Oct 2018 - 16:01.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy