This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How does Android Firefox determine default font size?

  • 5 replies
  • 7 have this problem
  • 17 views
  • Last reply by ds33

more options

While trying to get readable font sizes from several browsers including firefox that are on my new HTC ONE M8 android phone, I finally reduced my test file to the one you can see at http://trillian.mit.edu/~jc/test/html/; on my phone, this "page" comes up with tiny, unreadable text. I've followed FF's menu -> Settings -> Display links, and see that the stated text size is "Large", which is quite readable, but it's not what's used for the above page. I also found the phone's global Settings Display & gestures screen which says the font size is "Medium", which looks the same as FF's "Large" size, and that's also obviously not the font that FF is using.

If you look at the above page's source, you'll see that I've carefully stripped out anything related to sizes, widths, fonts, etc, and just have text. The <head> section does declare it as utf-8, but that presumably doesn't override any font sizes.

I figure that if I can find clues that make the above page display in my default size(s) on the phone, I may have solved some of the problems I've seen with unreadable text. Does anyone have any ideas about why this simple test fails so spectacularly? What settings exist that I don't know about that can fix it?

And is this documented anywhere? (Yup; I've googled it, to no avail. ;-)

While trying to get readable font sizes from several browsers including firefox that are on my new HTC ONE M8 android phone, I finally reduced my test file to the one you can see at http://trillian.mit.edu/~jc/test/html/; on my phone, this "page" comes up with tiny, unreadable text. I've followed FF's menu -> Settings -> Display links, and see that the stated text size is "Large", which is quite readable, but it's not what's used for the above page. I also found the phone's global Settings Display & gestures screen which says the font size is "Medium", which looks the same as FF's "Large" size, and that's also obviously not the font that FF is using. If you look at the above page's source, you'll see that I've carefully stripped out anything related to sizes, widths, fonts, etc, and just have text. The <head> section does declare it as utf-8, but that presumably doesn't override any font sizes. I figure that if I can find clues that make the above page display in my default size(s) on the phone, I may have solved some of the problems I've seen with unreadable text. Does anyone have any ideas about why this simple test fails so spectacularly? What settings exist that I don't know about that can fix it? And is this documented anywhere? (Yup; I've googled it, to no avail. ;-)

All Replies (5)

more options

Please see http://jwir3.wordpress.com/2012/07/30/font-inflation-fennec-and-you/ for detailed analysis of how Firefox tries to make desktop websites more readable.

This algorithm is known to have issues with forum like text where there are posts of varying length.

more options

Hmm ... I read through that, but it doesn't explain much of anything. It reads like a post on an internal developer discussion list, and uses lots of jargon phrases without actually explaining any of them, or even giving links to explanations. E.g., the writer seems to assume that any reader understands what a "frame root" is, but I'm not familiar with the phrase, and I sorta doubt that even 1% of Android users would understand it, either.

The doc is mostly about something called "font inflation", which is still a mystery to me after reading all the explanation. The phrase seems to be used but not defined. In my (over-;)simplified text example, the problem isn't with anything that can reasonably be called "inflation", since the entire chunk of text is deflated to a size smaller than any of the choices in either the Firefox or Android "Settings" list of choices. I can easily read their "Small" font size; I can't read the font that FF uses to display my paragraph of text (while leaving maybe 80% of the screen blank). So the explanation has to be something other than anything called "font inflation", right? Or maybe I just don't understand what the writer was talking about.

Also, I've seen FF on my HTC ONE phone do normal text "reflow", reformatting the text so it fits the screen width when I switch between portrait and landscape mode. But with my simple file, it doesn't do this; it formats the text too small to read, but with lines longer than the screen width, and doesn't reformat the text when I rotate the phone. I haven't found any control for this "reflow"; if I had, I'd have enabled it. It seems to be enabled sometimes, but not others, and I haven't detected any pattern yet.

Anyway, why would FF format my text at a font size smaller not just smaller than the Setting size I chose, but also smaller than the smallest Setting sizes offered by FF or Android? How can I tell it to actually use the font size I chose in FF's Settings page? I don't see anything in the Settings to tell it that.

BTW, I've added a few of other files to the directory. The basic file I'm talking about is the one with the '0' in its name: "http://trillian.mit.edu/~jc/test/html/FontSizes_0.html". This was intended to be an example so trivial that no browser could possibly screw it up. All it has to do is format it as a readable size, preferably one that the (perhaps visually-limited) user chose, with line wrapping so it fits in the window/screen space available. It should fit comfortably on the smallest screens (except maybe a "smart watch" screen). None of the several dozen browsers I have on my IOS, linux or FreeBSD boxes has any problem with it at all. I was duly surprised and impressed that FF on Android could screw it up so royally. Maybe the indicated article explains it, but I don't understand the explanation, or how to fix the screwup. ;-)

more options

Oops; I meant "root frame". Or perhaps "flow root". Both phrases are used in the doc, but neither seems to be explained. I'm guessing that "root frame" has nothing to do with a <frame> tag, and it apparently means something other than the top-level tag, but googling the phrase doesn't enlighten me.

more options

I'm seeing this problem with MOBILE websites. No matter what I set the font size to they come up tiny and, being mobile websites, are designed not to zoom. I use StartPage mobile search (www.startpage.com/do/m/mobilesearch) a lot and it definitely has tiny text with no way to expand it (not through Firefox text size settings, Accesibility settings for the phone, nor through manually zooming). Standard (non-mobile) websites I can zoom in on, but that's not even an option for some mobile sites where this is a problem. I tried looking through about:config, but couldn't find any text size settings that helped there either. After updating to Firefox 35 it also seems like the Firefox Display text size setting doesn't even affect the menu text, which it at least used to, although it never helped with websites. I'm using a Sony Xperia Z1 Compact running Android and would really appreciate a way to fix this.

more options

I should have also mentinoned that the address text for the bookmarks (not the site name, but the address below it) is also way too small with no apparent way to enlarge it.

Thanks.