mirror of https://github.com/OpenTTD/OpenTTD.git
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:
parent
0a8bcdd344
commit
aff56c42ab
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue