Results 1 to 10 of 10

Thread: font incorrectly show - font break.

  1. #1
    Join Date
    May 2008
    Posts
    12
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default font incorrectly show - font break.

    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.

    Qt Code:
    1. Window *configwindow = new Window();
    2. QTranslator translator( 0 );
    3. translator.load( QString("MyApp_" + configwindow->getConfig()->getString("multilang","language") + ".qm"),
    4. // QTextCodec::locale(),
    5. MATERIAL_DIR + "/translations");
    6.  
    7. delete configwindow;
    8. a.installTranslator( &translator );
    To copy to clipboard, switch view to plain text mode 
    can anybody help me in advance.
    your help will be appreciated!!!
    regards
    Last edited by jpn; 25th May 2008 at 10:23. Reason: missing [code] tags

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: font incorrectly show - font break.

    Could you provide more details on what is wrong? Maybe a screenshot?

  3. #3
    Join Date
    May 2008
    Posts
    12
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: font incorrectly show - font break.

    hi, wysota
    here is screenshot for my app.
    Attached Images Attached Images
    Last edited by sgh; 26th May 2008 at 10:15.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: font incorrectly show - font break.

    Could it be that the font doesn't support arabic glyphs?

  5. #5
    Join Date
    May 2008
    Posts
    12
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: font incorrectly show - font break.

    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.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: font incorrectly show - font break.

    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?

  7. #7
    Join Date
    May 2008
    Posts
    12
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: font incorrectly show - font break.

    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?

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: font incorrectly show - font break.

    I was asking about using the translations...

  9. #9
    Join Date
    May 2008
    Posts
    12
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: font incorrectly show - font break.

    here is code for setting title.
    setCaption( tr("MultiLanauge Sample"));

  10. #10
    Join Date
    May 2008
    Posts
    12
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: font incorrectly show - font break.

    new mind!!!. i got this cause.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.