From 3348baea8fc1dc9aa92e57f3e52e203703ffad46 Mon Sep 17 00:00:00 2001 From: DarkWyrm Date: Sat, 7 May 2005 15:04:52 +0000 Subject: [PATCH] Fix for leading space git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12585 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/FontFamily.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/servers/app/FontFamily.cpp b/src/servers/app/FontFamily.cpp index 1a4dc83bda..4db2b6b23a 100644 --- a/src/servers/app/FontFamily.cpp +++ b/src/servers/app/FontFamily.cpp @@ -55,8 +55,11 @@ FontStyle::FontStyle(const char *filepath, FT_Face face) fID=0; fHeight.ascent=face->ascender; 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; }