By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,124 Members | 1,605 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,124 IT Pros & Developers. It's quick & easy.

Browser text size setting

P: n/a
How to I find out what size text the browser is set to?

Thanks in anticipation.
Mar 7 '06 #1
Share this Question
Share on Google+
14 Replies


P: n/a
Roger Withnell wrote:
How to I find out what size text the browser is set to?
var textSize = prompt("Please enter your browser's text size");

Ha ha... :-)

The concept of 'text size' is different in different browsers. IE uses
largest, larger, smaller, etc. with a base 'size' based on system
settings. Firefox has a base font size in pts and then adjusts from
there (and system settings have an effect on it too).

Other browsers likely have other methods, e.g. IE 7 Opera has a zoom
factor as well. Different platforms add to the mix.

So stop wanting to know or even care about what font size setting a
particular browser may have. Make your fonts look good relative to each
other and leave the rest up to the user. You may get more help or
advice in:

news:comp.infosystems.www.authoring.stylesheets

Try this:

<URL:http://db.tidbits.com/getbits.acgi?tbart=05284>
Way back Macs used 72dpi for screen fonts but that appeared too small
for the developers of Windows, so they used a default of 96dpi. Sending
an image made for 96dpi to a 72dpi screen made the images larger.
However, now those fonts look too big so everyone makes their web fonts
90% or even 80%.

All because one software vendor tried to trick the system... please
don't compound the problem.

Thanks in anticipation.


No problem! :-)
--
Rob
Mar 7 '06 #2

P: n/a
RobG wrote:
The concept of 'text size' is different in different browsers. IE
uses largest, larger, smaller, etc. with a base 'size' based on system
settings. Firefox has a base font size in pts and then adjusts from
there (and system settings have an effect on it too).
No, the length unit used for the base font size by Gecko-based browsers,
including Firefox, is px.
Other browsers likely have other methods, e.g. IE 7 Opera has a zoom ^^^^^^^^^^ factor as well. Different platforms add to the mix.
I never heard of /that/ user agent and hopefully I never will ;-)
[...]
Try this:

<URL:http://db.tidbits.com/getbits.acgi?tbart=05284>
That is more misinforming than informing the reader. For example, it
completely misses the point that if those people used px, em or % in the
first place, instead of the `pt' unit, which is designed for printouts,
not for the screen, there would not have been a problem of font display
between Windows and Mac, given the same display resolution.
Way back Macs used 72dpi for screen fonts
AIUI it still uses that for 1024x768 and lower display resolutions.
but that appeared too small for the developers of Windows, so they used a
default of 96dpi. Sending an image made for 96dpi to a 72dpi screen made
the images larger.
Font resolution does not have anything to do with image resolution.
However, now those fonts look too big so everyone makes their web fonts
90% or even 80%.
Nonsense.
All because one software vendor tried to trick the system... please
don't compound the problem.


How did you get that idea anyway? Obviously not from of personal
experience.
PointedEars
Mar 8 '06 #3

P: n/a
Thomas 'PointedEars' Lahn wrote:
RobG wrote:

The concept of 'text size' is different in different browsers. IE
uses largest, larger, smaller, etc. with a base 'size' based on system
settings. Firefox has a base font size in pts and then adjusts from
there (and system settings have an effect on it too).

No, the length unit used for the base font size by Gecko-based browsers,
including Firefox, is px.


No unit is specified in the settings dialog, I assumed pt. Even the
help pages don't say what the unit is, do you have a reference? I'm not
saying you're wrong (heaven forbid!) just that I can't find where it's
specified.

Other browsers likely have other methods, e.g. IE 7 Opera has a zoom


^^^^^^^^^^
factor as well. Different platforms add to the mix.

I never heard of /that/ user agent and hopefully I never will ;-)


:-x ... IE 7 and Opera have ...

[...]
Try this:

<URL:http://db.tidbits.com/getbits.acgi?tbart=05284>

That is more misinforming than informing the reader. For example, it
completely misses the point that if those people used px, em or % in the
first place, instead of the `pt' unit, which is designed for printouts,
not for the screen, there would not have been a problem of font display
between Windows and Mac, given the same display resolution.


