Observer font sizes on HiDPI displayer

Loïc Hoguin lhoguin@REDACTED
Tue Sep 28 09:55:42 CEST 2021


The PR in question: https://github.com/erlang/otp/pull/2105

It’s possible that OBSERVER_SCALE misses some things. It “works on my machine”
which is Arch Linux with Gnome Shell and wx 3.0.

I do have HiDPI configured globally in Gnome so the scale has been useful mainly for
the hand drawn parts of the Observer, which ignore those settings.
Maybe that’s what you are missing.

Cheers,

--
Loïc Hoguin

From: erlang-questions <erlang-questions-bounces@REDACTED> on behalf of Dan Gudmundsson <dangud@REDACTED>
Date: Tuesday 28 September 2021 at 09:13
To: Rick Payne <rickp@REDACTED>
Cc: Erlang Questions <erlang-questions@REDACTED>
Subject: Re: Observer font sizes on HiDPI displayer

Yeah HiDPI is a mess in wx applications currently.

The OS's have handled this differently, with GTK being behind of course.
wxWidgets have some support in 3.0.x release and more coming in 3.2.
wxWidgets sees 3.1 as a developer release so linux distributions don't distribute that,
the wxWidgets team never seems to finish 3.2, and patches 3.0 very little since all development is
on 3.1, sigh.

I have not owned a HiDIP screen so I have not had any problems with this, nor been able to test it,
thus basically ignoring the problem altogether until the world came up with a solution of how to handle it.

OBSERVER_SCALE was a temporary hack to make it work a couple of years ago, I don't remember the
discussion but it might have been a PR or something I did for Loic after a discussion on this mailing list.

So this is a mess, and I could really need some help from someone jumping into the rabbit hole.
There are probably some functions in wx-api that are missing, and we need to scale the fonts and drawing done
in the observer tabs.

/Dan



On Tue, Sep 28, 2021 at 4:08 AM Rick Payne <rickp@REDACTED<mailto:rickp@REDACTED>> wrote:

Running Ubuntu 20.04 and i3 as my window manager, and I'm struggling
with Observer ending up with tiny text. This is on a Dell XPS 13 with a
HiDPI display. Clearly I'm making things a bit difficult for myself, so
wondering if I've missed something...

I can set the environment variable GDK_DPI_SCALE to (say) 1.6 and that
helps to a certain extent. The text on the 'System' page is much more
readable.

I can set another (undocumented?) environment variable OBSERVER_SCALE
to (say) 3 and now the 'Load Charts' page is readable as are the graphs
on the 'Memory Allocator' page. However the list of allocators at the
bottom is very small and hard to read. Ditto the process list on the
'Processes' page. In fact any text that is generated from a list.

I've never played with wx much but I had a quick look at the code which
is how I found the OBSERVER_SCALE trick. However, I don't grok it all
yet. For instance, I'm suprised that GDK_DPI_SCALE affects the fonts on
one page, but not on others - so clearly some different drawing
mechanism is at play.

Anyone else have this issue and found a solution?

Cheers
Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20210928/13ac1fde/attachment.htm>


More information about the erlang-questions mailing list