aboutsummaryrefslogtreecommitdiff
path: root/src/XftFontImp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/XftFontImp.cc')
-rw-r--r--src/XftFontImp.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/XftFontImp.cc b/src/XftFontImp.cc
index 619b791..f3da167 100644
--- a/src/XftFontImp.cc
+++ b/src/XftFontImp.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: XftFontImp.cc,v 1.2 2002/10/16 23:13:15 fluxgen Exp $ 22//$Id: XftFontImp.cc,v 1.3 2002/10/16 23:56:13 fluxgen Exp $
23 23
24#include "XftFontImp.hh" 24#include "XftFontImp.hh"
25#include "BaseDisplay.hh" 25#include "BaseDisplay.hh"
@@ -41,9 +41,11 @@ bool XftFontImp::load(const std::string &name) {
41 Display *disp = BaseDisplay::getXDisplay(); 41 Display *disp = BaseDisplay::getXDisplay();
42 XftFont *newxftfont = XftFontOpenName(disp, 0, name.c_str()); 42 XftFont *newxftfont = XftFontOpenName(disp, 0, name.c_str());
43 43
44 if (newxftfont == 0) // failed to open font, use old fon 44 if (newxftfont == 0) { // failed to open font, lets test with XLFD
45 return false; 45 newxftfont = XftFontOpenXlfd(disp, 0, name.c_str());
46 46 if (newxftfont == 0)
47 return false;
48 }
47 // destroy old font and set new 49 // destroy old font and set new
48 if (m_xftfont != 0) 50 if (m_xftfont != 0)
49 XftFontClose(disp, m_xftfont); 51 XftFontClose(disp, m_xftfont);