fix: Tweak default font size to match Yaru GTK and remove letter spacing #1036
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some fixes for better consistency with GTK and better typography.
GTK points vs Flutter pixels
GTK uses points (pt) as units, whereas Flutter uses dp (~pixels). Default text in the Yaru GTK theme is 11pt, which translate into 14.66...dp as opposed to 14dp that we are currently using. Conversion is dp = pt * (96 / 72).
This is not only a cosmetic change: text was unnecessarily small compared to GTK apps.
I went for a hardcoded value, rounding two decimals, but we could obvs do the calculation with a function:
Unnecessary letter spacing
Current styles seem to be inheriting some letter spacing from Material/Flutter. This letter spacing is unnecessary and inconsistent with Yaru GTK.
I checked with @lyubomir-popov, visual designer at Canonical heavily involved in the development of Ubuntu Sans. Letter spacing is only acceptable for small caps or uppercase. My fix sets it to zero for all font styles. This results in a slightly higher density, good in some instances such as the sidebar (see #1035)
Related: #995