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

A QFont's hinting preference is not preserved when calling QTextCharFormat::setFont

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.1.0
    • 4.8.0
    • GUI: Text handling
    • None
    • Windows 7
    • 731f2a179b2056509582ac66641cdd3c846ac9dc

    Description

      In my application, I noticed that DirectWrite was not always being used in my QTextDocument despite the fact that I was setting the hinting preference of my QFont to QFont::PreferNoHinting. After some investigation it turned out that the hinting preference is not preserved if you set the font in a document by calling QTextCharFormat::setFont and then applying this format to the document.

      The missing code seems to be in QTextCharFormat::setFont, which needs to call setFontHintingPreference with the value from the font passed in.

      Attachments

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

        Activity

          People

            ritt.ks Konstantin Ritt
            jlarcombe James Larcombe
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes