Solved

C++ Builder 1.0 - Fonts real height

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel/Word Add-in in what language? 5 128
IdTCPClient1->Disconnect(); not working 3 76
I could not build boost code, 10 94
c++ syntax question 9 52
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
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 goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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.

839 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