473,790 Members | 2,850 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1448
"Joe Butler" <ff***********@ hotmail-spammers-paradise.comwri tes:
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/rasterTriangleD OM.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********@gma il.comwrote in message
news:ab******** **@gmail.com...
"Joe Butler" <ff***********@ hotmail-spammers-paradise.comwri tes:
>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/rasterTriangleD OM.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
4953
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 we want to print to our HP Laser, we need to know that it is a laser so we can change the font to something comparable. Is there a way to determine what type of printer is selected - i.e. Laser(or deskjet) or Dot Matrix?
1
1698
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 bigger. Can a script determine an element's absolute size, *as it is being rendered by the browser*, and then increment the element's font-size in absolute terms? Thanks! Timo
9
19535
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: How do I determine how many characters I can get on a line Question 3: How do I determine how many lines I can get on a page. Assume no margins Question 4: Does their exist some kind of refernce table that will equate a font with chars/line and...
4
2964
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
1739
by: Tom McLaughlin | last post by:
How can I determine the numbers of lines of text that are visible in a textbox? Tom
1
999
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 even if the selected font properties is 8 to .....even the controls show properly But if the font size is large many things do not show properly such as forms and controls such as the toolbar, etc. Is there a way to get that info in display,...
2
1429
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 in this set and determine which ones the user checked. I know I've seen some nice tight routines to do this but I had no luck Googling for it. ================== Code ====================== <asp:DataList ID="DataList1" runat="server"...
1
1891
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 chars too of course)
5
2228
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. Thanks for any help! Lance
2
7751
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 As Font For Each c As DataGridViewCell In dgrv1.SelectedCells cs = c.Style Console.WriteLine(c.Style.Font) fnt = dgrv1.Font Console.WriteLine(fnt.Name)
0
9666
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10413
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10200
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10145
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9986
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7530
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6769
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3707
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.