OSX: Fix CoreTextFontCache not setting font_height_cache

See: #323
This commit is contained in:
Jonathan G Rennison
2021-10-02 11:54:59 +01:00
parent 513f6db718
commit 2df744db79

View File

@@ -215,6 +215,8 @@ void CoreTextFontCache::SetFontSize(int pixels)
this->descender = -(int)std::ceil(CTFontGetDescent(this->font.get()));
this->height = this->ascender - this->descender;
font_height_cache[this->fs] = this->GetHeight();
/* Get real font name. */
char name[128];
CFAutoRelease<CFStringRef> font_name((CFStringRef)CTFontCopyAttribute(this->font.get(), kCTFontDisplayNameAttribute));