Update line height cache in Win32FontCache::SetFontSize

This commit is contained in:
Jonathan G Rennison
2019-09-22 10:54:51 +01:00
parent 000f86f23d
commit 8b8a97c248

View File

@@ -819,6 +819,8 @@ void Win32FontCache::SetFontSize(FontSize fs, int pixels)
this->glyph_size.cx = otm->otmTextMetrics.tmMaxCharWidth;
this->glyph_size.cy = otm->otmTextMetrics.tmHeight;
font_height_cache[this->fs] = this->GetHeight();
DEBUG(freetype, 2, "Loaded font '%s' with size %d", FS2OTTD((LPTSTR)((BYTE *)otm + (ptrdiff_t)otm->otmpFullName)), pixels);
}