Solved

one font: two different sizes

Posted on 1998-10-14
2
265 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
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…

803 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