473,394 Members | 1,854 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,394 software developers and data experts.

detecting default browser font and size

I'm curious if it is possible to detect the browsers default font and
size? Most of the posts on this topic predate Windows XP, IE 5.5,
Mozilla Firefox, et al.

I've searched up and down the DOM properties, looped through most
objects and collections alerting properties and values, and I can't
find anything. This leads me to believe it is not possible to detect
the browsers default font settings.

Any insight is appreciated!

Thanks,
Ben

Jul 18 '06 #1
2 2850
Ben Long said the following on 7/18/2006 5:53 PM:
I'm curious if it is possible to detect the browsers default font and
size?
No, and it is typically irrelevant.
Most of the posts on this topic predate Windows XP, IE 5.5,
Mozilla Firefox, et al.
Probably because it is irrelevant.
I've searched up and down the DOM properties, looped through most
objects and collections alerting properties and values, and I can't
find anything. This leads me to believe it is not possible to detect
the browsers default font settings.
Your assumption is correct.

Why does it matter though?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 18 '06 #2
Hi Randy,

Thanks for getting back to me. Ultimately, you're correct - it is
completely irrelevant. The reason I asked is one of our engineers
approached me with a problem he's having using a third-party component
with one of our IE web apps. The component is a 'rich-text-editor' that
utilizes the Microsoft-centric ExecCommand
(http://msdn.microsoft.com/workshop/a...xeccommand.asp)
and allows people to format text within the browser.

The problem he is having when using the third-party tool: if the client
declares a font that is the system default font, the third-party
utility ignores the request by excluding the formatting tags and allows
the browser to render the font using the default font setting. Insane,
I know. The problem he is having is inconsistency in the DOM with some
elements missing wrappers.

My recommendation is to use a different control for the rich-formatting
of text.

Thanks again!

- Ben

Randy Webb wrote:
Ben Long said the following on 7/18/2006 5:53 PM:
I'm curious if it is possible to detect the browsers default font and
size?

No, and it is typically irrelevant.
Most of the posts on this topic predate Windows XP, IE 5.5,
Mozilla Firefox, et al.

Probably because it is irrelevant.
I've searched up and down the DOM properties, looped through most
objects and collections alerting properties and values, and I can't
find anything. This leads me to believe it is not possible to detect
the browsers default font settings.

Your assumption is correct.

Why does it matter though?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: stef | last post by:
Hello: I am trying to design a web page whose graphics content would change according to the "text Zoom" settings of the user. (Basically the goal is to use mathematical symbols that...
2
by: Isaac Grover | last post by:
Hi everyone, Rather than have this construct in my pages: <table> <tr><td><font face=arial size=3>line1</font></td></tr> <tr><td><font face=arial size=3>line2</font></td></tr> <tr><td><font...
11
by: Rithish | last post by:
If I have something like, <TABLE><TR><TD STYLE="'Font-Family:Arial'">Arial Text</TD></TR></TABLE> What would be the height of the cell? I believe it would be corresponding to the font used......
3
by: Marti | last post by:
Dear everyone, Its my understanding that IE6 now uses a default text-size of "Small" rather than IE5's "Medium". Since I have used relative font-sizes (usually in ems) on all my sites, I am...
55
by: Haines Brown | last post by:
I've been setting font-size 1em; as the default in my style sheets. Until now, that seemed to be ok. But now I'm beginning to wonder. My aim is to have an easily readable, but not overly large...
54
by: Brett Baisley | last post by:
Hello, I am trying to figure out how to change the default font-family and font-size. I tried adding this to the BODY section, but it didn't work. I tried to the P section, but they are not...
4
by: JohnSmith90 | last post by:
Wheh I make the following statement, what is the unit for the font size. <td colspan='1' bgcolor='#F4F4F4'><font face='Verdana' size='1'><b>TestData</b></font></td> Thank you very much for...
7
by: Inny | last post by:
Hello, Im trying To create A code In php That Does the Following: A. detects visiting users real ip address B. detects city and country C. detects browser type and version D. detects referrer...
58
by: Don Li | last post by:
I've tried <body style="font-family:Verdana,Arial,Helvetica;font-size:0.8em;"> or <body style="font-family:Verdana,Arial,Helvetica;font-size:11pct;"> or <body...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.