Better leading
This commit is contained in:
@@ -141,7 +141,7 @@ public:
|
||||
|
||||
int Height()
|
||||
{
|
||||
return mFace->size->metrics.height/(1<<6);
|
||||
return (mFace->size->metrics.ascender - mFace->size->metrics.descender)/(1<<6);
|
||||
}
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
FT_Size_Metrics &metrics = mFace->size->metrics;
|
||||
ioMetrics.ascent = std::max( ioMetrics.ascent, (float)metrics.ascender/(1<<6) );
|
||||
ioMetrics.descent = std::max( ioMetrics.descent, (float)fabs((float)metrics.descender/(1<<6)) );
|
||||
ioMetrics.height = std::max( ioMetrics.height, (float)metrics.height/(1<<6) );
|
||||
ioMetrics.height = std::max( ioMetrics.height, (float)(mFace->size->metrics.ascender - mFace->size->metrics.descender)/(1<<6) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1800,7 +1800,7 @@ void TextField::Layout(const Matrix &inMatrix)
|
||||
mLines.push_back(line);
|
||||
line.Clear();
|
||||
g.UpdateMetrics(line.mMetrics);
|
||||
y += g.Height() + g.mFormat->leading - 2;
|
||||
y += g.Height() + g.mFormat->leading + 1;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -1835,7 +1835,7 @@ void TextField::Layout(const Matrix &inMatrix)
|
||||
line.mMetrics.width = Round6(last_word_x6);
|
||||
}
|
||||
mLines.push_back(line);
|
||||
y += g.Height() + g.mFormat->leading - 2;
|
||||
y += g.Height() + g.mFormat->leading + 1;
|
||||
x6 = gap<<6;
|
||||
line.Clear();
|
||||
g.UpdateMetrics(line.mMetrics);
|
||||
|
||||
Reference in New Issue
Block a user