Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Using Colour Emojis as a substitution font in Windows
Forum Updated to NodeBB v4.3 + New Features

Using Colour Emojis as a substitution font in Windows

Scheduled Pinned Locked Moved Unsolved General and Desktop
windows 10color emojisfont match
12 Posts 4 Posters 6.2k Views 1 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi and welcome to devnet,

    Can you provide a minimal sample code that reproduce this behaviour ?

    What version of Qt are you using ?
    On what version of Windows ?

    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
    • B Offline
      B Offline
      boring32
      wrote on last edited by VRonin
      #3

      Hi SGaist,

      Thank your for your reply.
      Currently using Windows 10 + Qt 5.8 but I will check with 5.10 as well.
      Here is a code sample demonstrating the issue:

      QApplication app(argc, argv);
      QWidget *mainWindow = new QWidget();
      
      QLayout *layout = new QVBoxLayout();
      QLabel *widget1 = new QLabel();
      QLabel *widget2 = new QLabel();
      QLabel *widget3 = new QLabel();
      
      QFont::insertSubstitution(QApplication::font().family(), "Segoe UI Emoji");
      
      widget1->setText("B/W Emoji \xF0\x9F\x92\xA4");
      widget1->setFont(QFont("Sans Serif"));
      
      widget2->setText("Color Emoji \xF0\x9F\x92\xA4");
      widget2->setFont(QFont("Segoe UI Emoji"));
      
      widget3->setText("Should be Color Emoji \xF0\x9F\x92\xA4");
      
      layout->addWidget(widget1);
      layout->addWidget(widget2);
      layout->addWidget(widget3);
      mainWindow->setLayout(layout);
      
      mainWindow->show();
      return app.exec();
      
      1 Reply Last reply
      0
      • B Offline
        B Offline
        boring32
        wrote on last edited by
        #4

        Tried with Qt 5.10 and getting the same result.
        Here is a screen grab of the code above:

        0_1524471971239_fa891d72-58dc-4e10-b4fd-c6e737d4b58f-image.png

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

          How did you install that font in your system ?

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

          B 1 Reply Last reply
          0
          • SGaistS SGaist

            How did you install that font in your system ?

            B Offline
            B Offline
            boring32
            wrote on last edited by
            #6

            @SGaist
            It is part of windows 10, a native font installed with windows.
            Currently on Windows 10 build 1709.

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

              Strange, it sounded like QTBUG-57717 but it should work.

              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
              • B Offline
                B Offline
                boring32
                wrote on last edited by
                #8

                Do you think I should file a bug report for this?

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

                  If you can't find anything else on the bug report system then yes.

                  Can you check with the latest test version of 5.11 before doing that ?

                  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
                  1
                  • B Offline
                    B Offline
                    boring32
                    wrote on last edited by
                    #10

                    Just tried 5.11 beta and still there.
                    I will check the bugs again and then report.
                    Thank you for your help @SGaist

                    1 Reply Last reply
                    0
                    • B boring32

                      Tried with Qt 5.10 and getting the same result.
                      Here is a screen grab of the code above:

                      0_1524471971239_fa891d72-58dc-4e10-b4fd-c6e737d4b58f-image.png

                      D Offline
                      D Offline
                      dr_W
                      wrote on last edited by
                      #11

                      @boring32 In the above example, have you tried using emoji on win7? Why does the use of emoji color on win7 turn black and white?

                      1 Reply Last reply
                      0
                      • T Offline
                        T Offline
                        tofutim
                        wrote on last edited by tofutim
                        #12

                        I wanted to report that when I use 5.9.4 MinGW the color emoji shows up as BW but when I use 5.9.4 MSVC2017 the color emoji shows up as color. Is there anything I can do to get MinGW to work? Same in 5.11.

                        I'm using a blank project with a single color emoji in the screen.

                        0_1540313956160_2018-10-23_0958.png

                        If I compile with MSVC2017 then it shows up in color.

                        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 Extensions
                        • Unsolved