[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#989831: konsole: Bitmap fonts rendered incorrectly if display scaling is enabled



Package: konsole
Version: 4:20.12.3-1
Followup-For: Bug #989831
X-Debbugs-Cc: tim@seoss.co.uk

On 16/06/2021 05:07, Norbert Preining wrote:
> On Mon, 14 Jun 2021, Tim Small wrote:
>> instead each character is rendered with large amounts
>> of surrounding space.
>>
>> T h e   e f f e c t   i s   a   b i t   l i k e   t h i s ,  a n d   i s
>>
>> n o t   u s a b l e .
>>
>> I'm not sure if this is a konsole thing, or a qt/kde thing.
> But isn't that what you are asking for by setting a global scale to != 100
> ???

I think what the user expecting when a global scale is set, is "When the
application says that graphical elements should be size 'x' on screen,
then display it at size 'global scale * x' instead".

So e.g. If an application would normally display a graphical element
with a font which renders at 10 pixels-tall, then when I have a global
scale set to 150%, instead it would try and use font which renders at 15
pixels-tall.

I'm assuming that konsole would select a larger font in this case
(perhaps it's trying to, but it can't because of #989834, or perhaps the
rendering pipeline just doesn't allow this sort of decision to be made).

>> p.s. I've tagged this as a11y because I use bitmap fonts AND high dpi
>> displays to avoid chronic eye strain (without which I am limited to
> I understand hidpi, but why bitmap fonts? vector fonts are also
> converted to bitmaps and mostly at better quality, so they should
> provide better readability and less strain.

The thing that gives me eye strain is anti-aliasing (having spoken to an
optometrist about this, they think my visual system perceives the fuzzy
edges of anti-aliased fonts as being out-of focus, and then continuously
tries to make micro adjustments to my eyes' focal distance to bring it
into focus, and this causes muscle fatigue).

I know that this is quite a niche problem (especially since high dpi
displays are now fine for the vast majority of users), and it was much
more of a problem for me before I switched to higher resolution
displays), there is some mention of it in section 3.3 of this paper:

https://jsonj.co.uk/resources/science/papers/plateau2015-jacques.pdf

The optometrist thought I was experiencing this because I have high
visual acuity (when I was younger - it was "20/10", and I could read the
whole of the bottom row of the optometrists' sight chart).

Vector fonts don't give me eye fatigue when anti-aliasing is disabled,
and this is a good second best (since konsole includes an option to
disable this, presumably because this is a reasonably common request).

Unfortunately with anti-aliasing disabled, the vector fonts look lower
quality.  e.g. see attachment which shows terminus vs noto mono (from
konsole screenshots of both typefaces).  The vector fonts are not
unusable, they're just not as good when rendered like this.

After trying various things to try and reduce eye fatigue, my working
environment uses two 4k displays - the internal 4k 15" laptop display is
OK for anti-aliased fonts (as long as use an external keyboard so that
it is about 1 meter away from my eyes - I use display scaling to ensure
text isn't too small at this distance), and another 27" 4k display (at
the same distance, but I restrict this to working without anti-aliased
fonts except for short time periods).

I assume a 27" 8k display would be great for me with anti-aliased vector
fonts, but these are much more expensive (about 10x more than a 4k
display last time I looked).

I've found I can workaround this issue by disabling scaling in konsole
by launching it with this wrapper:

#!/bin/sh
export SAVE_QT_SCREEN_SCALE_FACTORS="$QT_SCREEN_SCALE_FACTORS"
export SAVE_QT_SCALE_FACTOR="$QT_SCALE_FACTOR"
unset QT_SCREEN_SCALE_FACTORS
export QT_SCALE_FACTOR=1
exec /usr/bin/konsole

...and then restoring the SAVE variables in the shell rc so that they
are not inherited by commands which are launched from within konsole.

Tim.

Attachment: terminus-notomono.png
Description: PNG image


Reply to: