Forum Moderators: open

Message Too Old, No Replies

Going absolutely insane over font sizing

Differences between system font sizes, browser sizes, style sheet sizes

         

Xapti

6:09 pm on Mar 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




I've read many texts and articles on the web, including multiple posts on these forums on the subject of font sizing.
From practice, I've found it's impossible to get a consistant look of font size across browsers, let alone cross platform, using relative scaling units.
The problem is with the system font setting in windows.
For some reason, in Firefox (and potentially other browsers), it does not change font sizes when using relative units, if the system font setting is larger.
Using points (pt), and probably other absolute units like pixels (px) (which I don't remember if I tested or not), Firefox does scale the fonts properly based off system font size (dpi setting).

One problem though, which I really don't care too much about, assuming it's the only problem (I thought there was another one, but maybe not):
when using absolute units, IE browsers cannot resize the font. I could really care less about this though, since IE is just absolute garbage for everything. It's buggy as hell and is unreliable, and no one should be using it. If someone wants to scale their font size larger, they should use a competant browser, like Opera (which has a nice zoom feature), or Firefox (which can scale absolute units, as should all browsers).

Okay I think I realized what the other problem was, you can correct me if I'm wrong... when you use absolute units (pt in my case), you are then overriding the default size for the browser. Again, I don't mind much though, because if they cared about their default font size for their browser, they would probably set their own style sheet as well, in which case it will then no longer override the font size.

I would ideally like to use relative font sizes, so that the default browser size could be used, but all hell breaks loose if the user has a large system font setting. All across the Web, some of the most prestigious websites in the world when it comes to HTML and CSS design (I won't list names), fail at consistant size rendering across modern browsers, due to some not supporting relative font sizes being scaled up from system font size (for whatever reason). It may be the browser's fault, but it's a huge problem nonetheless. I searched multiple times on the web about Firefox not working right in this way, and I got absolutely no results (maybe I didn't search enough). The best results I got was related to UNIX/LINUX systems not displaying font sizes properly based off their dpi settings, but nothing to do with Windows.

Comments, corrections and critisisms are requested.

rocknbil

6:43 pm on Mar 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome aboard Xapti,

I've found it's impossible to get a consistant look of font size across browsers, let alone cross platform, using relative scaling units.

Agreed, but this is just life on the web.

. . . IE browsers cannot resize the font. I could really care less about this though, since IE is just absolute garbage for everything. It's buggy as hell and is unreliable, and no one should be using it.

I just checked my stats, I have 77.98% using IE browsers, you you should probably start caring about it. :-(

If someone wants to scale their font size larger, they should use a competant browser, like Opera (which has a nice zoom feature), or Firefox (which can scale absolute units, as should all browsers).

If you think about it, absolute should mean absolute. Even though some browsers scale absolute fonts, IMO it shouldn't, this defies the definition of absolute.

. . . if they cared about their default font size for their browser, they would probably set their own style sheet as well, in which case it will then no longer override the font size.

The "average user" will outright tell you they are not computer competent, and don't care to be. They should go to a web page and it should just work, they should be able to read the text, your site should adjust to THEIR preferences, not the other way around. Most people wouldn't even know how to apply their own style sheet, but text sizing options are right there on the main menu.

I would ideally like to use relative font sizes, so that the default browser size could be used, but all hell breaks loose if the user has a large system font setting.

Herein lies your problem, and the solution to it: you have a vision of what size your text should be, and hope to constrain that look to all users, across all browsers. Your frustration springs out of the dificulty in forcing that environment on everyone.

Return to the most basic premise of the web: the idea is that your message reaches ALL users regardless of their environment. In the grand scheme of things, the presentation - font size, graphics, precious and fragile designs that break at the slightest user intervention - is not anywhere near as important as the accessibility of your documents.

You can easily relieve this frustration by accepting the fact that it doesn't look the same across all browsers. Who cares about THIS, really? So your fonts look a little different in this browser or that, the text reflows in a different way. Is it still a graceful reflow, is the content still accessible?

The answer is to design with these concepts in mind, to allow your users to throw whatever they can at it and still have it render gracefully. Turn off style sheets, disable javascript, size the text to 24 point body text - if your layout survives this kind of abuse, you've done well and will stop worrying about font sizing.

. . . some of the most prestigious websites in the world when it comes to HTML and CSS design (I won't list names), fail at consistant size rendering across modern browsers . . .

Well, I don't know this to be true, but as you can tell the point is irrelevant - a "prestigious site" is prestigious not because of it's design interface or font management, but because of it's content.

SuzyUK

7:49 pm on Mar 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think the misunderstanding comes from the fact that there is and never has been a way of truly fixing font sizes - except in a graphic or in buggy old IE when using it's inability to zoom text when sized in pixels, leading to the general assumption that pixels are fixed and therefore absolute?

The PIXEL is not absolute, it is relative - relative to the screen resolution

If someone wants to scale their font size larger, they should use a competent browser, like Opera (which has a nice zoom feature), or Firefox (which can scale absolute units, as should all browsers).

If you think about it, absolute should mean absolute. Even though some browsers scale absolute fonts, IMO it shouldn't, this defies the definition of absolute.

So that renders this particular part of the discussion null and void IMHO!

IE now has the "nice zoom feature" and zooms in the same way as Opera as in it zooms images too (still doesn't do it via View menu but shortcuts rule!), which again IMHO is correct a pixel is a pixel whether it applies to images or text size. FF has taken the user friendly approach which while not logical, as far as my argument goes anyway ;), is what most users might expect? - If you're zooming you want to read text but not necessarily see huge pictures?

and just an FYI the reason you may not have read any conclusions on this particular subject on Forums/Lists is that it is usually banned for making blood temps rise :)

Suzy

Xapti

8:15 pm on Mar 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Rocknbil, I understand what you're saying, and I'm sure you've encountered many people who have the view you think I have, but AFAIK I don't. For The websites I design, I don't care about breaking style, because there's nothing to break. Things like divs are sized relatively, overflow control exists, and I dislike using tables, especially one's with absolute sizing. I like sites to be very flexible, As I assume you do too.
The problem I have is that if a viewer looks at a page (whether he's on one side (majority), or the other side (minority)), and all the text is uncomfortably too big for them, they will need to resize their font size every single time they visit the site, and change it back every time they leave. That results in dissatisfaction.
I myself use large system font setting, and I am annoyed when people mix relative and non-relative sizing, because then the site appears totally inconsistant and hard to read... it may also break their formatting.

Point: I want my text resizable like mad, yes (whether they change their system size, their default browser size, or temporary viewing size). I don't want it looking different just because they use a different browser. This would result in many complaints from people about the font size looking too large or too small, and not wanting to change it constantly.

[edited by: Xapti at 8:31 pm (utc) on Mar. 24, 2007]

tedster

8:26 pm on Mar 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Even though some browsers scale absolute fonts, IMO it shouldn't, this defies the definition of absolute.

I see it that way, too. It's why I appreciate Opera's zoom feature - inflating the whole page, not just the fonts.

Using points (pt), and probably other absolute units like pixels (px) (which I don't remember if I tested or not)

I've always understood that pt is a print measure, and therefore separate browsers get "creative" when point sizes are interpereted for on-screen display. I find px to be the most workable when I want an absolute unit.

Xapti

9:10 pm on Mar 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would edit a previous message, but I ran out of time.
For example, for this site, all text is too small for me on Firefox, and IE outputs it's big. I guess I can just blame Firefox. How does Opera react to having large system font?

abbeyvet

9:30 pm on Mar 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't want it looking different just because they use a different browser.

For example, for this site, all text is too small for me on Firefox, and IE outputs it's big

Isn't that due to your personal brower settings? Not just because you use a different browser? It looks the same size to me in both.

Xapti

7:13 am on Mar 25, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No no, like I said, you need to have your Windows (or possibly other operating systems. I heard Linux has some problem related to this, not sure if it's the same)
system font setting (for "everything", not just Windows GUI) set to something larger than the default 96DPI, such as the "Large size" 120DPI setting. Sorry, I forgot to mention that in the latest post, but I did in the one before it. Then run Firefox -shouldn't matter what version- on a webpage which uses relative font sizing, meaning: HTML text sizes/HTML numeric sizes, percentage, em, or ex.
Compare it with IE, and see the size difference.

The problem cannot be fixed by changing Firefox's local font size, because that way the non-relative unit fonts won't display proper size.
I'm thinking of adding an entry in my usercontent.css to make all relative font sizes 125% their normal size... I just don't know how to set that up... there's absolutely no CSS selectors to target something like that. (the concept is silly, essentially applying CSS to CSS... won't fly)

[edited by: Xapti at 7:22 am (utc) on Mar. 25, 2007]

Xapti

7:02 am on Mar 29, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So what are people to do?

Are all website developers just forced to ignore this problem, or what?

Like I said, I don't mind different sizes based on an individual's preference, but when they go to a site expecting 125% (or other) font size and they don't get it, they'll be annoyed.
If they get their 125%(or other) font size, it's at the sacrifice of loosing their default font size for their browser, and/or IE loosing it's text-resize ability.

[edited by: Xapti at 7:03 am (utc) on Mar. 29, 2007]

kaled

11:18 am on Mar 29, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



From memory (and assuming no zoom has been applied) browsers typically render px font sizes in pixels but pt font sizes are dependent on dpi setting of the users computer. The standard setting on Windows is 96 dpi.

For instance, Arial 10pt should render with a height of 16 pixels (standard dpi) or 20 pixels (large fonts: 120 dpi). However Arial 16px should render with a height of 16 pixels irrespective of the user's dpi setting.

Behaviour when using relative sizes should depend entirely on the base units. If you want your site to render consisently across all browsers, you should never ever ever specify relative font sizes unless you have previously specified the base size using px or pt. Following this rule does not ensure consistency, but breaking this rule will ensure lack of consistency. Zooming will remain troublesome until the browser designers sort this out - there's not much you can do about this. Of course, if you're targetting the visually impaired, Zooming may be more important - otherwise forget about it. Users that need this feature can use a browser such as Opera that does a reasonably good job.

Since Browser Zooming is essentially an accessibility feature, it would be entirely wrong to enlarge some text and not others (IE was wrong). I'm not sure of the current state of play but certainly some browsers have previously failed to correctly resize framesets and iframes too.

If a page layout is based on a fixed width (say 800px) provided this value too is scaled, there should be no layout issues (but the user may need the horz scrollbar). If a page layout is fluid, generally, there should still be no layout issues over a sensible range of zooming.

Cyberspace is an imperfect universe - whinge and complain by all means (I do sometimes) and certainly ask for advice and solutions. Frustration is inevitable (been there done that many times) but is rarely productive.

Kaled.