views:

622

answers:

5

What is the maximum font size that can be rendered in a web page?

Does it depend on the machine or the application ( browser )?

A: 

Probably both. It also depends on the size of the monitor on which the web page is viewed. Any particular application for which you want to know this?

Daan
Actually I need to develop a JavaScript WYSIWYG editor and for that purpose I have to get more knowledge of fonts and their rendering. Today i just inserted a text into MS word with font size of 2000 and it gave me an alert stating that the font size should be between 1 and 1638.
rahul
If a text with font with a huge value of font size my editor will be broken because I need to implement paging inside the editor as in MS Word.
rahul
But what is the intended use of your editor? Probably not an application that requires extraordinary large font sizes... So in that case, you can limit the allowed font size to something reasonable (just like Word apparently limits it to 1638), right?
Daan
Bu we can't prevent the user from copying a text with huge font size value and then pasting it into our editor...
rahul
A: 

There is no maximum, at least not worth worrying about. You can have the entire screen taken up by a single letter.

apphacker
+1  A: 

Yes.

Every device has some set of fonts and font sizes it supports. For a desktop computer both sets are very large, but for a phone or other small device, the sets may be fairly limited. For a device with a text-only screen, there might only be one font at one size.

Lars Wirzenius
+2  A: 

It differs from browser to browser.For example Mac/IE4+ doesn't render fonts specified >255px.Opera 5 freaks after 510px.Mozilla appears to be able to handle values up to 9362px, which just happens to be Netscape 4's limit as well.

Warrior
Very old browsers used as examples here...
Kristian J.
A: 

In Firefox 3.6, the maximum practical font-size appears to be 2000px. The computed height/line-height caps out at ~2657px, and further increases do not change the display.

Safari 5 & Chrome 6 (Webkit browsers) seem to allow sizes up to (but not including) 1,000,000 pixels, after which the text does not render at all.

Seth Bro