canonical / Ubuntu-Sans-fonts

Other
54 stars 4 forks source link

weight naming: Medium / SemiBold? #102

Closed elioqoshi closed 1 year ago

elioqoshi commented 1 year ago

Hi there, Elio from Ubuntu Desktop UX.

I was wondering if there was any preference over 'Medium' for font-weight 400, instead of something like SemiBold? Asking as on Desktop we use 'Medium' to refer to the size of the text font, and using the same variable name might be confusing. Not a huge deal but thought to ask about the context here :)

djrrb commented 1 year ago

Hi Elio,

So in the Ubuntu fonts, font-weight: 400 is called “Regular” and font-weight: 500 is called “Medium”. Note that we just added a SemiBold weight at font-weight: 600 (https://github.com/canonical/Ubuntu-fonts/issues/97#issuecomment-1625538124).

I understand the potential for confusion with the Medium font size, but I would strongly recommend we leave the weight names/numbers as-is for the following reasons:

1) The name/numbering relationships we use are based on the names used in the OpenType specification and the CSS specification:

https://learn.microsoft.com/en-us/typography/opentype/spec/os2#wtc https://www.w3.org/TR/css-fonts-4/#font-weight-absolute-values

2) “Medium” was used in the previous Ubuntu font release.

3) These are the values expected by Google Fonts (#96, #97).

If it turns out to be important that your team work with different weights/names, it would be possible to build a custom version of the fonts for your use.

elioqoshi commented 1 year ago

Hey @djrrb thank you for the very detailed explanation. This is very sensible and I was just wondering what the background was. I apparently was unaware that Medium and SemiBold have different weight conventions, so my bad.

It might make more sense to change the code naming convention on our side for our use case then. We don't need a custom build as that would confuse people with what's what I'd reckon. Appreciate the background on this however!