Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

one font: two different sizes

Posted on 1998-10-14
2
Medium Priority
?
271 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
lar_jens earned 150 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

618 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