Solved

C++ Builder 1.0 - Fonts real height

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

635 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