IBM / plex

The package of IBM’s typeface, IBM Plex.
SIL Open Font License 1.1
9.6k stars 567 forks source link

Split files do not use ligature layout feature #438

Closed tay1orjones closed 2 years ago

tay1orjones commented 2 years ago

Surfaced in https://github.com/carbon-design-system/carbon/issues/11175

Split files do not have the layout features turned on enabling ligatures. The unicode character is included, but the layout feature is off so fi doesn't automatically get replaced with the ligature.

This was noticed by @mjabbink when we updated Carbon to no longer use Google Fonts and instead provide the option to use assets directly from @ibm/plex or the IBM Akamai CDN (https://github.com/carbon-design-system/carbon/pull/11002, https://github.com/carbon-design-system/carbon/pull/11070)

I'm not sure what version Google Fonts is using currently, but I assume it's an older one which would point to the current version being when this was introduced.

Before After
image image

@BoldMonday We're assuming these just need re-exported with the feature turned on and a new minor/patch version published, but curious on your thoughts.

tay1orjones commented 2 years ago

cc @abbeyhrt

BoldMonday commented 2 years ago

Strange that the font subsetter has automatically stripped the liga feature. Will investigate.

BoldMonday commented 2 years ago

Current split fonts in this repository only contain a kern feature. All other features available in the full fonts (such as the ones for ligatures liga, or stylististic alternates such as single storey a ss01, single storey g ss02, slashed zero ss03, superior sups and inferior figures sinf) have been removed from the split fonts. This has been done to make these files as small as possible.

We can generate new subsets where all those features are preserved. But then these fonts will become approx. 4 KB larger in size for the Latin1 woff files.

What do you prefer: preserve all features? Or only preserve kern and liga features? In case of the latter the file size will become marginally bigger.

BoldMonday commented 2 years ago

Here is a comparison:

Current Latin1 split fonts in woff format (only containing kern feature)

size    filename
-------------------------------------------------
21356   IBMPlexSans-Bold-Latin1.woff
22860   IBMPlexSans-BoldItalic-Latin1.woff
22544   IBMPlexSans-ExtraLight-Latin1.woff
24152   IBMPlexSans-ExtraLightItalic-Latin1.woff
23092   IBMPlexSans-Italic-Latin1.woff
22176   IBMPlexSans-Light-Latin1.woff
23704   IBMPlexSans-LightItalic-Latin1.woff
21828   IBMPlexSans-Medium-Latin1.woff
23728   IBMPlexSans-MediumItalic-Latin1.woff
21216   IBMPlexSans-Regular-Latin1.woff
22048   IBMPlexSans-SemiBold-Latin1.woff
23272   IBMPlexSans-SemiBoldItalic-Latin1.woff
21732   IBMPlexSans-Text-Latin1.woff
23468   IBMPlexSans-TextItalic-Latin1.woff
21828   IBMPlexSans-Thin-Latin1.woff
23820   IBMPlexSans-ThinItalic-Latin1.woff

New Latin1 split fonts in woff format (containing all features)

size    filename
-------------------------------------------------
25228   IBMPlexSans-Bold-Latin1.woff
27232   IBMPlexSans-BoldItalic-Latin1.woff
26888   IBMPlexSans-ExtraLight-Latin1.woff
29056   IBMPlexSans-ExtraLightItalic-Latin1.woff
27312   IBMPlexSans-Italic-Latin1.woff
26532   IBMPlexSans-Light-Latin1.woff
28712   IBMPlexSans-LightItalic-Latin1.woff
26104   IBMPlexSans-Medium-Latin1.woff
28664   IBMPlexSans-MediumItalic-Latin1.woff
24900   IBMPlexSans-Regular-Latin1.woff
26464   IBMPlexSans-SemiBold-Latin1.woff
28156   IBMPlexSans-SemiBoldItalic-Latin1.woff
25996   IBMPlexSans-Text-Latin1.woff
28332   IBMPlexSans-TextItalic-Latin1.woff
25652   IBMPlexSans-Thin-Latin1.woff
28416   IBMPlexSans-ThinItalic-Latin1.woff
BoldMonday commented 2 years ago

Looking forward to hearing what you prefer @tay1orjones

tay1orjones commented 2 years ago

@BoldMonday Sorry for the delayed response, I ran this by the team and I think it's best to preserve all features for visual/brand consistency.

mjabbink commented 2 years ago

@BoldMonday The kernand ligamake a lot of sense to me. I think we can get away with the removal of the other features. Maybe slashed zero ss03 can remain?

tay1orjones commented 2 years ago

@mjabbink @BoldMonday I spoke with @vpicone about this today and he brought up a good point that we likely want the available features to all be there and the same as what's available via the complete files. Also to have the same available features turned on by default.

Reason being that in many cases the complete files are used as a fallback to the split files on the web. We wouldn't want the experience to change between split vs complete fallback.

tay1orjones commented 2 years ago

@BoldMonday Could you also add myself and two other members of the Carbon team to the email distribution list for notifying when updates have been published? Moving forward we're going to be helping @vpicone with releases.

@abbeyhrt @joshblack

BoldMonday commented 2 years ago

@tay1orjones Understood. We will generate new subsets with all features included and let you guys know by email when they're uploaded. You can expect them by tomorrow.

BoldMonday commented 2 years ago

New subsets have been uploaded. Please check your mail.

mjabbink commented 2 years ago

Makes sense and would prefer that but I thought the goal was smaller file sizes. If that requirement goes away then all features are best for sure.

BoldMonday commented 2 years ago

I suggest to try the new subsets with all features. It’s been close to five years now since we introduced split fonts. In terms of web technology that’s a long time and things have improved significantly for most users, including bandwidth.