diff options
author | fluxgen <fluxgen> | 2002-10-25 21:07:07 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-10-25 21:07:07 (GMT) |
commit | db886fc7c8a41491b46a995e83d32d4783dae882 (patch) | |
tree | 783daebbcad8fadd5d42b1954512f2dd4bbb10b3 /src | |
parent | a0abbf60563de1a0f5bf34138219f26c04e44ce7 (diff) | |
download | fluxbox_paul-db886fc7c8a41491b46a995e83d32d4783dae882.zip fluxbox_paul-db886fc7c8a41491b46a995e83d32d4783dae882.tar.bz2 |
compile time option for multibyte support
Diffstat (limited to 'src')
-rw-r--r-- | src/Font.cc | 17 |
1 files 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 @@ | |||
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.18 2002/10/24 11:30:45 fluxgen Exp $ | 22 | //$Id: Font.cc,v 1.19 2002/10/25 21:07:07 fluxgen Exp $ |
23 | 23 | ||
24 | 24 | ||
25 | #include "Font.hh" | 25 | #include "Font.hh" |
@@ -34,9 +34,13 @@ | |||
34 | #include "XftFontImp.hh" | 34 | #include "XftFontImp.hh" |
35 | #endif // USE_XFT | 35 | #endif // USE_XFT |
36 | 36 | ||
37 | // for multibyte support | ||
38 | #ifdef USE_XMB | ||
39 | #include "XmbFontImp.hh" | ||
40 | #endif //USE_XMB | ||
41 | |||
37 | // standard font system | 42 | // standard font system |
38 | #include "XFontImp.hh" | 43 | #include "XFontImp.hh" |
39 | #include "XmbFontImp.hh" | ||
40 | 44 | ||
41 | #include "StringUtil.hh" | 45 | #include "StringUtil.hh" |
42 | 46 | ||
@@ -58,8 +62,6 @@ using namespace std; | |||
58 | #include <locale.h> | 62 | #include <locale.h> |
59 | #endif //HAVE_SETLOCALE | 63 | #endif //HAVE_SETLOCALE |
60 | 64 | ||
61 | |||
62 | |||
63 | namespace FbTk { | 65 | namespace FbTk { |
64 | 66 | ||
65 | bool Font::m_multibyte = false; | 67 | bool Font::m_multibyte = false; |
@@ -92,9 +94,11 @@ m_antialias(false) { | |||
92 | #endif //USE_XFT | 94 | #endif //USE_XFT |
93 | // if we didn't create a Xft font then create basic font | 95 | // if we didn't create a Xft font then create basic font |
94 | if (m_fontimp.get() == 0) { | 96 | if (m_fontimp.get() == 0) { |
97 | #ifdef USE_XMB | ||
95 | if (m_multibyte || m_utf8mode) | 98 | if (m_multibyte || m_utf8mode) |
96 | m_fontimp.reset(new XmbFontImp(0, m_utf8mode)); | 99 | m_fontimp.reset(new XmbFontImp(0, m_utf8mode)); |
97 | else // basic font implementation | 100 | else // basic font implementation |
101 | #endif // USE_XMB | ||
98 | m_fontimp.reset(new XFontImp()); | 102 | m_fontimp.reset(new XFontImp()); |
99 | } | 103 | } |
100 | 104 | ||
@@ -116,11 +120,12 @@ void Font::setAntialias(bool flag) { | |||
116 | } else if (!flag && isAntialias()) | 120 | } else if (!flag && isAntialias()) |
117 | #endif // USE_XFT | 121 | #endif // USE_XFT |
118 | { | 122 | { |
123 | #ifdef USE_XMB | ||
119 | if (m_multibyte || m_utf8mode) | 124 | if (m_multibyte || m_utf8mode) |
120 | m_fontimp.reset(new XmbFontImp(m_fontstr.c_str(), m_utf8mode)); | 125 | m_fontimp.reset(new XmbFontImp(m_fontstr.c_str(), m_utf8mode)); |
121 | else { | 126 | else |
127 | #endif // USE_XMB | ||
122 | m_fontimp.reset(new XFontImp(m_fontstr.c_str())); | 128 | m_fontimp.reset(new XFontImp(m_fontstr.c_str())); |
123 | } | ||
124 | } | 129 | } |
125 | 130 | ||
126 | if (m_fontimp->loaded() != loaded) { // if the new font failed to load, fall back to 'fixed' | 131 | if (m_fontimp->loaded() != loaded) { // if the new font failed to load, fall back to 'fixed' |