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

qSqrt of negative argument in QFontEngineFT::loadTransformedGlyphSet

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.0
    • 4.7.0
    • GUI: Font handling
    • None
    • 1acc9bcf4c43851af2096539eda88da9ef58bce3

    Description

      There is a call of qSqrt inside the function QFontEngineFT::loadTransformedGlyphSet:

      bool draw_as_outline = fontDef.pixelSize * qSqrt(matrix.det()) >= 64;

      (line 1371 of file src/gui/text/qfontengine_ft.cpp)

      The argument of qSqrt can be negative if matrix contains reflection. However we need
      only absolute value of matrix.det() here. Therefore we have to put matrix.det() inside qAbs:

      bool draw_as_outline = fontDef.pixelSize * qSqrt( qAbs( matrix.det())) >= 64;

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            vkni Andrey Bergman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes