one font: two different sizes

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
LVL 1
titzAsked:
Who is Participating?
 
lar_jensConnect With a Mentor Commented:
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
 
titzAuthor Commented:
thanks lar_jens,
that was the solution. Now i define every font by height and it's ok.
titz
0
All Courses

From novice to tech pro — start learning today.