HiDPI support: Difference between revisions

From FreeCAD Documentation
Line 5: Line 5:
== Display resolutions ==
== Display resolutions ==


[[File:Vector Video Standards8.svg]]
[[File:Vector Video Standards8.svg|800px]]


== Device pixel ratio ==
== Device pixel ratio ==

Revision as of 13:09, 20 July 2020

HiDPI support refers to the issue of displaying raster graphics (fonts, cursors, images) on high-resolution displays.

The issue is that the physical size of a display remains the same while its resolution increases.

Display resolutions

Device pixel ratio

It's a well-known concept for Web and Android developers. But not so much for desktop developers.

Basically, it's the ratio between physical pixels and device-independent pixels.

First things first. UI positioning and size (x, y, width, height) are historically defined in pixels.

But as more variety of displays resolutions become available at many different physical sizes, it's become a problem software developers need to be aware of.

FreeCAD development was started in 2002, long before such a problem was even foreseen.

How to test HiDPI support

OS X

  1. Open "Display"
  2. Choose "Scaled"
  3. Choose "Larger text" - this increases device pixel ratio

Video: https://www.youtube.com/watch?v=4U3eh_fMo4o

X Window

Useful commands:


Ubuntu (GNOME Shell)

  1. Open "Displays" (Settings > Devices > Displays)
  2. Select the highest resolution available

Issues

  • Raster images (cursors, icons)
  • Fonts (defined in pixels rather than points)
  • Cursor hot point
  • Zoom/Rotate origin
  • Snap distance
  • Selection distance (the hot area around selectable objects)

Forum threads

Relevant changes

Bugtracker Issues

  • Tickets tagged with HiDPI