Yes there would, that is the whole point. Given a 72dpi display for
both Windows and Mac, the same 12pt font will appear 33% larger on the
Windows display because the graphics system *thinks* it is sending an
image to a 96dpi device. In Windows, a 72pt M will be 96pixels high, on
a Mac it will be 72pixels high. That was done deliberately by Windows
right from the start.

Of course very few devices are 72dpi any more, some are approaching 200pdi.

Way back Macs used 72dpi for screen fonts


AIUI it still uses that for 1024x768 and lower display resolutions.

but that appeared too small for the developers of Windows, so they used a
default of 96dpi. Sending an image made for 96dpi to a 72dpi screen made
the images larger.

Font resolution does not have anything to do with image resolution.


You misunderstand me. The term 'image' here means the image of the text
that is sent to the screen. Windows generated an image of the font
suitable for a 96dpi device, but because it was displayed on a 72dpi
device, it appeared bigger. It was done quite deliberately to make the
text 33% bigger and easier to read for a given pt size.

Windows still uses this technique to make text bigger - that's why it
suggests using a setting of 120dpi if you have difficulty reading screen
text. Many screens are now physically about 96dpi (e.g. a typical 17"
LCD of 1280x1024px is about 94dpi) and the enlargement that was
previously delivered by setting 96dpi doesn't occur.

However, now those fonts look too big so everyone makes their web fonts
90% or even 80%.

Nonsense.


What? This is a very well known and understood problem, surely you've
stumbled across it before? Google 'tiny text windows mac'.

The basic design templates for many late 90's web pages were based on
what looked good on a 72dpi Windows screen, hence the scale factor
introduced by Windows was (unknowingly in most cases I suspect) taken
into consideration in their design. Many designers were trying to get
10pt screen fonts that really were 10pt.

But that has changed because the dot density on monitors is now commonly
96dpi or more and Windows users are seeing what Mac users had been
putting up with for some time - tiny text. Modern pages are now
generally quite readable on most devices, but the text size issue
persists in places.

All because one software vendor tried to trick the system... please
don't compound the problem.

How did you get that idea anyway? Obviously not from of personal
experience.


Gimme a break Thomas. The very start of the article I quoted offers the
following quote:

"Because Windows thinks monitors use a screen resolution
of 96 dpi by default, rather than the Mac's 72 dpi, Windows-based
Web designers often lower the font size so text doesn't appear
too large for Windows users. Mac users are then faced with tiny
text that's hard to read."

The decision to enlarge screen text by playing with the dpi setting was
unique to Windows, the resulting issues are very well understood. The
rest of the article (published in February 1999) is here:

<URL:http://db.tidbits.com/getbits.acgi?tbart=05255>
Note that even in Windows XP, Microsoft suggest that if you have
difficulty seeing text, *increase the Windows dpi setting for your
monitor*. It is the concept that you can control your screen text size
by playing with dpi settings that is the root of the problem.

The OS should be aware of the real dpi of the monitor, it should not be
fooled into thinking it is anything other than what it really is just to
modify text size. That plays havoc with applications that really do
want to know what what the monitor dot pitch is - reliably.

I have used Mac and Windows computers interchangeably for over 15 years
and currently use displays with 94ppi on both (17" LCD at 1280x1024). I
also test on and infrequently use displays with 72ppi to 150ppi.

Some articles to bring you up to speed:

"Where does 96 DPI come from in Windows?"
<URL:http://blogs.msdn.com/fontblog/archive/2005/11/08/490490.aspx>

"Adjusting Scale for Higher DPI Screens"
<URL:http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/overview/highdpi.asp>

A rather over stated headline, but illustrates how widely the issue is
known:
"Tiny text threatens air safety"
<URL:http://www.theregister.co.uk/2002/04/18/tiny_text_threatens_air_safety/>

--
Rob
Mar 8 '06 #4

P: n/a
I do not want to play around with the size of the text.

I have a framed website with the NavBar in a frame down the left hand side.
The width of the NavBar frame is set at 150 and the buttons at 8em.

When the user adjusts the size of the text, the buttons change in size also
(correctly). At this point, I want to adjust the width of the NavBar frame.

How to I find out what size text the browser is set to?

"RobG" <rg***@iinet.net.au> wrote in message
news:uY*****************@news.optus.net.au...
Roger Withnell wrote:
How to I find out what size text the browser is set to?


var textSize = prompt("Please enter your browser's text size");

Ha ha... :-)

