473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Browser text size setting

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

Thanks in anticipation.
Mar 7 '06 #1
14 3949
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
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
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
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
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
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
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
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
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
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

"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
Roger Withnell wrote:
How do I establish what size text the browser is set to?


You cannot.
PointedEars
Mar 9 '06 #13

"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Billy | last post by:
Hi, I was wondering if it is possible to change the browsers text settings. ie. in internet explorer you can change the text size by going to: View -> Text Size Is there a way to overide a...
115
by: J | last post by:
I've run CSSCheck on my style sheets and I always get a warning similar to this: "font: bold 9pt/100% sans-serif Warning: Absolute length units should not generally be used on the Web ..." ...
3
by: Kevin Matthews | last post by:
i'm having strange problems with browser compatibility between firefox and internet explorer, ---------------------------------------- The following is the CSS:...
8
by: mscir | last post by:
I'd like to detect when the user resizes the text in the browser, is there a specific event I can watch for?
6
by: Paolo | last post by:
Hallo, i have found more script for autoresize a popup browser windows to the image opened but I search something that autoresize the browser windows popup to che content(for example a table with...
7
by: Daniel Kaplan | last post by:
I have the item below at the top of my style sheet. And it seems that the font-szie is ignored. I know that my linked style sheet is being read, and used because if I remove the font-family line,...
4
by: Peter Larsen | last post by:
Hi, I want to be able to show a file browser embedded on a form - a browser which is similar to the browser you get by SHBrowseForFolder(). Is that possible ? Thank you in advance. BR Peter...
10
by: Yuk Tang | last post by:
Another step on the road to enlightenment, aka producing a UI. I've added a webbrowser control to a form, and I want it to fill the space of the form. Playing around with docking, left, top,...
8
by: Cylix | last post by:
Any way to define the length of a textfield? I have just set all the field with a width so that they look like clear and easy to read, However, When I see the page of mac os, They are totally...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.