change Layout::relayout

This commit is contained in:
侯歌 2024-07-11 10:14:14 +08:00
parent 2886c7d72c
commit 3c46d3aded

View File

@ -505,7 +505,7 @@ void Layout::relayout(bool force){
mLineCount=0; mLineCount=0;
mLines.clear(); mLines.clear();
measureSize(L"",extents,&fontextents); measureSize(L"",extents,&fontextents);
mLineHeight = fontextents.height*mSpacingMult+mSpacingAdd; mLineHeight = (fontextents.ascent +fontextents.descent)*mSpacingMult+mSpacingAdd;
for(int i = 0; mMultiline && (i < mText.length());i++){ for(int i = 0; mMultiline && (i < mText.length());i++){
char breaks[2]; char breaks[2];
wchar_t wch[2]; wchar_t wch[2];