utf8 for Xft
This commit is contained in:
parent
460d385091
commit
5506c3b33b
1 changed files with 5 additions and 5 deletions
10
src/Font.cc
10
src/Font.cc
|
@ -19,7 +19,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
//$Id: Font.cc,v 1.14 2002/10/15 16:34:14 fluxgen Exp $
|
//$Id: Font.cc,v 1.15 2002/10/16 23:22:45 fluxgen Exp $
|
||||||
|
|
||||||
|
|
||||||
#include "Font.hh"
|
#include "Font.hh"
|
||||||
|
@ -86,7 +86,7 @@ m_antialias(false) {
|
||||||
// antialias is prio 1
|
// antialias is prio 1
|
||||||
#ifdef USE_XFT
|
#ifdef USE_XFT
|
||||||
if (antialias) {
|
if (antialias) {
|
||||||
m_fontimp = std::auto_ptr<FontImp>(new XftFontImp());
|
m_fontimp = std::auto_ptr<FontImp>(new XftFontImp(0, m_utf8mode));
|
||||||
m_antialias = true;
|
m_antialias = true;
|
||||||
}
|
}
|
||||||
#endif //USE_XFT
|
#endif //USE_XFT
|
||||||
|
@ -95,7 +95,7 @@ m_antialias(false) {
|
||||||
if (m_multibyte || m_utf8mode)
|
if (m_multibyte || m_utf8mode)
|
||||||
m_fontimp = std::auto_ptr<FontImp>(new XmbFontImp(0, m_utf8mode));
|
m_fontimp = std::auto_ptr<FontImp>(new XmbFontImp(0, m_utf8mode));
|
||||||
else // basic font implementation
|
else // basic font implementation
|
||||||
m_fontimp = std::auto_ptr<FontImp>(new XFontImp(0));
|
m_fontimp = std::auto_ptr<FontImp>(new XFontImp());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name != 0) {
|
if (name != 0) {
|
||||||
|
@ -112,7 +112,7 @@ void Font::setAntialias(bool flag) {
|
||||||
bool loaded = m_fontimp->loaded();
|
bool loaded = m_fontimp->loaded();
|
||||||
#ifdef USE_XFT
|
#ifdef USE_XFT
|
||||||
if (flag && !isAntialias()) {
|
if (flag && !isAntialias()) {
|
||||||
m_fontimp = std::auto_ptr<FontImp>(new XftFontImp(m_fontstr.c_str()));
|
m_fontimp = std::auto_ptr<FontImp>(new XftFontImp(m_fontstr.c_str(), m_utf8mode));
|
||||||
} else if (!flag && isAntialias())
|
} else if (!flag && isAntialias())
|
||||||
#endif // USE_XFT
|
#endif // USE_XFT
|
||||||
{
|
{
|
||||||
|
@ -144,7 +144,7 @@ bool Font::load(const char *name) {
|
||||||
return ret_val;
|
return ret_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int Font::textWidth(const char *text, unsigned int size) const {
|
unsigned int Font::textWidth(const char * const text, unsigned int size) const {
|
||||||
return m_fontimp->textWidth(text, size);
|
return m_fontimp->textWidth(text, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue