Spanish accent characters are not rendered properly [message #635464] |
Tue, 26 October 2010 22:41 |
No real name Messages: 1 Registered: October 2010 |
Junior Member |
|
|
Our GUI application is using swt version 3.346 and running on windows XP. We need to localize our app for different locales like Spanish, french and italian. The real problem is when we use accent characters they are not rendered properly. I see all of them as big zero. I have no clue if this is bug in swt or if i have some lack of understanding of the text rendering.
Heres a snippet of code that does the text rendering on a button.
if (!Tools.isLinux() && l.p.sombra) {
if (l.p.sombraFg!=null) gcS.setForeground(l.p.sombraFg);
if (l.p.sombraAntialias!=0) {
try {
if (Tools.isComplexGraphicsEnable())
gcS.setAntialias(l.p.sombraAntialias);
} catch (RuntimeException e) {
Tools.setComplexGraphicsEnable(false);
/** se pueden producir excepciones en algunos windows y en linux*/
}
}
if (l.p.sombraAlpha!=0) {
try {
if (Tools.isComplexGraphicsEnable())
gcS.setAlpha(l.p.sombraAlpha);
} catch (RuntimeException e) {
Tools.setComplexGraphicsEnable(false);
/** se pueden producir excepciones en algunos windows y en linux*/
}
}
gcS.drawText(l.p.text,px+l.p.sombraDx,py+l.p.sombraDy,l.p.tr ansparente);
}
if (l.p.fg!=null) gcS.setForeground(l.p.fg);
if (l.p.bg!=null) {
gcS.setForeground(l.p.bg);
gcS.drawRoundRectangle(myArea.x,myArea.y,myArea.width-1,myAr ea.height-1,10,10);
}
if (l.p.antialias!=0) {
try {
if (Tools.isComplexGraphicsEnable())
gcS.setAntialias(l.p.antialias);
} catch (RuntimeException e) {
Tools.setComplexGraphicsEnable(false);
/** se pueden producir excepciones en algunos windows y en linux*/
}
}
if (l.p.alpha!=0) {
try {
if (Tools.isComplexGraphicsEnable())
gcS.setAlpha(l.p.alpha);
} catch (RuntimeException e) {
Tools.setComplexGraphicsEnable(false);
/** se pueden producir excepciones en algunos windows y en linux*/
}
}
gcS.drawText(l.p.text,px,py,l.p.transparente);
Could this be a bug?
Any ideas or pointers are appreciated.
Thanks
kishore
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03056 seconds