Back to Blog
Scrivener windows high dpi6/1/2023 ![]() On macOS, high-DPI support is enabled by settings in the ist file so make sure these settings are present. Normally, no special configuration is required. The Apple platforms implement scaling and coordinate system virtualization in the operating system. The Qt-supported operating systems offer the following for high DPI displays: macOS and iOS Typically, most applications work with device independent pixels except for OpenGL and code for raster graphics. The devicePixelRatio is the ratio between the device independent pixels and the device pixel coordinate system. The output is rendered in device pixels, which corresponds to the display resolution. This includes widget and item geometry, event geometry, desktop, window and screen geometry, as well as animation velocities. Now, geometry is specified in device independent pixels. Additionally, if an operating system doesn't support this mode, Qt has an implementation to fallback on. Some operating systems, like macOS and iOS implement this mode. Qt supports a high DPI mode where the main coordinate system is virtualized and made independent from the display pixel density. Traditionally, to support high DPI, Qt scales fonts automatically and provides a DPI value that application code can use to scale the rest of the UI. Applications must adapt to situations where users have multiple displays with varying resolutionsįor example, a user might use a 4K monitor for the document window of an image editor but a low resolution monitor for the tool box. ![]() But, on high DPI monitors, the frame would be too small, resulting in the text being clipped. If we use a 12pt font, it would look correct on low resolution monitors. ![]() For example, suppose we have a frame of 40x20 pixels around the text "hello". The combination of specifying font size in points and other sizes in pixels is particularly problematic because points are independent from the monitor's resolution.
0 Comments
Read More
Leave a Reply. |