X11 can support DPI and fractional scaling by using XrandR to obtain each monitor’s physical dimensions and resolution
By computing the size in pixels from the monitor’s millimeter width and resolution, you can render elements at a consistent physical size
An example drawing a two-inch circle with OpenGL updates its pixel radius based on the monitor it is on
Physical sizing info comes from combining output and CRTC info from XRRScreenResources
Get notified when new stories are published for "🇺🇸 Hacker News English"