Solved

C++ Builder 1.0 - Fonts real height

Posted on 1998-08-30
4
401 Views
Last Modified: 2013-12-03
How can I know the HEIGHT occupied by a font?
Builder gives the height of the font minus the leading space. This space varies from font to font. How can I find out its value?
0
Comment
Question by:tiagov
  • 2
4 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 1171628
Use the GetTextMetrics() function.  This fills in a TEXTMETRIC structure that has the information you want.  The tmHeight is the height without taking the external leading into account.  The external leading is also specified in the structure as well as lots of other fugures.

Let me know if you have questions.
0
 

Author Comment

by:tiagov
ID: 1171629
Or Builder 1 doesn´t  have that function or my release is incomplete.
I found out a way using the Canvas->TextHeight function.

Thank you any way.
0
 

Accepted Solution

by:
hlava earned 100 total points
ID: 1171630
i don't know in which situation you are
my English language isn't best to understand you question.

if you can get sizes of Font forexample from Label1
(i'm using B.C++ B. 3.0)
try:

int x,y;
x=Label1->Font->Width;
y=Label1->Font->Height;


I dont Know if it is what you want.


H.E.A.D
0
 
LVL 22

Expert Comment

by:nietod
ID: 1171631
Read the question history.  He already found an answer three weeks ago.  It is not a good idea to go through the old questions and answer them unless you check that an answer is still needed.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
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…

758 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

22 Experts available now in Live!

Get 1:1 Help Now