aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-10-16 23:22:45 (GMT)
committerfluxgen <fluxgen>2002-10-16 23:22:45 (GMT)
commit5506c3b33b7d7f556fb14d339fc8ef5adedea28b (patch)
tree25807fd57a870036cefe49e129ab0513b1f21dc2
parent460d3850919831c107b28c09881f857647444745 (diff)
downloadfluxbox-5506c3b33b7d7f556fb14d339fc8ef5adedea28b.zip
fluxbox-5506c3b33b7d7f556fb14d339fc8ef5adedea28b.tar.bz2
utf8 for Xft
-rw-r--r--src/Font.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Font.cc b/src/Font.cc
index 4d03345..7023c88 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.14 2002/10/15 16:34:14 fluxgen Exp $ 22//$Id: Font.cc,v 1.15 2002/10/16 23:22:45 fluxgen Exp $
23 23
24 24
25#include "Font.hh" 25#include "Font.hh"
@@ -86,7 +86,7 @@ m_antialias(false) {
86 // antialias is prio 1 86 // antialias is prio 1
87#ifdef USE_XFT 87#ifdef USE_XFT
88 if (antialias) { 88 if (antialias) {
89 m_fontimp = std::auto_ptr<FontImp>(new XftFontImp()); 89 m_fontimp = std::auto_ptr<FontImp>(new XftFontImp(0, m_utf8mode));
90 m_antialias = true; 90 m_antialias = true;
91 } 91 }
92#endif //USE_XFT 92#endif //USE_XFT
@@ -95,7 +95,7 @@ m_antialias(false) {
95 if (m_multibyte || m_utf8mode) 95 if (m_multibyte || m_utf8mode)
96 m_fontimp = std::auto_ptr<FontImp>(new XmbFontImp(0, m_utf8mode)); 96 m_fontimp = std::auto_ptr<FontImp>(new XmbFontImp(0, m_utf8mode));
97 else // basic font implementation 97 else // basic font implementation
98 m_fontimp = std::auto_ptr<FontImp>(new XFontImp(0)); 98 m_fontimp = std::auto_ptr<FontImp>(new XFontImp());
99 } 99 }
100 100
101 if (name != 0) { 101 if (name != 0) {
@@ -112,7 +112,7 @@ void Font::setAntialias(bool flag) {
112 bool loaded = m_fontimp->loaded(); 112 bool loaded = m_fontimp->loaded();
113#ifdef USE_XFT 113#ifdef USE_XFT
114 if (flag && !isAntialias()) { 114 if (flag && !isAntialias()) {
115 m_fontimp = std::auto_ptr<FontImp>(new XftFontImp(m_fontstr.c_str())); 115 m_fontimp = std::auto_ptr<FontImp>(new XftFontImp(m_fontstr.c_str(), m_utf8mode));
116 } else if (!flag && isAntialias()) 116 } else if (!flag && isAntialias())
117#endif // USE_XFT 117#endif // USE_XFT
118 { 118 {
@@ -144,7 +144,7 @@ bool Font::load(const char *name) {
144 return ret_val; 144 return ret_val;
145} 145}
146 146
147unsigned int Font::textWidth(const char *text, unsigned int size) const { 147unsigned int Font::textWidth(const char * const text, unsigned int size) const {
148 return m_fontimp->textWidth(text, size); 148 return m_fontimp->textWidth(text, size);
149} 149}
150 150