The concept of 'text size' is different in different browsers. IE uses
largest, larger, smaller, etc. with a base 'size' based on system
settings. Firefox has a base font size in pts and then adjusts from there
(and system settings have an effect on it too).

Other browsers likely have other methods, e.g. IE 7 Opera has a zoom
factor as well. Different platforms add to the mix.

So stop wanting to know or even care about what font size setting a
particular browser may have. Make your fonts look good relative to each
other and leave the rest up to the user. You may get more help or advice
in:

news:comp.infosystems.www.authoring.stylesheets

Try this:

<URL:http://db.tidbits.com/getbits.acgi?tbart=05284>
Way back Macs used 72dpi for screen fonts but that appeared too small for
the developers of Windows, so they used a default of 96dpi. Sending an
image made for 96dpi to a 72dpi screen made the images larger. However,
now those fonts look too big so everyone makes their web fonts 90% or even
80%.

All because one software vendor tried to trick the system... please don't
compound the problem.

Thanks in anticipation.


No problem! :-)
--
Rob

Mar 8 '06 #5

P: n/a
Roger Withnell wrote :

[top-posting corrected]
"RobG" <rg***@iinet.net.au> wrote in message
news:uY*****************@news.optus.net.au...
Roger Withnell wrote:
How to I find out what size text the browser is set to?
var textSize = prompt("Please enter your browser's text size");

Ha ha... :-)

The concept of 'text size' is different in different browsers. IE uses
largest, larger, smaller, etc. with a base 'size' based on system
settings. Firefox has a base font size in pts and then adjusts from there
(and system settings have an effect on it too).

Other browsers likely have other methods, e.g. IE 7 Opera has a zoom
factor as well. Different platforms add to the mix.

So stop wanting to know or even care about what font size setting a
particular browser may have. Make your fonts look good relative to each
other and leave the rest up to the user. You may get more help or advice
in:

news:comp.infosystems.www.authoring.stylesheets

Try this:

<URL:http://db.tidbits.com/getbits.acgi?tbart=05284>
Way back Macs used 72dpi for screen fonts but that appeared too small for
the developers of Windows, so they used a default of 96dpi. Sending an
image made for 96dpi to a 72dpi screen made the images larger. However,
now those fonts look too big so everyone makes their web fonts 90% or even
80%.

All because one software vendor tried to trick the system... please don't
compound the problem.
Thanks in anticipation.
No problem! :-)
--
Rob


Could you stop top-posting?
I do not want to play around with the size of the text.

I have a framed website with the NavBar in a frame down the left hand side.
The width of the NavBar frame is set at 150 and the buttons at 8em.
Why would you want/need to use buttons instead of links in a navigation
frame?

When the user adjusts the size of the text, the buttons change in size also
(correctly). At this point, I want to adjust the width of the NavBar frame.

How to I find out what size text the browser is set to?


You still do not need to know for calculations etc.. the computed text
size of your visitor's browser. You do not need to go that far into such
perspective.

I'd say you need to use a CSS template which is scalable, not a framed
webpage with a navigation frame at the bottom left.

Gérard
--
remove blah to email me
Mar 8 '06 #6

P: n/a
Roger Withnell wrote:
[...]
I have a framed website with the NavBar in a frame down the left hand
side.
The width of the NavBar frame is set at 150 and the buttons at 8em.

When the user adjusts the size of the text, the buttons change in size
also
(correctly). At this point, I want to adjust the width of the NavBar
frame.

