mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 11:51:27 +00:00
* Source/art/ftfont.m: Add lineHeight ivar to FTFontInfo.
(+defaultLineHeightForFont): Implement. (-initWithFontName:matrix:screenFont:): Set lineHeight. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@20101 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b88251cf19
commit
cea9c4050e
2 changed files with 16 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-09-21 19:19 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/art/ftfont.m: Add lineHeight ivar to FTFontInfo.
|
||||
(+defaultLineHeightForFont): Implement.
|
||||
(-initWithFontName:matrix:screenFont:): Set lineHeight.
|
||||
|
||||
2004-09-19 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/win32/WIN32Server.m: Added missing include for new Cygwin
|
||||
|
|
|
@ -112,6 +112,9 @@ static BOOL anti_alias_by_default;
|
|||
|
||||
/* Glyph generation */
|
||||
NSGlyph ligature_ff,ligature_fi,ligature_fl,ligature_ffl,ligature_ffi;
|
||||
|
||||
|
||||
float lineHeight;
|
||||
}
|
||||
@end
|
||||
|
||||
|
@ -749,6 +752,7 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib, FT_Pointer data, FT_
|
|||
/* TODO: need to look acrefully at these and make sure they are correct */
|
||||
ascender = fabs(((int)size->metrics.ascender) / 64.0);
|
||||
descender = fabs(((int)size->metrics.descender) / 64.0);
|
||||
lineHeight = (int)size->metrics.height / 64.0;
|
||||
xHeight = ascender * 0.5; /* TODO */
|
||||
maximumAdvancement = NSMakeSize((size->metrics.max_advance / 64.0), ascender + descender);
|
||||
|
||||
|
@ -850,6 +854,12 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib, FT_Pointer data, FT_
|
|||
}
|
||||
|
||||
|
||||
-(float) defaultLineHeightForFont
|
||||
{
|
||||
return lineHeight;
|
||||
}
|
||||
|
||||
|
||||
#include <GNUstepBase/Unicode.h>
|
||||
|
||||
/* TODO: the current point probably needs updating after drawing is done */
|
||||
|
|
Loading…
Reference in a new issue