Solved

C++ Builder 1.0 - Fonts real height

Posted on 1998-08-30
4
430 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
[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
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

Independent Software Vendors: 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

Suggested Solutions

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
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…

734 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