Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt Embedded, mixing unicode characters makes code lagging.

Qt Embedded, mixing unicode characters makes code lagging.

Scheduled Pinned Locked Moved Mobile and Embedded
qt 4.8qtssunicodefont
2 Posts 2 Posters 1.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MatsLindestam
    wrote on 31 Mar 2015, 09:05 last edited by MatsLindestam
    #1

    I am using Qt Embedded 4.8 and in my application I have a QListWidget containing a number of QListWidgetItems displaying some mixed unicode characters.

    If I only use mixed Latin and CJK unicode characters, in my QListWidgetItems, the text is displayed as expected and scrolling between QListWidgetItems works without lagging.

    My QFontDatabase reports the following fonts installed:

    Bitstream Charter
    Code2000
    Courier
    Courier 10 Pitch
    Cursor
    fixed
    helvetica
    Luxi Mono
    Luxi Sans
    Luxi Serif
    micro
    Roboto
    RockoFLF
    Times New Roman
    unifont
    Utopia
    WenQuanYi Zen Hei
    WenQuanYi Zen Hei Mono
    WenQuanYi Zen Hei Sharp
    

    N.B. I will remove all fonts beside Roboto, RockoFLF and Code2000, since they are the only ones I am aiming to use.

    Now I am trying to get support for Thai and Tamil characters. If I just add Thai and Tamil characters to my texts they will not display.

    Thai and Tamil characters are not displayed

    Adding Thai and Tamil characters to the texts will make the application load slowly and and scrolling between QListWidgetItems is lagging and is sluggish.

    The only way I have found for the Tahi and Tamil characters to be displayed is to add a font in my qtss-file (gui.qtss). I have added that QListWidget and QListWidgetItems should use "Code2000" as font.

    QListWidget      { font: 13px "Code2000"; }
    QListWidget:item { font: 13px "Code2000"; }
    

    I have also tried to use a <code>font-family</code>, since I would like for Latin characters to use "Roboto" as font.

    QListWidget      { font: 13px; font-family: "Roboto", "Code2000"; }
    QListWidget:item { font: 13px; font-family: "Roboto", "Code2000"; }
    

    Thai and Tamil characters are displayed

    Either way the application still loads slowly and and scrolling between QListWidgetItems is still lagging and is sluggish.

    What I need help with is to find a way for Qt to use fonts, and displaying Thai and Tamil characters, without having to add fonts in the qtss-file. I also is wondering why the code gets sluggish when mixing in Thai and Tamil characters. Mixing Latin and CJK characters works just fine

    I have been studing the following two wonderful posts:

    Qt Use Multiple Fonts at the Same Time

    How to (properly) output multilingual text in Qt-Embedded?

    But none of the methods, in those posts, have been working for me. I have yet to try fontconfig. I am not sure what fontconfig will do for me.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 1 Apr 2015, 21:27 last edited by
      #2

      Hi and welcome to devnet,

      What version of Qt 4.8 are you currently using ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      2/2

      1 Apr 2015, 21:27

      • Login

      • Login or register to search.
      2 out of 2
      • First post
        2/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved