From 76a3ad0bd3ba99c108206044539f7deab41521bc Mon Sep 17 00:00:00 2001 From: rathnor Date: Sun, 24 Nov 2002 05:23:36 +0000 Subject: fix to make it remember font names that were requested to load (so that reloads try to use them). Fixes incorrect antialias fonts on startup. --- src/Font.cc | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/Font.cc b/src/Font.cc index f506bc1..a3d3b29 100644 --- a/src/Font.cc +++ b/src/Font.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -//$Id: Font.cc,v 1.20 2002/11/21 15:26:34 fluxgen Exp $ +//$Id: Font.cc,v 1.21 2002/11/24 05:23:36 rathnor Exp $ #include "Font.hh" @@ -139,14 +139,8 @@ void Font::setAntialias(bool flag) { bool Font::load(const char *name) { if (name == 0) return false; - bool ret_val = m_fontimp->load(name); - if (ret_val && name != 0) { //prevent from having a bad fontimp - m_fontstr = name; // if the load really succeded then set font string - } else { - m_fontstr = ""; - } - - return ret_val; + m_fontstr = name; + return m_fontimp->load(name); } unsigned int Font::textWidth(const char * const text, unsigned int size) const { -- cgit v0.11.2