How to I find out what size text the browser is set to?
You don't. Use block elements positioned with CSS and font-specific
length units (em, pt) for the `width' property instead.

<URL:http://www.w3.org/Style/>
[Top post]


Please don't. <URL:http://jibbering.com/faq/faq_notes/pots1.html#ps1Post>
PointedEars

P.S.: Use manual line-breaks with care if you also use automatic ones.
Mar 8 '06 #7

P: n/a
What is top-posting?

"Gérard Talbot" <ne***********@gtalbot.org> wrote in message
news:47************@uni-berlin.de...
Roger Withnell wrote :

[top-posting corrected]
"RobG" <rg***@iinet.net.au> wrote in message
news:uY*****************@news.optus.net.au...
Roger Withnell wrote:
> How to I find out what size text the browser is set to?
var textSize = prompt("Please enter your browser's text size");

Ha ha... :-)

The concept of 'text size' is different in different browsers. IE uses
largest, larger, smaller, etc. with a base 'size' based on system
settings. Firefox has a base font size in pts and then adjusts from
there (and system settings have an effect on it too).

Other browsers likely have other methods, e.g. IE 7 Opera has a zoom
factor as well. Different platforms add to the mix.

So stop wanting to know or even care about what font size setting a
particular browser may have. Make your fonts look good relative to
each other and leave the rest up to the user. You may get more help or
advice in:

news:comp.infosystems.www.authoring.stylesheets

Try this:

<URL:http://db.tidbits.com/getbits.acgi?tbart=05284>
Way back Macs used 72dpi for screen fonts but that appeared too small
for the developers of Windows, so they used a default of 96dpi.
Sending an image made for 96dpi to a 72dpi screen made the images
larger. However, now those fonts look too big so everyone makes their
web fonts 90% or even 80%.

All because one software vendor tried to trick the system... please
don't compound the problem.
> Thanks in anticipation.
No problem! :-)
--
Rob


Could you stop top-posting?
I do not want to play around with the size of the text.

I have a framed website with the NavBar in a frame down the left hand
side. The width of the NavBar frame is set at 150 and the buttons at 8em.


Why would you want/need to use buttons instead of links in a navigation
frame?

When the user adjusts the size of the text, the buttons change in size
also (correctly). At this point, I want to adjust the width of the
NavBar frame.

How to I find out what size text the browser is set to?


You still do not need to know for calculations etc.. the computed text
size of your visitor's browser. You do not need to go that far into such
perspective.

I'd say you need to use a CSS template which is scalable, not a framed
webpage with a navigation frame at the bottom left.

Gérard
--
remove blah to email me


Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Mar 8 '06 #8

P: n/a
Roger Withnell wrote :
What is top-posting?


The comp.lang.javascript FAQ found at

http://jibbering.com/faq/

says at

http://jibbering.com/faq/#FAQ2_3

"Before posting to clj, you should thoroughly read this document."

and then the comp.lang.javascript FAQ says

"When replying to a message on the group trim quotes of the preceding
messages to the minimum needed"

The comp.lang.javascript FAQ also says

"add your comments below the pertinent section of quoted material, as
per FYI28/RFC1855 (never top post)."

and it gives links like

http://www.ietf.org/rfc/rfc1855.txt

and

http://www.jibbering.com/faq/faq_not...1.html#ps1Post

and that one says

"Top posting is placing the response above the quoted material that is
being responded to. The chronological sequence of conversation becomes
the reverse of the normal top to bottom reading sequence and, without
additional text summarising the points being responded to, it is
difficult to determine exactly which points such a reply relates to."

Gérard
--
remove blah to email me
Mar 8 '06 #9

P: n/a
Roger Withnell wrote :
What is top-posting?


Because it messes up the order in which people normally read; reading
threads become much more difficult. The chronological order of posts in
thread is destroyed; contextual reading and logical flow of posts and
replies and replies to replies are destroyed.

Why is top-posting such a bad thing?

> Top-posting.

>> What is the most annoying thing on usenet and in e-mail?

>>> Top posting is placing the response above the quoted material that is being responded to. The
>>> chronological sequence of conversation becomes the reverse of the normal top to bottom reading sequence
>>> and, without additional text summarising the points being responded to, it is difficult to determine
>>> exactly which points such a reply relates to. (...)
>>> *Never top post to comp.lang.javascript.* There is an established
>> convention in posting styles on Usenet, and comp.lang.javascript.
>> It is most efficient for everyone if newcomers follow that
>>> convention even if it seems strange to do so at first. In the
>> long run it makes life easier for everyone, and the sooner that
>> is recognised the less likelihood there is of being taken for a
>> fool.
>>> http://www.jibbering.com/faq/faq_not....html#ps1TopPs

>>>> What's top-posting?


Gérard
--
remove blah to email me
Mar 8 '06 #10

P: n/a
Roger Withnell <ro*********@THISupperbridge.co.uk> wrote:
^^^^^^^^^^^^^^^^^^^^^
What is top-posting?
Almost as bad as domain abuse.
[Top post]

F'up2 poster

PointedEars
Mar 8 '06 #11

P: n/a

"Gérard Talbot" <ne***********@gtalbot.org> wrote in message
news:47************@uni-berlin.de...
Roger Withnell wrote :

[top-posting corrected]
"RobG" <rg***@iinet.net.au> wrote in message
news:uY*****************@news.optus.net.au...
Roger Withnell wrote:
> How to I find out what size text the browser is set to?
var textSize = prompt("Please enter your browser's text size");

Ha ha... :-)

The concept of 'text size' is different in different browsers. IE uses
largest, larger, smaller, etc. with a base 'size' based on system
settings. Firefox has a base font size in pts and then adjusts from
there (and system settings have an effect on it too).

Other browsers likely have other methods, e.g. IE 7 Opera has a zoom
factor as well. Different platforms add to the mix.

So stop wanting to know or even care about what font size setting a
particular browser may have. Make your fonts look good relative to
each other and leave the rest up to the user. You may get more help or
advice in:

news:comp.infosystems.www.authoring.stylesheets

Try this:

<URL:http://db.tidbits.com/getbits.acgi?tbart=05284>
Way back Macs used 72dpi for screen fonts but that appeared too small
for the developers of Windows, so they used a default of 96dpi.
Sending an image made for 96dpi to a 72dpi screen made the images
larger. However, now those fonts look too big so everyone makes their
web fonts 90% or even 80%.

All because one software vendor tried to trick the system... please
don't compound the problem.
> Thanks in anticipation.
No problem! :-)
--
Rob


Could you stop top-posting?
I do not want to play around with the size of the text.

I have a framed website with the NavBar in a frame down the left hand
side. The width of the NavBar frame is set at 150 and the buttons at 8em.


Why would you want/need to use buttons instead of links in a navigation
frame?

When the user adjusts the size of the text, the buttons change in size
also (correctly). At this point, I want to adjust the width of the
NavBar frame.

How to I find out what size text the browser is set to?


You still do not need to know for calculations etc.. the computed text
size of your visitor's browser. You do not need to go that far into such
perspective.

I'd say you need to use a CSS template which is scalable, not a framed
webpage with a navigation frame at the bottom left.

Gérard
--
remove blah to email me


Thanks for your advice concerning scalable CSS templates, but there is a
large investment in the frames structure so, for the time being, I have to
stay with it.

I need to establish the text size the browser is set to so that I can adjust
the width of the NavBar frame accordingly.

How do I establish what size text the browser is set to?


Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Mar 9 '06 #12

P: n/a
Roger Withnell wrote:
How do I establish what size text the browser is set to?


You cannot.
PointedEars
Mar 9 '06 #13

P: n/a

"Thomas 'PointedEars' Lahn" <Po*********@web.de> wrote in message
news:41****************@PointedEars.de...
Roger Withnell wrote:
How do I establish what size text the browser is set to?


You cannot.
PointedEars


Many thanks. Your clear answer made me consider alternative solutions which
I found by using offsetWidth to measure the current width of a NavBar button
and set the frame's cols accordingly.

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Mar 10 '06 #14

P: n/a
JRS: In article <11*************@sp6iad.superfeed.net>, dated Thu, 9
Mar 2006 15:38:19 remote, seen in news:comp.lang.javascript, Roger
Withnell <ro*********@THISupperbridge.co.uk> posted :

How do I establish what size text the browser is set to?


Don't over-quote.

I believe that it may be possible to discover the vertical position of
at least one type of element.

If so, create (say) three such elements, with one line of text between
the first pair and two lines between the second.

The answer should then be obvious enough.
Be aware, though, that it can be changed during the display of a page.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Mar 10 '06 #15

This discussion thread is closed

Replies have been disabled for this discussion.