freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Devel] a simple question


From: Steve Claridge
Subject: [Devel] a simple question
Date: Thu, 19 Dec 2002 14:06:56 -0000

Apologies in advance if this question is a little to simple, I
have been reading through the FreeType docs but cannot sort this
problem out.

I am using Freetype to calculate font metrics for creating a PDF
document, here is a sample code segment (in pascal):

  err := FT_New_Face(FT_Library, 'MyFont', 0, face);
  if (err = 0) then
  begin
    FT_Set_Char_Size(face, 0, 33 * 64, 72, 72);

    aHeight := face.size.metrics.Height div 64; //includes leading.
    aAscent := face.size.metrics.Ascender div 64;
    aDescent := face.size.metrics.Descender div 64;
  end;

>From my input height of 33 I get the following results:

aHeight = 45
aAscent = 30 
aDescent = -7

I would've thought that aAscent + absolute(aDescent) would've equalled
the original height of 33, why doesn't it?

Many Thanks,
Steve Claridge.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]