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

Rendering text to QPixmap is no longer subpixel antialiased

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.6
    • None
    • X11

    Description

      Rendering text to QPixmap is no longer subpixel antialiased in Qt 4.8. It would make sense to have a flag for QPixmap/QImage to tell the renderer that the image is a final (cached) image intended for screen display, and that QPainter should enable subpixel antialiasing. Maybe the concept of "friend bitmaps" (AmigaOS terminology) that are "blit" compatible could automatically transfer those properties to QPixmap/QImage.

      As discussed on #qt-labs:

      <_kdepepo> Is there a way to get Qt to respect subpixel antialiasing when rendering to a QImage?
      <_kdepepo> actually, I am using QPixmap, but now that with default to graphicssystem raster this is a QImage, it discards subpixel information. And I am wondering how Qt manages to respect it when rendering to the backing store.
      <sroedal> _kdepepo: QRasterPaintEngine::drawCachedGlyphs() has a check on whether painter()>device()>devType() == QInternal::Widget
      <sroedal> _kdepepo: I think that's what causes it to only enable subpixel font rendering when painting to widgets (via the backing store)
      <_kdepepo> sroedal, ah okey, sounds like this check needs to be changed to include QPixmap, too?
      <sroedal> _kdepepo: I think the reason we only do it for widgets is that pixmaps might be scaled, rotated, or transformed in other ways, making the subpixel rendering incorrect
      <sroedal> _kdepepo: maybe there needs to be an option somewhere to control the behaviour
      <_kdepepo> It makes sense for "cache" type pixmaps to appear exactly as on screen, I have a KDE bug report about it
      <sroedal> _kdepepo: true

      See also bug https://bugs.kde.org/show_bug.cgi?id=284924

      Attachments

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

        Activity

          People

            rodal Samuel Rødal
            cfeck Christoph Feck
            Votes:
            10 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes