Fractional font sizes can't be input using the "Preferences" dialog
Reported version
3.5
Type
Ergonomical (UX)
Frequency
Once
Severity
S5 - Suggestion
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project
I opened the "Preferences" dialog, focused on the "Font Size" spinner in the "General" tab, and attempted to type in "9.5". The spinner transformed the input into "95" instead.
Because font size influences the size and readability of the entire UI, giving the user fine control over the font size would be beneficial. The layout difference between, say, a 9pt and 10pt font is significant.
Fix version
3.6.0
Comments
Half a point doesn't really make sense, does it?
Why's that?
Because a point is impartibel. You either draw it or don't
In which other application can you have fractional dots? I just checked Microsoft Office: only integral values allowed there for font sizes
Points aren't pixels. A point is 1.333... pixels.
Points seem to be multiplied by the UI scale before being rendered by Qt, so a supposed font size of 9pt, with a 1.5x UI scale, might be transformed into an actual font size of 13.5pt.
Most text renderers will draw a 13.5pt font differently to a 13.0pt one. The glyphs might be rasterized differently, and they will almost always be spaced differently. Qt advertises platform-dependent support for this feature (see
QFont::setPointSizeF
).MuseScore also appears to layout some of its UI with dimensions proportional to the current font size. For example, I suspect that the "Font Size" spinner in the "Preferences" dialog would have different dimensions for a 9pt, 9.5pt and 10pt system font, at least on a high-dpi display.
Fractional font sizes are supported by many programs, but not all. A few examples on my PC: LibreOffice, MS Paint, the Web, the Adobe software suite.
A point (on a printer) can't split, a pixel, via anti-aliasing, can though...
Anyway, not a bug, rather a feature request (AKA Sugestion)
I'm not talking about printers. A point is a unit of measurement, like a millimetre or an inch.
https://en.wikipedia.org/wiki/Point_(typography)
and I cite from that: In typography, the point is the smallest unit of measure so indeed there is no half-point
And typography is about printers
Jojo: It would take thirty seconds to demonstrate this to yourself using MS Paint and the Segoe UI font.
If somebody comes across this thread who's more familiar with digital typography, I'd be happy to chat about this. I think the main open question is how
QFont::setPointSizeF
works on different platforms in practice. Not sure whether it's important enough to need thorough testing, but I can volunteer my Windows 10 system to test any patches, if necessary. Looking atTheme::initFont
andUiConfiguration::fontSize
, I suspect this would be an easy fix.I'm not saying that supporting this would be impossible (it certainly is not) or difficult (no idea). Just unusual.
Your Pull Request for this is welcome ;-)
In reply to Jojo: It would take thirty… by hiddenhare
@Jojo, your conclusion that "there is no half point" does not follow from the point being the smallest unit of measure. In the imperial length measurement system the smallest unit of measure is the inch, but we certainly have half-inches.
Try typing "9.5" into the font size box in word and see if you don't get what I do.
"9.5" doesn't work for me. Not at all.
But indeed "9,5" does ;-), so I stand corrected: MS Office (and Paint) indeed seem to support that
As does MuseScore! In Inspector at least, and the style settings, so for text in score
Just not for the UI font.
A printer dot cannot be split, but a typographic point can.
From a cursory look it indeed seems to be a simple 2-line change.
OK, a bit more than 2 lines, but not very much more...
See https://github.com/musescore/MuseScore/pull/7000
Fixed in branch 3.x, commit c4fb8f5d1f
Fix #313857: Fractional font sizes can't be input using the "Preferences" dialog
Automatically closed -- issue fixed for 2 weeks with no activity.