Solved

one font: two different sizes

Posted on 1998-10-14
2
266 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
ID: 1342894
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
ID: 1342895
thanks lar_jens,
that was the solution. Now i define every font by height and it's ok.
titz
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

792 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