D29422: Modify kcm fontconfig to get independent subpixel and hintstyle options

Giusy Margarita noreply at phabricator.kde.org
Mon May 4 18:19:15 BST 2020


kurmikon created this revision.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
kurmikon requested review of this revision.

REVISION SUMMARY
  Now kcm fontconfig has **subpixel rendering** and **hintstyle** options depending on **antialiasing**. This means if I disable antialiasing, I can't set the other two options.
  
  As far as I know, subpixel rendering and hintstyle don't depend on antialiasing and fontconfig does not prevent to set them when antialiasing is off. Indeed the previous version of kcm fontconfig had a different behavior, letting the user chose their values whether antialiasing was enabled or not. So I suggest to always enable them.
  
  Then I'd like to get a clarification on DPI value. Reading the code I see that the spinbox accepts values from 24 with stepsize of 24.
  
    QtControls.SpinBox {
                        id: dpiSpinBox
                        stepSize: 24
                        editable: true
                        enabled: dpiCheckBox.checked
                        value: kcm.fontsAASettings.dpi !== 0 ? kcm.fontsAASettings.dpi : 96
                        onValueModified: kcm.fontsAASettings.dpi = value
                        // to: need to divide to stepSize
                        to: 1008
                        // lowest vaue here can be == stepSize, that is because 0 means off
                        from: 24
                    }
  
  That seems weird to me. First of all, the user don't even know the spinbox accept only values multiple of 24. If it were this way, there should be a message to inform the user. But basing on information reported here <https://wiki.archlinux.org/index.php/Font_configuration#Distorted_fonts>, neither xdpyinfo, xrdb and fontconfig report values multiple of 24.
  
  In example, xorg wrongly assumed that my monitor had 96 as DPI value, but I calculated it properly and the real value is 101 (see here <https://wiki.archlinux.org/index.php/Xorg#Display_size_and_DPI> how to do it). So I expect system settings to accept 101, but since stepsize is 24, it seems I can't set it. The comment in the section of code posted above says to divide by 24, but I can't understand why.
  
  Maybe was this made to format the value before it is passed to the system functions? But this should be done after the user wrote the value.

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D29422

AFFECTED FILES
  kcms/fonts/package/contents/ui/main.qml

To: kurmikon
Cc: ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200504/667124eb/attachment-0001.html>


More information about the Plasma-devel mailing list