querying text-scaling from remote system

I am having some trouble trying to make an app play nicely with
text-scaling-factor settings. I need to have access to this setting in
order to be able to scale some images drawn on a canvas so they match
text drawn with gtk.

If I run things locally, I can query




and all is fine. However, I run the app on a remote system (by 'ssh -X')
and display things locally, these queries will give me the settings of
the remote system.

Gtk seems to have no problems figuring out my local settings even when
running from the remote system, as all text looks the same as when I
run the app locally. So the above is probably not how I am supposed to
to do things. I have read that

  The correct place to query the current scale factor is from the X
  server itself, via some toolkit's api, or using the X11 api directly
  to read the server xsettings.

(https://github.com/electron/electron/issues/1150) but I can't find the
relevant api call for gtk. 

Any suggestions? Is there a good authoritative source for doing these
kind of things which is up-to-date? Thanks!


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