Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Ugly fonts in qt-x11-free-3.3.8b(needed for an old application)
Forum Updated to NodeBB v4.3 + New Features

Ugly fonts in qt-x11-free-3.3.8b(needed for an old application)

Scheduled Pinned Locked Moved Solved Installation and Deployment
7 Posts 2 Posters 2.2k 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.
  • M Offline
    M Offline
    metaldoctor
    wrote on last edited by
    #1

    Hi, one of the deprecated applications I'm using is built on top of ancient qt-x11-free-3.3.8b and kdelibs. I build it on top of my Kubuntu 16.04(x86_64). Everything works as expected, except the fonts, are distorted. To see this problem on early stage I can just build qt3 and start the "designer". I've tried using patches from Fedora Project, but the fonts remain distorted as well. Can I do any force font assignment and maybe bundle it with the application prefix. By the way, it was successfully built on Gentoo about 4 years ago, so now I'm using an old prefix(/opt/qt3), copied from my former Gentoo rootfs.

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

      Hi and welcome to devnet,

      If you know a font that is working correctly, you can bundle it with your application and load it in QFontDatabase to use it with your application.

      Hope it helps

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

      M 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi and welcome to devnet,

        If you know a font that is working correctly, you can bundle it with your application and load it in QFontDatabase to use it with your application.

        Hope it helps

        M Offline
        M Offline
        metaldoctor
        wrote on last edited by
        #3

        @SGaist Hi, the docs say that "This function was introduced in Qt 4.2.", but I have 3.3.8.
        I've done ldd with the old Gentoo working build and the new build(with crippled fonts). Here is the difference.
        libGL.so.1
        libXmu.so.6
        libXrender.so.1
        libXrandr.so.2
        libXcursor.so.1
        libXinerama.so.1
        libXft.so.2
        libfreetype.so.6
        libfontconfig.so.1
        libexpat.so.1
        libxcb-dri3.so.0
        libxcb-present.so.0
        libxcb-sync.so.1
        libxshmfence.so.1
        libglapi.so.0
        libXdamage.so.1
        libXfixes.so.3
        libX11-xcb.so.1
        libxcb-glx.so.0
        libxcb-dri2.so.0
        libXxf86vm.so.1
        libdrm.so.2
        libXt.so.6
        libz.so.1
        libpng12.so.0
        libSM.so.6
        libICE.so.6
        libuuid.so.1
        Those libs haven't been linked to my new libqt-mt.so.3.3.8.
        Maybe that can be a reason?

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

          If you have it working properly on your old Gentoo, you should rather bundle all the dependencies from your Gentoo machine and use them with your application.

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

          M 1 Reply Last reply
          1
          • SGaistS SGaist

            If you have it working properly on your old Gentoo, you should rather bundle all the dependencies from your Gentoo machine and use them with your application.

            M Offline
            M Offline
            metaldoctor
            wrote on last edited by
            #5

            Of course, but I'm trying to get a reproduceble build for Ubuntu. Loooks like I miss some font-specific and rendering deps. Here: http://www.linuxquestions.org/questions/slackware-14/font-antialiasing-of-qt3-apps-in-slack64-734774/ was the same problem, which the Slackusers resolved by rebuild, so, Slackware seems(or seemed) to have the right headers. I'm gonna try bundling all the deps to my prefix(/opt/qt3) one by one. Maybe somehow I figure out what's missing. I really don't want to do a reproduceble build in a Gentoo chroot :)

            1 Reply Last reply
            0
            • M Offline
              M Offline
              metaldoctor
              wrote on last edited by
              #6

              I've resolved that problem at last. See the ktechlab-build.sh here: https://github.com/megastallman/ktechlab-0.3.7-appimage
              There is really a problem with the Freetype2 headers include. So, anyone who needs to build qt-x11-free-3.3.8b needs to do the following:

              cd $SRC/qt-x11-free-3.3.8b
              echo yes | ./configure -prefix $PREFIX -thread -shared -fast -no-exceptions -platform linux-g++ -no-pch -stl -sm -xshape -xinerama -xcursor -xrandr -xrender -xft -tablet -xkb -system-zlib -system-libpng -system-libmng -system-libjpeg -enable-opengl -dlopen-opengl -qt-gif -qt-imgfmt-png -qt-imgfmt-jpeg -plugin-imgfmt-mng -I/usr/include/freetype2 -lfontconfig -L/usr/lib/x86_64-linux-gnu
              sed -i s/ptrdiff_t/std::ptrdiff_t/g include/qmap.h
              sed -i s/ptrdiff_t/std::ptrdiff_t/g include/qvaluelist.h
              sed -i s/ptrdiff_t/std::ptrdiff_t/g include/qvaluevector.h
              sed -i s/ptrdiff_t/std::ptrdiff_t/g src/tools/qvaluelist.h
              sed -i s/ptrdiff_t/std::ptrdiff_t/g src/tools/qmap.h
              make
              make install
              
              1 Reply Last reply
              1
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Glad you found out and thanks for sharing !

                Since you have it working now please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)

                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

                • Login

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