Planned maintenance has been done but it did not solve the problem. So work will continue on this and a new time for trying updates will be announced asap.

Strange behavior of underline when scaling text (Windows)



  • Hello.
    I found a strange behavior of underline distance with respect to text base.
    In particular, when drawing with a QPainter a text with setUnderline(true), the distance of the underline with respect to the text base line changes a lot depending on the operating system even when using exactly the same font, and under Windows it also does not scale with the text pixel size, so that for large size it "sticks" to the text base line.
    This happens also when printing, for example during svg export.
    Here is a minimal example (apparently I did not have the permission to directly attach the zip file):
    https://drive.google.com/open?id=1v9ngxKiO5DSNNWnb6ijwu5iykCZ_Iekm
    and attached the images of the output svg files, when running the program with:

    • Windows 10, Qt 5.9.6, MinGW 32bit
      0_1542998995592_windows.png
    • Linux Mint 18, Qt 5.9.6, gcc 64bit
      0_1542999005817_linux.png
    • MacOS 13, Qt 5.9.6, clang 64bit
      0_1542999014961_macos.png
      Is it a (possibly known) bug of Qt, or I am doing something wrong?
      Is there a work-around?

    This is something I found while investigating the cuase of a bug found in MuseScore:
    https://musescore.org/en/node/276566

    Thank you for your help.
    Ciao,
    AntonioBL


Log in to reply