PDA

View Full Version : font incorrectly show - font break.



sgh
24th May 2008, 05:20
hi,
i build one sample and it works fine. so i intend to make this sample for supporting multi-language.
i have some issue is broken font for some language like arabic, thai etc.
to be more precise, when app is shown on arabic language all control(widget) name is fine, but title name is wrong.
heres my code.



Window *configwindow = new Window();
QTranslator translator( 0 );
translator.load( QString("MyApp_" + configwindow->getConfig()->getString("multilang","language") + ".qm"),
// QTextCodec::locale(),
MATERIAL_DIR + "/translations");

delete configwindow;
a.installTranslator( &translator );

can anybody help me in advance.
your help will be appreciated!!!
regards

wysota
25th May 2008, 13:54
Could you provide more details on what is wrong? Maybe a screenshot?

sgh
26th May 2008, 10:09
hi, wysota
here is screenshot for my app.

wysota
26th May 2008, 13:20
Could it be that the font doesn't support arabic glyphs?

sgh
27th May 2008, 04:40
Could it be that the font doesn't support arabic glyphs?
if font doesnt support arbic glyphs, controls and widget names(caption name) will break.
but as you show, those is fine and title name is bad.

wysota
27th May 2008, 08:04
Maybe the title is using a different font? Do other applications have proper titles containing arabic glyphs? How exactly did you set the title, was it a result of translation?

sgh
27th May 2008, 08:58
Maybe the title is using a different font? Do other applications have proper titles containing arabic glyphs? How exactly did you set the title, was it a result of translation?
all names included title name is define in a file.
these content is define below
<!DOCTYPE TS>
<TS>
<context>
<name>About</name>
<message>
<source>Years Old!</source>
<translation>سنة!</translation>
</message>
<message>
<source>Credits</source>
<translation>الأعتمادات</translation>
</message>
<message>
<source>History</source>
<translation>التاريخ</translation>
</message>
<message>
<source>Close</source>
<translation>اغلاق</translation>
</message>
<message>
<source>Software Updates</source>
<translation>تحديثات البرامج</translation>
</message>
<message>
<source>Upcoming Features</source>
<translation>ميزات المقبلة</translation>
</message>
</context>
<context>
<name>AddDialog</name>
<message>
<source>Images</source>
<translation>صور</translation>
</message>
<message>
<source>Use filenames for descriptions.</source>
<translation>للحصول على وصف استخدام اسماء الملفات.</translation>
</message>
<message>
<source>Add Photos</source>
<translation>إضافة صور</translation>
</message>
</context>
....
is it ok?

wysota
27th May 2008, 12:42
I was asking about using the translations...

sgh
29th May 2008, 03:21
here is code for setting title.


setCaption( tr("MultiLanauge Sample"));

sgh
30th May 2008, 03:35
new mind!!!. i got this cause.