Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-18748

QScriptLine::height adding one to height isn't standard height calculation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.0.0
    • 4.7.2
    • GUI: Font handling
    • None
    • Linux X11
    • cb8445f0323b0eefbb04f1d8adad81a00b53abd8

    Description

      QScriptLine::height calculates height for a given font. Math is incorrectly assuming font height is one higher than it actually is because it is adding one for baseline. This causes headache for applications that try to put text inside widget that should be as small as possible without needing to clip the font.

      Too bad removing that extra one requires fixing or hacks that have been added to font handling because of that plus one so fix isn't the simplest possible.

      Problem was found when analyzing why MLabelViewSimple::drawContents was hitting clip path when it shouldn't. Problem found was that height of static text was one more that it should have been. The height comes directly from QScriptLine::height function.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            suokko Pauli Nieminen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes