adobe-fonts / source-sans

Sans serif font family for user interface environments
https://adobe-fonts.github.io/source-sans
SIL Open Font License 1.1
3.49k stars 229 forks source link

Update hinting metadata #248

Closed frankrolf closed 1 year ago

frankrolf commented 2 years ago

While working on something else, I noticed that some of the hinting metadata had gone out of sync between Source Sans instance UFOs and the adjacent fontinfo files. Attempting a fix, I realized that 2 stem values per hinting direction seemed improbable.

For example, the ExtraLight style used to have V32, V48, H28, H40. psstemhist -a -g A-Z,a-z font.ufo gives us

Vertical Stem List for Roman/Instances/ExtraLight/font.ufo
count    width    glyphs
   37       32    [B D E F G H I J K L M P R S T U Y a b c d e g o p q s]
   26       30    [M N U a b d e f h i j k l m n p q r t u]
    9       34    [C D G O P Q R]

Horizontal Stem List for /Roman/Instances/ExtraLight/font.ufo
count    width    glyphs
   57       28    [A B D E F G H L M P R T Z a b c d e f g h j l m n o p q s t u z]
   15       30    [C G J O Q S U r w y]
    3       32    [Q g v]

My conclusion is that the V48 and H40 stems are superfluous here.

The Black style (where more contrast is seen) used to have V172, V176, H134, H144. psstemhist -a -g A-Z,a-z font.ufo gives us

Vertical Stem List for /Roman/Instances/Black/font.ufo
count    width    glyphs
   35      172    [B D E F H I J K L P R T U Y a b d f h i j l m n p q r t u]
   15      176    [C D G O Q S b c d o p q]
    4      168    [B P R]
    4      164    [N a g]

Horizontal Stem List for /Roman/Instances/Black/font.ufo
count    width    glyphs
   11      148    [C G J O Q S U]
    9      144    [E F L T Z]
    9      140    [G b d p q]
    8      138    [D c l o w]
    8      134    [f j t y z]
    6      136    [P Q R a]

The 4-unit difference between V172 and V176 is small, so I think a single V172 stem can handle all. I kept H144 around, to represent the vast majority of stems found in the top 3 glyph groups.

It all is a little less granular now, and possibly you may have objections – but I think keeping it simple is worth a try.


Beyond updating the stems in the adjacent fontinfo files, some shifted alignment zones were also corrected.