Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. FontAwesome, Qt in Windows
Qt 6.12 LTS is out! See what's new in the release blog

FontAwesome, Qt in Windows

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 2.9k Views 2 Watching
  • 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.
  • T Offline
    T Offline
    Trikrista
    wrote on last edited by
    #1

    I use FontAwesome (https://fortawesome.github.io/Font-Awesome/)

    //---
    painter->setFont(QFont("FontAwesome", dt));
    QString str = QChar(0xf24e);
    painter->drawText(QPointF(x, y), str);
    //---
    

    In windows, with locale English, Instead of the desired character is displayed "?"
    In Windows, with locale Russian or Ukrainian, and in Linux all is well.

    How to fix it?

    I'm sorry for my bad English

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      How are you loading FontAwesome ?

      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
      • T Offline
        T Offline
        Trikrista
        wrote on last edited by
        #3

        I added font in qrc.

        I'm sorry for my bad English

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          Hi Trikrista,

          at least when using Qt on an embedded system, the system needs to know about the font (http://doc.qt.io/qt-5/qt-embedded-fonts.html). I guess this is also the case with Qt on Desktop devices. Can you maybe install the font on the system where you're running the qt program?

          Markus

          PS: On http://doc.qt.io/qt-4.8/qfontdatabase.html there's an example on how to show a list of the fonts being recognized by the system.

          1 Reply Last reply
          0

          • Login

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