View Single Post
Old 06-19-2017, 12:13 PM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,494
Karma: 28005164
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
DPI scaling is complicated. There are two basic components two it. Text and vector images are the first. Raster images are the second.

On windows, the OS can decide to either handle the scaling itself or let the application do it. If the application indicates it can do it, windows usually lets it do it itself. calibre has always indicated that it can do it, because of the two components, it has always been able to draw text correctly. This is because font sizes in calibre are specified in pts which are an absolute unit and resolution independent.

However, while text sizes are in pts, UI element sizes and images sizes are in pixels, which are resolution dependent, inthe sense that the actual physical space they take up on the monitor depends on the monitor resolution. The "perfect" way to solve high DPI issues is to go through all the UI code and convert everything everywhere to use resolution independent sizes, however, for something of calibre's size that is impossible. So Qt, as of version 5.6 provides a "hack". This hack works like high DPI support on macOS and all browsers. Basically, the pixel no longer means a physical pixel on the screen, but is instead a virtual unit scaled by the DPI scaling factor.

So now, text is still sized in pts but the rest of the UI is sized in virtual pixels. The idea being that the virtual pixel based sizes should more closesly correspond to the text sizes.

Now, you have been running at 1.5 DPI which means that, in calibre, you were in effect increasing the text size relative to the rest of the UI elements, in calibre 2.x

In calibre 3.x, with scaling turned on, that is no longer the case. UI elements are also scaled by 1.5. This will look weird to you because you are used to the UI with relatively large text and small padding around it. All the saved dialog sizes on your sytem will now be too large because the pixel is now 1.5 times larger than it was.

So if you were happy with how calibre looked in 2.x your best bet is to just turn off high dpi scaling and be on your merry way. However, if you have a high resolution enough monitor/sharp enough eyesight/nitpicky enough personality that slightly pixelated images and ratio of text sizes to UI element sizes being off bothered you, then you will like the scaling.
kovidgoyal is offline   Reply With Quote