On Tue, 3 Dec 2013 14:28:32 -0800 (PST)
jkn <[email protected]> wrote:
> Hi Terry
> surely this is the other way round? specifying font size in pixels
> would cause actual size to
> vary depending on the dots-per-inch of the display, which can vary wildly
That's certainly what you'd expect, pixels vary and 1/72.27" is 1/72.27"
But if you google qt pt size it seems to a problem, dependent on
different systems having different views of the actual pixel size on
the monitor. I don't understand that, as it seems it can be queried
from the monitor with plug and play voodoo. But apparently Mac assumes
72 dpi and Windows assumes 96, or visa versa, anyway, when I try the
vanilla Leo install in Win. 7 with its 14 pt font, it's huge, ~1 cm or
more high letters.
Below is a simple Qt program that opens a window with text at 14 px and
14 pt. Maybe anyone running Win 7 can try it and see if the 14pt text
seems large. Mac. would be interesting too.
So because Leo doesn't really run on small devices with very small
pixels, I think 14px will usually be acceptable, whereas 14pt may vary
greatly - completely the opposite of what you'd expect, but what I'm
seeing so far.
import sys
from PyQt4 import QtGui, QtCore
app = QtGui.QApplication(sys.argv)
w = QtGui.QSplitter()
label = QtGui.QLabel("14px")
font = label.font()
font.setPixelSize(14)
label.setFont(font)
w.addWidget(label)
label = QtGui.QLabel("14pt")
font = label.font()
font.setPointSize(14)
label.setFont(font)
w.addWidget(label)
w.show()
app.exec_()
Cheers -Terry
>
> ... but a point size is an absolute scale - a (typographical) point is
> 1/72.27 of an inch, if I
> recall my Knuth correctly.
>
> However I am sure it is true that people nowadays use different devices,
> with different
> resolutions (DPI), at different distances to the eye. I imagine that they
> would like to have 'the same'
> setting work in a equivalent way in each scenario. Probably this would have
> to be some sort
> of 'angle subtended to the eyeball' scale, which is neither px or pts.
>
> Sorry, that wasn't much help, was it? ;-/
>
> Cheers
> jon N
>
>
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.