freetype
[Top][All Lists]
Advanced

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

Re: need help! (font width vs. font height)


From: crusius_at_stanford . edu
Subject: Re: need help! (font width vs. font height)
Date: Fri, 03 Nov 2000 21:05:15 -0800

In reply to Werner LEMBERG <address@hidden>
>
>> 2) now i have the height for the lines. but i still need the offset
>>    from the bottom of the line and the baseline. i tried
>>    face->size->metrics.descender, but this value seems to fall short
>>    about 2 pixels from the "real" value. the letter "j", for example,
>>    extends 2 pixels below the line. (i am using cmtt10 for tests).
>
>I'm not exactly sure what you want, but what about the value
>
>  1.2 * (ascender - descender) - (ascender - descender)
>
>     = 0.2 * (ascender - descender)

what i want is exactly this: to be able to specify in advance the
dimensions of all bitmaps. of course i must to this indirectly, but
the effect should be the same as if all the bitmaps had the same
dimension, with padded blank pixels to align all characters.

this is so because in a terminal emulator the screen will be such that
each character has the same space. hence, i'll have a bunch of
rectangles where i'll have to draw the characters. now, on a given
rectangle, how do i choose where to draw the character (so that the
baseline is aligned on every line for every character)?

my choice of 'descender' is so that the "deepest" character will just
touch the bottom of the rectangle.

--
Cesar Augusto Rorato Crusius    __o      __o      __o      __o      __o    
Stanford University           _`\<,    _`\<,    _`\<,    _`\<,    _`\<,    
e-mail:address@hidden    (_)/(_)  (_)/(_)  (_)/(_)  (_)/(_)  (_)/(_)   
www.stanford.edu/~crusius
                                       o      _     _         _
   __o      __o      __o      __o     /\_   _ \\o  (_)\__/o  (_)
 _`\<,    _`\<,    _`\<,    _`\<,    _>(_) (_)/<_    \_| \   _|/' \/
(_)/(_)  (_)/(_)  (_)/(_)  (_)/(_)  (_)        (_)   (_)    (_)'  _\o_

He who sacrifices functionality for ease of use
Loses both and deserves neither



reply via email to

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