mirror of https://github.com/OpenTTD/OpenTTD
Cleanup: Remove unused parameters from FreeTypeFontCache::SetFontSize. (#12663)
parent
f939e81bf0
commit
77a7113ba6
|
@ -33,7 +33,7 @@ class FreeTypeFontCache : public TrueTypeFontCache {
|
||||||
private:
|
private:
|
||||||
FT_Face face; ///< The font face associated with this font.
|
FT_Face face; ///< The font face associated with this font.
|
||||||
|
|
||||||
void SetFontSize(FontSize fs, FT_Face face, int pixels);
|
void SetFontSize(int pixels);
|
||||||
const void *InternalGetFontTable(uint32_t tag, size_t &length) override;
|
const void *InternalGetFontTable(uint32_t tag, size_t &length) override;
|
||||||
const Sprite *InternalGetGlyph(GlyphID key, bool aa) override;
|
const Sprite *InternalGetGlyph(GlyphID key, bool aa) override;
|
||||||
|
|
||||||
|
@ -60,10 +60,10 @@ FreeTypeFontCache::FreeTypeFontCache(FontSize fs, FT_Face face, int pixels) : Tr
|
||||||
{
|
{
|
||||||
assert(face != nullptr);
|
assert(face != nullptr);
|
||||||
|
|
||||||
this->SetFontSize(fs, face, pixels);
|
this->SetFontSize(pixels);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FreeTypeFontCache::SetFontSize(FontSize, FT_Face, int pixels)
|
void FreeTypeFontCache::SetFontSize(int pixels)
|
||||||
{
|
{
|
||||||
if (pixels == 0) {
|
if (pixels == 0) {
|
||||||
/* Try to determine a good height based on the minimal height recommended by the font. */
|
/* Try to determine a good height based on the minimal height recommended by the font. */
|
||||||
|
@ -245,7 +245,7 @@ FreeTypeFontCache::~FreeTypeFontCache()
|
||||||
void FreeTypeFontCache::ClearFontCache()
|
void FreeTypeFontCache::ClearFontCache()
|
||||||
{
|
{
|
||||||
/* Font scaling might have changed, determine font size anew if it was automatically selected. */
|
/* Font scaling might have changed, determine font size anew if it was automatically selected. */
|
||||||
if (this->face != nullptr) this->SetFontSize(this->fs, this->face, this->req_size);
|
if (this->face != nullptr) this->SetFontSize(this->req_size);
|
||||||
|
|
||||||
this->TrueTypeFontCache::ClearFontCache();
|
this->TrueTypeFontCache::ClearFontCache();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue