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

[Umbrella] Revise QFont and QFontEngine APIs to improve the performance and to decrease the maintenance efforts

    XMLWordPrintable

Details

    Description

      QFontEngine::DesignMetrics shaping flag:

      the only related public API is `QTextDocument::useDesignMetrics` (\since 4.1);
      the only font engines that do not ignore this flag are: Freetype and Win (+DirectWrite FE always works in font metrics);

      the problem is that we're respecting DesignMetrics flag in both shaping and rendering for every glyph, loosing the performance quite measurable (especially while shaping, cause the flag gets determined for every glyph albeit set for the whole document)

      possible solutions:
      a) deprecate this API entirely
      b) make it a part of the font request (maybe QFont::StyleStrategy?) to affect a whole font engine


      QFont::ForceIntegerMetrics style strategy:

      handled only by Freetype, Mac and DirectWrite font engines, however implemented differently:

      Freetype Mac DirectWrite
      ascent + +
      descent + +
      leading + +
      capHeight + +
      xHeight + +
      averageCharWidth +
      properties 2 3
      boundingBox(glyph_t) 1 2 3
      boundingBox(QGlyphLayout) 2 3
      recalcAdvances + + +

      possible solutions:
      a) check if it is still used anywhere and if we're able to deprecate it some later
      b) unify the implementation and cover other font engines

      Attachments

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            ritt.ks Konstantin Ritt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: