Consistency in font naming, e.g. "Noto Sans Bold 10pt"
Currently, fonts are referred to in a manner of different ways:
Feature | Fonts KCM | Digital Clock | Spectacle |
---|---|---|---|
Screenshot | ![]() |
![]() |
![]() |
Order | Family, Size | Size, Family | Family, Style, Size |
Font Style? | No | No | Yes |
pt/pts | pt | pt | pts |
My recommendation is to unify these, and potentially include this in HIG as a rule to always refer to. In font dialogs (Widgets & Quick), the order is always "Font", "Font style" and "Size" - which I believe is the appropriate order of importance (style is less important than size, but ending with size does IMO help to reflect its importance). I think we should reflect this in any string that refers to a font like so:
"Noto Sans Bold 10pt"
Using the chosen family and style (and point size? see below) for this string.
There are several recommendations and points for discussion:
- Don't show the font size in previews, and instead defer to the standard size (as this can upset layouts). This behaviour is seen in the Fonts KCM and Digital Clock, but not in Spectacle.
- Instead of showing a font picker, in certain situations it might be more appropriate (e.g. in Spectacle or Digital Clock) to show a combobox for family (which the ability to search), a combobox for style, and a spinbox for font size. This removes the need for the dialog. Where underline and strikethrough are wanted (i.e. in Spectacle, and not in Digital Clock) we might present those as separate buttons as a user probably expects.
- We could establish a set of components for this in Kirigami Addons.
- Change "Strikeout" as in Qt's font dialogs to "Strikethrough", as the latter is the more commonly known name.
- Drop "pts", as font sizes are generally referred to in "pt" (with no space between the quantity and unit, as we currently do)
- Do any other languages need font sizes in "pts", and is plural localisation actually necessary?
Edited by Oliver Beard