diff options
Diffstat (limited to 'src/Font.cc')
-rw-r--r-- | src/Font.cc | 12 |
1 files 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 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | //$Id: Font.cc,v 1.20 2002/11/21 15:26:34 fluxgen Exp $ | 22 | //$Id: Font.cc,v 1.21 2002/11/24 05:23:36 rathnor Exp $ |
23 | 23 | ||
24 | 24 | ||
25 | #include "Font.hh" | 25 | #include "Font.hh" |
@@ -139,14 +139,8 @@ void Font::setAntialias(bool flag) { | |||
139 | bool Font::load(const char *name) { | 139 | bool Font::load(const char *name) { |
140 | if (name == 0) | 140 | if (name == 0) |
141 | return false; | 141 | return false; |
142 | bool ret_val = m_fontimp->load(name); | 142 | m_fontstr = name; |
143 | if (ret_val && name != 0) { //prevent from having a bad fontimp | 143 | return m_fontimp->load(name); |
144 | m_fontstr = name; // if the load really succeded then set font string | ||
145 | } else { | ||
146 | m_fontstr = ""; | ||
147 | } | ||
148 | |||
149 | return ret_val; | ||
150 | } | 144 | } |
151 | 145 | ||
152 | unsigned int Font::textWidth(const char * const text, unsigned int size) const { | 146 | unsigned int Font::textWidth(const char * const text, unsigned int size) const { |