Fix #10151: Use otmAscent instead of otmTextMetrics.tmAscent [Windows]

These metrics more closely match the the sprite font, but do result in a
more cramped line-height.
This commit is contained in:
Peter Nelson 2022-12-21 20:51:35 +00:00
parent 0a8bcdd344
commit aff56c42ab
No known key found for this signature in database
GPG Key ID: 8EF8F0A467DF75ED
1 changed files with 2 additions and 2 deletions

View File

@ -185,8 +185,8 @@ void Win32FontCache::SetFontSize(int pixels)
GetOutlineTextMetrics(this->dc, otmSize, otm);
this->units_per_em = otm->otmEMSquare;
this->ascender = otm->otmTextMetrics.tmAscent;
this->descender = otm->otmTextMetrics.tmDescent;
this->ascender = otm->otmAscent;
this->descender = -otm->otmDescent;
this->height = this->ascender + this->descender;
this->glyph_size.cx = otm->otmTextMetrics.tmMaxCharWidth;
this->glyph_size.cy = otm->otmTextMetrics.tmHeight;