Skip to content
Commit 499e096d authored by Yijie Du's avatar Yijie Du Committed by Fushan Wen
Browse files

kcm_fonts: add subpixel and hinting previews

This commit adds subpixel and hinting previews to kcm_fonts under
Wayland.

To properly support fractional scaling, PreviewRenderEngine now querys
the scale from focus window, which returns the right scale for the
currently active window (which should be the font settings page when
the dropdown is clicked), rather than the primary screen which can only
return the next higher integer scale. The DPI query is changed to query
the active window's QScreen rather than X11.

The naive reenablement has a bug where the preview image's size will
grow larger than the bounding box of the preview text. It turns out that
QImage::setDevicePixelRatio adds margins to the image, and removing that
call solves the issue somehow.

There are some minor display issues like the preview being blurry under
fractional scales, but it at least works. Somehow.

BUG: 432320


(cherry picked from commit be7af9da)
parent cfab3542
Pipeline #633740 passed with stage
in 21 minutes and 11 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment