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

Text underline position is incorrect when using the DirectWrite font engine

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.0.0
    • 4.8.0
    • GUI: Font handling
    • None
    • Windows 7
    • e316519c0e0e1c77aa1039d58776631800f29149

    Description

      QFontEngineDirectWrite doesn't override QFontEngine::underlinePosition to return the font's correct underline position, meaning that underlining looks very bad when using the DirectWrite engine.

      To see this, build and run the attached test app. The underlining looks great with the GDI engine used by default. Now switch on the 'DirectWrite' checkbox. Observe that the underlining moves far too close to the text. The font is Times New Roman.

      The correct underline poisition is available from the DWRITE_FONT_METRICS structure and could be cached in QFontEngineDirectWrite::collectMetrics.

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            jlarcombe James Larcombe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes