DevHeads.net

Review Request 123186: Add autohint checkbox to KCM fonts

Review request for kde-workspace, Martin Gräßlin and Eike Hein.

Repository: plasma-desktop

Description
We need to add autohint checkbox to KCM fonts, this feature is requested by various users downstream (for example, see <a href="https://bugs.mageia.org/show_bug.cgi?id=1240" title="https://bugs.mageia.org/show_bug.cgi?id=1240">https://bugs.mageia.org/show_bug.cgi?id=1240</a> ).

I patched kde-workspace 4.9 in 2012, now I'd like to submit my patch upstream to have this feature in Plasma 5 for every distribution.

BTW, LXQt already added autohint option to font settings several monthes ago: <a href="https://github.com/lxde/lxqt-config/pull/13#event-187605798" title="https://github.com/lxde/lxqt-config/pull/13#event-187605798">https://github.com/lxde/lxqt-config/pull/13#event-187605798</a>

Diffs
kcms/fonts/fonts.h d98bbe2
kcms/fonts/fonts.cpp 9b065e6
kcms/fonts/kxftconfig.h 8e79595
kcms/fonts/kxftconfig.cpp 2cc3a1b

Diff: <a href="https://git.reviewboard.kde.org/r/123186/diff/" title="https://git.reviewboard.kde.org/r/123186/diff/">https://git.reviewboard.kde.org/r/123186/diff/</a>

Testing
Old KDE 4 patch was used by ROSA and OpenMandriva since 2012, no issues with it. I had to adjust it a bit to follow Plasma 5 changes but in general it's old well-tested patch. Seems to work fine for me.

Thanks,

Andrey Bondrov

Comments

Re: Review Request 123186: Add autohint checkbox to KCM fonts

By =?utf-8?Q?Thoma... at 03/30/2015 - 13:01

From my own experience, autohinting is no "yes or no" question.
=> Should downstream not rather provide global fontconfig snippets that enable autohinting for fonts with (known) crap BC hinting?

- Thomas Lübking

On März 30, 2015, 3:42 nachm., Andrey Bondrov wrote:

Re: Review Request 123186: Add autohint checkbox to KCM fonts

By Andrey Bondrov at 03/31/2015 - 03:45

Yes, autohint affects all fonts. But some people like me use prefered font where it's possible (DE, browser etc). So I just set autohint in fonts KCM instead of using custom fontconfig configs (as we cannot turn on autohint for Liberation fonts in distro fontconfig, many people are likely to suffer from that, Liberation fonts look much better with BCI than with autohint when used with subpixel rendering).

Surely I don't want to *force* this feature to be accepted upstream. For me it's just one patch less to maintain downstream. Out of ~100 KDE4 patches I have to port to Plasma 5. :-)

- Andrey

On Март 30, 2015, 3:42 п.п., Andrey Bondrov wrote:

Re: Review Request 123186: Add autohint checkbox to KCM fonts

By =?utf-8?Q?Thoma... at 03/31/2015 - 03:17

I think this is a misunderstanding:
I did not mean "it's not a matter of choice" but rather "it *is* a matter of choice *per font*"

Ie. some fonts have great BC hinting and some (ok: many fun-fonts found on dafont ;-) have crap hints. For them the autohinter would produce better results, by the cost of damaging the usefully hinted ones.

I'm not familiar w/ the code, but it looks like it applies a global match, ie. _all_ fonts will be autohinted, not the one(s) set in that kcm?

Subpixel rendering otoh is (to me) rather a matter of personal global taste, maybe combined w/ the display (resolution)

- Thomas

On März 30, 2015, 3:42 nachm., Andrey Bondrov wrote:

Re: Review Request 123186: Add autohint checkbox to KCM fonts

By Andrey Bondrov at 03/30/2015 - 19:10

Sometimes it's still "yes or no". For example, I prefer to turn subpixel rendering and BC off for Liberation Sans (just because I don't want my fonts to be RGB-colored). But I guess most people prefer subpixel rendering and BC for Liberation Sans fonts. BC for LS fonts is a matter of taste.

- Andrey

On Март 30, 2015, 3:42 п.п., Andrey Bondrov wrote: