try XLFD if load failes
fluxgen fluxgen
1 files changed,
6 insertions(+),
4 deletions(-)
jump to
M
src/XftFontImp.cc
→
src/XftFontImp.cc
@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -//$Id: XftFontImp.cc,v 1.2 2002/10/16 23:13:15 fluxgen Exp $ +//$Id: XftFontImp.cc,v 1.3 2002/10/16 23:56:13 fluxgen Exp $ #include "XftFontImp.hh" #include "BaseDisplay.hh"@@ -41,9 +41,11 @@
Display *disp = BaseDisplay::getXDisplay(); XftFont *newxftfont = XftFontOpenName(disp, 0, name.c_str()); - if (newxftfont == 0) // failed to open font, use old fon - return false; - + if (newxftfont == 0) { // failed to open font, lets test with XLFD + newxftfont = XftFontOpenXlfd(disp, 0, name.c_str()); + if (newxftfont == 0) + return false; + } // destroy old font and set new if (m_xftfont != 0) XftFontClose(disp, m_xftfont);