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

Uniform resolution across backends #993

Closed
piever opened this issue May 27, 2021 · 2 comments
Closed

Uniform resolution across backends #993

piever opened this issue May 27, 2021 · 2 comments

Comments

@piever
Copy link
Contributor

piever commented May 27, 2021

The current situation with backends resolutions is the following.

  • CairoMakie interprets (800, 600) as "units", so it means 600 x 450 pt or 800 x 600 px when embedded in a web site
  • WGLMakie and GLMakie interpret (800, 600) as device pixels, which means they end up with tiny fonts on, e.g., retina displays

Possible solution is to use the resolution in CairoMakie (expressed in units) as the default, and adjust WGLMakie and GLMakie.

  • For WGLMakie, it is actually straightforward, as it is easy to give the size in CSS pixels (we have now learned exactly all the bits where code needs to change)
  • For GLMakie, it is slightly trickier, but I am curious whether we can keep the meaning of (800, 600) as units, and, depending on the pixel size, find a w x h such as (w, h) times the pixel size on that screen has the same physical dimension as 600 x 450 pt

This way, we would have by default consistent looks across backends. Especially a consistent font size, which now is problematic.

@piever
Copy link
Contributor Author

piever commented May 27, 2021

Copying a comment from the slack chat, this could be further controllable by a px_per_unit = 1 in WGLMakie (as an attribute to Figure), and a device_px_per_unit in GLMakie.

@ffreyer
Copy link
Collaborator

ffreyer commented Dec 27, 2023

With #2544 / #3113 (0.20) all backends now use generic units that are scaled with px_per_unit

@ffreyer ffreyer closed this as completed Dec 27, 2023
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