Fix for leading space
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12585 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
46a20a9b71
commit
3348baea8f
@ -55,8 +55,11 @@ FontStyle::FontStyle(const char *filepath, FT_Face face)
|
|||||||
fID=0;
|
fID=0;
|
||||||
fHeight.ascent=face->ascender;
|
fHeight.ascent=face->ascender;
|
||||||
fHeight.descent=face->descender;
|
fHeight.descent=face->descender;
|
||||||
// TODO: Fix this
|
|
||||||
fHeight.leading=/*face->height;*/ 0;
|
// FT2 doesn't provide a linegap, but according to the docs, we can
|
||||||
|
// calculate it because height = ascending + descending + leading
|
||||||
|
fHeight.leading=face->height-( face->ascender + (face->descender>0)?
|
||||||
|
face->descender : face->descender * -1);
|
||||||
fHeight.units_per_em=face->units_per_EM;
|
fHeight.units_per_em=face->units_per_EM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user