Solved

one font: two different sizes

Posted on 1998-10-14
2
263 Views
Last Modified: 2013-12-03
hi,

i have the following problem in D3:
i create a font and show some text on the screen.
But the real size of the font depends on the running system.
Example:
  fo:=Tfont.create;
  fo.name:='Courier';
  fo.size:=10;

In every case is the screen-Resolution 640 x 480 pixel.

Under WIN98 the size of the text on the screen is
larger than on another pc under WIN95B (same resolution).

what is the reason ?
how can i manage that the real size on the screen will be the same in both cases ?

thanks,
titz
0
Comment
Question by:titz
2 Comments
 
LVL 1

Accepted Solution

by:
lar_jens earned 50 total points
Comment Utility
Try using the font.height property instead.. Since the size property is depending on the
height of the font..

The formula is as follows..

Font.Size = -Font.Height * 72 / Font.PixelsPerInch
0
 
LVL 1

Author Comment

by:titz
Comment Utility
thanks lar_jens,
that was the solution. Now i define every font by height and it's ok.
titz
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now