Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get dpi from environment #897

Closed
cbm755 opened this issue Feb 17, 2019 · 5 comments
Closed

get dpi from environment #897

cbm755 opened this issue Feb 17, 2019 · 5 comments

Comments

@cbm755
Copy link
Contributor

cbm755 commented Feb 17, 2019

This is low priority.

I can query my X server for the current DPI:

$ xdpyinfo  | grep dots
  resolution:    210x215 dots per inch

In the bad ol' days, this was often garbage but I assume (perhaps incorrectly) that we can now get a reasonable value which takes HiDPI etc into account.

Anyway, might be nice if that value was used by default. The current "Zoom, put a ruler on screen" preference could then by behind a checkbox:

[ ] Override autodetected dpi value (currently: 210)
Put a ruler on your screen etc etc
@andreasb242
Copy link
Contributor

We currently support macOS, Windows and Linux with X11 or Wayland, therefore this is no option.
HighDPI is working, we already get the information from GTK (we get a scale factor, not a DPI).
GTK Automatically scale the most stuff, the rest is scaled by Xournal++.

@cbm755
Copy link
Contributor Author

cbm755 commented Feb 17, 2019

Maybe I've misunderstood: when I started Xournal++, the dpi was set to 72... And I had to go and do the ruler thing in preferences to get "100 %" zoom to look reasonable.

This is Gnome on Fedora 29.

@andreasb242
Copy link
Contributor

Thats right, your bug report is correct. We only get a scale factor from GTK, e.g. 2 for high DPI Displays.
But Query X11 is no option.

May gdk_screen_get_resolution delivers a Value, but I even then don't expect that the value will be right, maybe except on macOS, where the HighDPI Stuff is really good handled (because they know the Hardware), on Linux / Windows it requires usually manual configuration.

I'll do a short check, I have multiple devices here, and if it returns the right value, I have a look at it.

@andreasb242
Copy link
Contributor

Definitive not working - the DPI value is wrong, therefor using this value makes absolute no sense.

It might be working on some devices, but if it's not working on all devices it makes no sense to implement it.

@andreasb242
Copy link
Contributor

Your bug report is correct, but cannot be solved. Therefore it's closed, we leave only bugs open which can be solved by Xournal++, else there are so many, we don't find the real one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants