summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrathnor <rathnor>2002-11-24 05:23:36 (GMT)
committerrathnor <rathnor>2002-11-24 05:23:36 (GMT)
commit76a3ad0bd3ba99c108206044539f7deab41521bc (patch)
tree42f50458b37f5bcbcaf39092f10b51d70051af69 /src
parent3737a18dadaefa7ad07eff3e34edb757ee9a2170 (diff)
downloadfluxbox_lack-76a3ad0bd3ba99c108206044539f7deab41521bc.zip
fluxbox_lack-76a3ad0bd3ba99c108206044539f7deab41521bc.tar.bz2
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.
Diffstat (limited to 'src')
-rw-r--r--src/Font.cc12
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) {
139bool Font::load(const char *name) { 139bool 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
152unsigned int Font::textWidth(const char * const text, unsigned int size) const { 146unsigned int Font::textWidth(const char * const text, unsigned int size) const {