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

Font sizes

How can I find out if the application is running in a system with small or
big fonts?
Thank you
Nov 17 '05 #1
1 1198
//Gets the Default DPI
Form form = new Form();
Graphics graphics = form.CreateGraphics();

if ((graphics.DpiY / (float) 96) == 1F)
Console.WriteLine("Normal Font");
else if ((graphics.DpiY / (float) 120) == 1F)
Console.WriteLine("Big Font");
else
Console.WriteLine("Custom Font");

Gustavo

"Alberto" <al*****@nospam.com> wrote in message
news:u2**************@tk2msftngp13.phx.gbl...
How can I find out if the application is running in a system with small or
big fonts?
Thank you

Nov 17 '05 #2

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

Similar topics

6
by: John Topley | last post by:
Hi, I'm trying to create a pure CSS layout using DIVs. I have three DIVs (in one column) down the left hand side of my page, with a ten pixel vertical gap between each of them (the content is on...
131
by: Peter Foti | last post by:
Simple question... which is better to use for defining font sizes and why? px and em seem to be the leading candidates. I know what the general answer is going to be, but I'm hoping to ultimately...
10
by: Luke Duddridge | last post by:
Hello, I work for a local council and have recently been part of the project for a new website design which went live at the end of september at www.tauntondeane.gov.uk. I set the relative...
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...
38
by: Kai Jaeger | last post by:
I am playing with setting font sizes in CSS using em as unit of measurement. All seems to be fine. Even Netscape Navigator shows the characters very similar to IE, what is not the kind if px is...
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 ..." ...
15
by: chart43 | last post by:
> I work on Windows (unfortunately). But I regularly view my work in a Mac > (IE5.x and Safari). I do not notice the phenomenon that you describe. > But then, it hardly seems relevant. What's...
4
by: hgraham | last post by:
I've recently noticed that there seems to be some font size differences (I'm guessing) in pages being viewed in FF 1.5 on my laptop which causes the whole layout to fall apart. You can see this...
60
by: deko | last post by:
As I understand it, most browser manufacturers have agreed on 16px for their default font size. So, this should be an accurate conversion for percentages: px % 16 = 100 14 = 87.5 13 =...
1
by: Randy Shore | last post by:
I have run into a problem with the new rich text control in Access 2007. It seems that you can only choose from 6 preset font sizes when entering or editing text. The sizes are...
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
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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...

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.