1
1
forked from 0ad/0ad

Fix ugly font rendering using GL linear interpolation if the UI scale was changed.

Patch By: Dariost
Refs D332

This was SVN commit r20735.
This commit is contained in:
elexis 2017-12-30 17:56:07 +00:00
parent a62690c65a
commit d18374bffe

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2013 Wildfire Games.
/* Copyright (C) 2017 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -125,7 +125,7 @@ bool CFontManager::ReadFont(CFont* font, CStrIntern fontName)
// Load glyph texture
const VfsPath imgName(fontName.string() + ".png");
CTextureProperties textureProps(path / imgName);
textureProps.SetFilter(GL_NEAREST);
textureProps.SetFilter(GL_LINEAR);
if (!font->m_HasRGB)
textureProps.SetFormatOverride(GL_ALPHA);
font->m_Texture = g_Renderer.GetTextureManager().CreateTexture(textureProps);