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. Text Glyphs overlap, vcpkg build
QtWS25 Last Chance

Text Glyphs overlap, vcpkg build

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 420 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.
  • G Offline
    G Offline
    gforge
    wrote on last edited by
    #1

    Hi guys,

    I am using Qt through vcpkg manifests mode in Microsoft Visual Studio 2019 (CMake Project with vcpkg toolchain file, triplet x64-windows). Here is my vcpkg.json and my main.cpp (minimum working example showing the problem):

    {
    "name": "test123",
    "version-string": "1.0.0",
    "dependencies": [
    {
    "name": "qtbase",
    "default-features": false,
    "features": [
    "doubleconversion",
    "gui",
    "widgets"
    ]
    }
    ]
    }

    #include <QApplication>
    #include <QMainWindow>
    #include <QPushButton>

    int main(int argc, char* argv[])
    {
    QApplication app(argc, argv);
    QMainWindow MainWindow;
    MainWindow.setCentralWidget(new QPushButton("Hello World!"));
    MainWindow.show();
    return app.exec();
    }

    The text glyphs are just rendered on top of each other:
    Hello World!.png

    If I put a single character on the push button it is shown correctly:
    H.png

    As I am not building windeployqt.exe, I manually copy the folders in the <build-folder>/vcpkg_installed/x64-windows/Qt6/plugins folder to the text123.exe folder.
    I have run out of ideas on how to solve this or find its cause. Any help would be greatly appreciated.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      The behaviour for Qt 5.15.0 and 6.1.1. is as-expected on my Linux box.

      You are building with with version of Qt, 6.x?
      Are you certain you have the matching version's plugins.
      What part of the display is a clickable button in your example? That is, does the QPushButton fill the main window client area, or just where the letters are?

      1 Reply Last reply
      0
      • G Offline
        G Offline
        gforge
        wrote on last edited by
        #3

        Hi, thanks for your reply.

        The current qtbase version in vcpkg is 6.1.2.
        Regarding the plugins version: I am not 100% certain, as everything is built through vcpkg.
        The QPushbutton does completely fill the main window client area.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          gforge
          wrote on last edited by
          #4

          Inside "(...)/vcpkg/buildtrees/qtbase/x64-windows-dbg" I found a "config.summary" file. Maybe its output helps to identify the problem or any missing libraries:

          Building for: win32-msvc (x86_64, CPU features: sse sse2)
          Compiler: msvc 19.29.30133.0
          Build options:
          Mode ................................... debug
          Fully optimize release builds (-O3) .... no
          Building shared libraries .............. yes
          Using C standard ....................... C11
          Using C++ standard ..................... C++17
          Relocatable ............................ yes
          Using precompiled headers .............. yes
          Using LTCG ............................. no
          Target compiler supports:
          SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
          AVX .................................. AVX AVX2
          AVX512 ............................... F ER CD PF DQ BW VL IFMA VBMI
          Other x86 ............................ AES F16C RDRAND SHA
          Sanitizers:
          Addresses ............................ no
          Threads .............................. no
          Memory ............................... no
          Fuzzer (instrumentation only) ........ no
          Undefined ............................ no
          Build parts ............................ libs tools
          App store compliance ................... no
          Qt modules and options:
          Qt Concurrent .......................... no
          Qt D-Bus ............................... no
          Qt D-Bus directly linked to libdbus .... no
          Qt Gui ................................. yes
          Qt Network ............................. no
          Qt Sql ................................. no
          Qt Testlib ............................. no
          Qt Widgets ............................. yes
          Qt Xml ................................. yes
          Support enabled for:
          Using pkg-config ....................... no
          udev ................................... no
          Using system zlib ...................... yes
          Zstandard support ...................... no
          Qt Core:
          DoubleConversion ....................... yes
          Using system DoubleConversion ........ yes
          GLib ................................... no
          ICU .................................... no
          Using system libb2 ..................... no
          Built-in copy of the MIME database ..... yes
          Tracing backend ........................ <none>
          Logging backends:
          journald ............................. no
          syslog ............................... no
          slog2 ................................ no
          PCRE2 .................................. no
          Using system PCRE2 ................... yes
          Qt Gui:
          Accessibility .......................... yes
          FreeType ............................... yes
          Using system FreeType ................ yes
          HarfBuzz ............................... no
          Using system HarfBuzz ................ no
          Fontconfig ............................. no
          Image formats:
          GIF .................................. yes
          ICO .................................. yes
          JPEG ................................. no
          Using system libjpeg ............... no
          PNG .................................. no
          Using system libpng ................ no
          Text formats:
          HtmlParser ........................... yes
          CssParser ............................ yes
          OdfWriter ............................ yes
          MarkdownReader ....................... yes
          Using system libmd4c ............... no
          MarkdownWriter ....................... yes
          EGL .................................... no
          OpenVG ................................. no
          OpenGL:
          Desktop OpenGL ....................... no
          Dynamic OpenGL ....................... yes
          OpenGL ES 2.0 ........................ no
          OpenGL ES 3.0 ........................ no
          OpenGL ES 3.1 ........................ no
          OpenGL ES 3.2 ........................ no
          Vulkan ................................. no
          Session Management ..................... yes
          Features used by QPA backends:
          evdev .................................. no
          libinput ............................... no
          INTEGRITY HID .......................... no
          mtdev .................................. no
          tslib .................................. no
          xkbcommon .............................. no
          X11 specific:
          XLib ................................. no
          XCB Xlib ............................. no
          EGL on X11 ........................... no
          xkbcommon-x11 ........................ no
          QPA backends:
          DirectFB ............................... no
          EGLFS .................................. no
          EGLFS details:
          EGLFS OpenWFD ........................ no
          EGLFS i.Mx6 .......................... no
          EGLFS i.Mx6 Wayland .................. no
          EGLFS RCAR ........................... no
          EGLFS EGLDevice ...................... no
          EGLFS GBM ............................ no
          EGLFS VSP2 ........................... no
          EGLFS Mali ........................... no
          EGLFS Raspberry Pi ................... no
          EGLFS X11 ............................ no
          LinuxFB ................................ no
          VNC .................................... no
          QNX:
          lgmon ................................ no
          IMF .................................. no
          XCB:
          Using system-provided xcb-xinput ..... no
          GL integrations:
          GLX Plugin ......................... no
          XCB GLX .......................... no
          EGL-X11 Plugin ..................... no
          Windows:
          Direct 2D ............................ yes
          Direct 2D 1.1 ........................ yes
          DirectWrite .......................... yes
          DirectWrite 3 ........................ yes
          Qt Widgets:
          GTK+ ................................... no
          Styles ................................. Fusion Windows WindowsVista
          Qt PrintSupport:
          CUPS ................................... no

          Is there anything that would cause the text glyphs to not be separated?

          1 Reply Last reply
          0
          • G Offline
            G Offline
            gforge
            wrote on last edited by
            #5

            If anyone finds this same problem, what solved it for me was to add "harfbuzz" to the list of dependencies, now everything is working just fine!

            1 Reply Last reply
            1

            • Login

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