aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-10-16 23:56:13 (GMT)
committerfluxgen <fluxgen>2002-10-16 23:56:13 (GMT)
commit4d67b9d3d76b94a898a95a9e4e73d91489047b5e (patch)
treee236293982c741e3407f3644d11ec8d8e0e42c52 /src
parente8ae40e072b83020fdd1a6f7d46d3513f2efe84e (diff)
downloadfluxbox_paul-4d67b9d3d76b94a898a95a9e4e73d91489047b5e.zip
fluxbox_paul-4d67b9d3d76b94a898a95a9e4e73d91489047b5e.tar.bz2
try XLFD if load failes
Diffstat (limited to 'src')
-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);