seek-oss / capsize

Flipping how we define typography in CSS.
https://seek-oss.github.io/capsize/
MIT License
1.51k stars 37 forks source link

metrics: Prefer public family name to internal `familyName` metrics #191

Closed michaeltaranto closed 5 months ago

michaeltaranto commented 5 months ago

Ensure metrics are available using the public family name as seen on Google Fonts as opposed to the internal family name metric. This makes sense as consumers are looking to import the metrics relevant to a specific system font or from Google Fonts (also aligns with the names Google use in their font declarations generated in the hosted stylesheets).

BREAKING CHANGES:

Google Fonts

Previously, the metrics were imported with a path that used the internal family name, now they align with the font as seen on Google Fonts.

-import metrics from '@capsizecss/metrics/roundedMplus1c';
+import metrics from '@capsizecss/metrics/mPLUSRounded1c';

With only a small number of Google Fonts affected, this is only a break for the following fonts:

System fonts

The system fonts only had one example where the names diverged:

-import metrics from '@capsizecss/metrics/brushScriptMT';
+import metrics from '@capsizecss/metrics/brushScript';

This now aligns with the name consumers use to reference the font on their system.


Closes https://github.com/seek-oss/capsize/issues/189

changeset-bot[bot] commented 5 months ago

🦋 Changeset detected

Latest commit: 94bf3b9d670d2bca1169b57a3e926fc1b5bdadcf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------------------- | ----- | | @capsizecss/metrics | Major |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR