From db886fc7c8a41491b46a995e83d32d4783dae882 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Fri, 25 Oct 2002 21:07:07 +0000 Subject: compile time option for multibyte support --- src/Font.cc | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/Font.cc b/src/Font.cc index 38329f5..37ccdea 100644 --- a/src/Font.cc +++ b/src/Font.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -//$Id: Font.cc,v 1.18 2002/10/24 11:30:45 fluxgen Exp $ +//$Id: Font.cc,v 1.19 2002/10/25 21:07:07 fluxgen Exp $ #include "Font.hh" @@ -34,9 +34,13 @@ #include "XftFontImp.hh" #endif // USE_XFT +// for multibyte support +#ifdef USE_XMB +#include "XmbFontImp.hh" +#endif //USE_XMB + // standard font system #include "XFontImp.hh" -#include "XmbFontImp.hh" #include "StringUtil.hh" @@ -58,8 +62,6 @@ using namespace std; #include #endif //HAVE_SETLOCALE - - namespace FbTk { bool Font::m_multibyte = false; @@ -92,9 +94,11 @@ m_antialias(false) { #endif //USE_XFT // if we didn't create a Xft font then create basic font if (m_fontimp.get() == 0) { +#ifdef USE_XMB if (m_multibyte || m_utf8mode) m_fontimp.reset(new XmbFontImp(0, m_utf8mode)); else // basic font implementation +#endif // USE_XMB m_fontimp.reset(new XFontImp()); } @@ -116,11 +120,12 @@ void Font::setAntialias(bool flag) { } else if (!flag && isAntialias()) #endif // USE_XFT { +#ifdef USE_XMB if (m_multibyte || m_utf8mode) m_fontimp.reset(new XmbFontImp(m_fontstr.c_str(), m_utf8mode)); - else { + else +#endif // USE_XMB m_fontimp.reset(new XFontImp(m_fontstr.c_str())); - } } if (m_fontimp->loaded() != loaded) { // if the new font failed to load, fall back to 'fixed' -- cgit v0.11.2