uswds / public-sans

A strong, neutral, principles-driven, open source typeface for text or display
https://public-sans.digital.gov/
Other
4.45k stars 102 forks source link

font-feature-settings, stylesets #243

Open NinaFan0824 opened 2 years ago

NinaFan0824 commented 2 years ago

Hi there,

I wonder how many stylesets does public sans have? In figma, it looks like there's an alternate character style of “g” by usingfont-feature-settings: 'ss02' on, 'ss06' on, 'salt' on, 'ss01' on;, but it's not working on chrome.

Could you help to make it more clear for me?

Thanks a lot.

Screenshot at Apr 19 14-42-53

kenmcd commented 2 years ago

I wonder how many stylesets does public sans have?

Just one stylistic set - ss01 (salt is the same) And ss01 only affects the g and the l.

ss01 and salt

NinaFan0824 commented 2 years ago

Screenshot at Apr 20 16-28-16 Screenshot at Apr 20 16-29-00

I tried this, not working. Did I write it wrong?

kenmcd commented 2 years ago

Screenshot at Apr 20 16-28-16 Screenshot at Apr 20 16-29-00

I tried this, not working. Did I write it wrong?

Are you trying this using fonts from Google Fonts, or locally served? Google Fonts API does not support stylistic sets (currently, AFAIK). So if you want to use ss01 you will need to host the fonts yourself.

NinaFan0824 commented 2 years ago

Thanks, that makes sense. Will try local fonts then.