1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-27 16:39:09 +00:00

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:
2022-12-21 20:51:35 +00:00
parent 0a8bcdd344
commit aff56c42ab

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;