473,412 Members | 2,304 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,412 software developers and data experts.

determine if font-smoothing is in effect

Is it possible to determine with javascript or other means if the user has
any sort of font-smoothing in effect on their os or ua?

Serif'd fonts don't look so nice on non-smoothed systems, so, i'd rather
switch to plain old Arial...

The idea is to detect this fact and then alter the font/s that are used to
display a website via javascript - modifying the dom tree, I guess.

Thanks,

Sep 18 '08 #1
2 1423
"Joe Butler" <ff***********@hotmail-spammers-paradise.comwrites:
Is it possible to determine with javascript or other means if the user has
any sort of font-smoothing in effect on their os or ua?
No.
Serif'd fonts don't look so nice on non-smoothed systems, so, i'd rather
switch to plain old Arial...
Or rely on the user's default font? You can probably assume that it works
for his settings.
Or let the user pick the font he prefers.
The idea is to detect this fact and then alter the font/s that are used to
display a website via javascript - modifying the dom tree, I guess.
To change the font, you change the CSS rules, not the DOM tree.

/L
--
Lasse Reichstein Nielsen
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Sep 18 '08 #2
OK, shame.

The default font on FF3 seems to be Times New Roman. This is not such a
good choice on non-smoothed systems.

I would have thought to change the font via javascript, that a CSS rule for
say body would be inserted into the dom tree that overrode the one specified
in the main css file.

What do you mean by changing the css rules? Can this be done in javascript
outside of the dom tree?

"Lasse Reichstein Nielsen" <lr********@gmail.comwrote in message
news:ab**********@gmail.com...
"Joe Butler" <ff***********@hotmail-spammers-paradise.comwrites:
>Is it possible to determine with javascript or other means if the user
has
any sort of font-smoothing in effect on their os or ua?

No.
>Serif'd fonts don't look so nice on non-smoothed systems, so, i'd rather
switch to plain old Arial...

Or rely on the user's default font? You can probably assume that it works
for his settings.
Or let the user pick the font he prefers.
>The idea is to detect this fact and then alter the font/s that are used
to
display a website via javascript - modifying the dom tree, I guess.

To change the font, you change the CSS rules, not the DOM tree.

/L
--
Lasse Reichstein Nielsen
DHTML Death Colors:
<URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'

Sep 18 '08 #3

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

Similar topics

1
by: Meyer1228 | last post by:
We're printing invoices using the printer function in VB6. If we print to an IBM-compatible dot-matrix, we can use a font called "12 CPI HSD" which works well, since we want to use 12-pitch. If...
1
by: Timo | last post by:
All my font-sizes are set as relative sizes in CSS (large, medium, small, x-small, etc). Let's say something is set in CSS to be xx-large, but a visually impaired user wants it displayed even...
9
by: Adam | last post by:
Can someone please help!! I am trying to figure out what a font is? Assume I am working with a fixed font say Courier 10 point font Question 1: What does this mean 10 point font Question 2:...
4
by: John Baro | last post by:
I need to determine which fonts are human readable. Webdings, wingdings etc.. are not. Is there any easy way to accomplish this? Cheers JB
6
by: Tom McLaughlin | last post by:
How can I determine the numbers of lines of text that are visible in a textbox? Tom
1
by: Netserver | last post by:
Hi in the display properties off the control panel, tab settings,advance button. Font size has two sizes, the default is small. when you create your form with this default size everything is fine...
2
by: Wayne Wengert | last post by:
I have an aspx page which contains a datalist, which in turn, is populated with checkboxes based on the contents of a SQL table (see code below). I want a routine to go through all the checkboxes...
1
by: ara.t.howard | last post by:
hi all- i'm a totally js hack so go easy on me... i'd like to create a function that, given the size of a block of text in x = maximum number of chars y = total number of lines (this is in...
5
by: =?Utf-8?B?bGpsZXZlbmQy?= | last post by:
Is there any way to do the following: 1. Determine whether ClearType is enabled by the system (under Display Properties - Effects in WinXP). 2. Determine whether a font supports ClearType. ...
2
by: =?Utf-8?B?UmljaA==?= | last post by:
I have code to bold text in a datagridviewcell: Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim cs As DataGridViewCellStyle, fnt...
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
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
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
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...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.