Skip to content

Commit

Permalink
feat(@ibm/plex): Update plex dependency to use new packages (#17025)
Browse files Browse the repository at this point in the history
* feat(@ibm/plex): migrate to individual plex packages

* feat(@ibm/plex): add package-name to get resolver

* fix(plex): add font-feature-settings to reset

* fix(plex): add woff back to fonts that are not split

---------

Co-authored-by: kennylam <909118+kennylam@users.noreply.github.com>
  • Loading branch information
tw15egan and kennylam authored Aug 9, 2024
1 parent e6d6fa4 commit efd08bc
Show file tree
Hide file tree
Showing 23 changed files with 553 additions and 261 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,8 @@ check out our [Contributing Guide](/.github/CONTRIBUTING.md) and our
<td align="center"><a href="https://github.com/nandininarayanofficial"><img src="https://avatars.githubusercontent.com/u/165769075?v=4?s=100" width="100px;" alt=""/><br /><sub><b>nandininarayanofficial</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=nandininarayanofficial" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/digiacomo-a"><img src="https://avatars.githubusercontent.com/u/117646602?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Andrea DG</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=digiacomo-a" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/lluisrojass"><img src="https://avatars.githubusercontent.com/u/15043356?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Luis</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=lluisrojass" title="Code">💻</a></td>

<td align="center"><a href="https://github.com/lharrison13"><img src="https://avatars.githubusercontent.com/u/172074450?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Luke Harrison</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=lharrison13" title="Code">💻</a></td>

<td align="center"><a href="https://github.com/tekno0ryder"><img src="https://avatars.githubusercontent.com/u/8721803?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ahmed Alsinan</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=tekno0ryder" title="Code">💻</a></td>

</tr>
</table>

Expand Down
9 changes: 8 additions & 1 deletion packages/styles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,14 @@
"@carbon/motion": "^11.20.0",
"@carbon/themes": "^11.38.0",
"@carbon/type": "^11.29.0",
"@ibm/plex": "6.0.0-next.6",
"@ibm/plex-mono": "0.0.3-alpha.0",
"@ibm/plex-sans": "0.0.3-alpha.0",
"@ibm/plex-sans-arabic": "0.0.3-alpha.0",
"@ibm/plex-sans-devanagari": "0.0.3-alpha.0",
"@ibm/plex-sans-hebrew": "0.0.3-alpha.0",
"@ibm/plex-sans-thai": "0.0.3-alpha.0",
"@ibm/plex-sans-thai-looped": "0.0.3-alpha.0",
"@ibm/plex-serif": "0.0.3-alpha.0",
"@ibm/telemetry-js": "^1.5.0"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/styles/scss/_reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
border: 0;
margin: 0;
font: inherit;
font-feature-settings: 'liga' 1;
font-size: 100%;
vertical-align: baseline;
}
Expand Down
360 changes: 180 additions & 180 deletions packages/styles/scss/fonts/__tests__/__snapshots__/fonts-test.js.snap

Large diffs are not rendered by default.

75 changes: 66 additions & 9 deletions packages/styles/scss/fonts/_mono.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ $font-family: 'IBM Plex Mono';
$name: 'IBM-Plex-Mono';
$styles: (normal, italic);
$unicode-ranges: (Cyrillic, Pi, Latin3, Latin2, Latin1);
$formats: (woff2, woff);
$formats: (woff2);
$package-name: 'mono';

@mixin thin($styles: $styles, $unicode-ranges: $unicode-ranges) {
@each $style in $styles {
Expand All @@ -23,7 +24,14 @@ $formats: (woff2, woff);
font-family: $font-family;
font-style: $style;
font-weight: 100;
src: src.get($name, Thin, $style, $unicode-range, $formats);
src: src.get(
$name,
Thin,
$style,
$unicode-range,
$formats,
$package-name
);
unicode-range: unicode.get-range($unicode-range);
}
}
Expand All @@ -38,7 +46,14 @@ $formats: (woff2, woff);
font-family: $font-family;
font-style: $style;
font-weight: 200;
src: src.get($name, ExtraLight, $style, $unicode-range, $formats);
src: src.get(
$name,
ExtraLight,
$style,
$unicode-range,
$formats,
$package-name
);
unicode-range: unicode.get-range($unicode-range);
}
}
Expand All @@ -53,7 +68,14 @@ $formats: (woff2, woff);
font-family: $font-family;
font-style: $style;
font-weight: 300;
src: src.get($name, Light, $style, $unicode-range, $formats);
src: src.get(
$name,
Light,
$style,
$unicode-range,
$formats,
$package-name
);
unicode-range: unicode.get-range($unicode-range);
}
}
Expand All @@ -68,7 +90,14 @@ $formats: (woff2, woff);
font-family: $font-family;
font-style: $style;
font-weight: 400;
src: src.get($name, Regular, $style, $unicode-range, $formats);
src: src.get(
$name,
Regular,
$style,
$unicode-range,
$formats,
$package-name
);
unicode-range: unicode.get-range($unicode-range);
}
}
Expand All @@ -83,7 +112,14 @@ $formats: (woff2, woff);
font-family: $font-family;
font-style: $style;
font-weight: 450;
src: src.get($name, Text, $style, $unicode-range, $formats);
src: src.get(
$name,
Text,
$style,
$unicode-range,
$formats,
$package-name
);
unicode-range: unicode.get-range($unicode-range);
}
}
Expand All @@ -98,7 +134,14 @@ $formats: (woff2, woff);
font-family: $font-family;
font-style: $style;
font-weight: 500;
src: src.get($name, Medium, $style, $unicode-range, $formats);
src: src.get(
$name,
Medium,
$style,
$unicode-range,
$formats,
$package-name
);
unicode-range: unicode.get-range($unicode-range);
}
}
Expand All @@ -113,7 +156,14 @@ $formats: (woff2, woff);
font-family: $font-family;
font-style: $style;
font-weight: 600;
src: src.get($name, SemiBold, $style, $unicode-range, $formats);
src: src.get(
$name,
SemiBold,
$style,
$unicode-range,
$formats,
$package-name
);
unicode-range: unicode.get-range($unicode-range);
}
}
Expand All @@ -128,7 +178,14 @@ $formats: (woff2, woff);
font-family: $font-family;
font-style: $style;
font-weight: 700;
src: src.get($name, Bold, $style, $unicode-range, $formats);
src: src.get(
$name,
Bold,
$style,
$unicode-range,
$formats,
$package-name
);
unicode-range: unicode.get-range($unicode-range);
}
}
Expand Down
25 changes: 17 additions & 8 deletions packages/styles/scss/fonts/_sans-arabic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ $font-family: 'IBM Plex Sans Arabic';
$name: 'IBM-Plex-Sans-Arabic';
$styles: (normal);
$formats: (woff2, woff);
$package-name: 'sans-arabic';

@mixin thin() {
@font-face {
Expand All @@ -23,7 +24,8 @@ $formats: (woff2, woff);
$name: $name,
$weight: Thin,
$style: $styles,
$formats: $formats
$formats: $formats,
$package-name: $package-name
);
}
}
Expand All @@ -38,7 +40,8 @@ $formats: (woff2, woff);
$name: $name,
$weight: ExtraLight,
$style: $styles,
$formats: $formats
$formats: $formats,
$package-name: $package-name
);
}
}
Expand All @@ -53,7 +56,8 @@ $formats: (woff2, woff);
$name: $name,
$weight: Light,
$style: $styles,
$formats: $formats
$formats: $formats,
$package-name: $package-name
);
}
}
Expand All @@ -68,7 +72,8 @@ $formats: (woff2, woff);
$name: $name,
$weight: Regular,
$style: $styles,
$formats: $formats
$formats: $formats,
$package-name: $package-name
);
}
}
Expand All @@ -83,7 +88,8 @@ $formats: (woff2, woff);
$name: $name,
$weight: Text,
$style: $styles,
$formats: $formats
$formats: $formats,
$package-name: $package-name
);
}
}
Expand All @@ -98,7 +104,8 @@ $formats: (woff2, woff);
$name: $name,
$weight: Medium,
$style: $styles,
$formats: $formats
$formats: $formats,
$package-name: $package-name
);
}
}
Expand All @@ -113,7 +120,8 @@ $formats: (woff2, woff);
$name: $name,
$weight: SemiBold,
$style: $styles,
$formats: $formats
$formats: $formats,
$package-name: $package-name
);
}
}
Expand All @@ -128,7 +136,8 @@ $formats: (woff2, woff);
$name: $name,
$weight: Bold,
$style: $styles,
$formats: $formats
$formats: $formats,
$package-name: $package-name
);
}
}
Expand Down
25 changes: 17 additions & 8 deletions packages/styles/scss/fonts/_sans-devanagari.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ $font-family: 'IBM Plex Sans Devanagari';
$name: 'IBM-Plex-Sans-Devanagari';
$styles: (normal);
$formats: (woff2, woff);
$package-name: 'sans-devanagari';

@mixin thin() {
@font-face {
Expand All @@ -23,7 +24,8 @@ $formats: (woff2, woff);
$name: $name,
$weight: Thin,
$style: $styles,
$formats: $formats
$formats: $formats,
$package-name: $package-name
);
}
}
Expand All @@ -38,7 +40,8 @@ $formats: (woff2, woff);
$name: $name,
$weight: ExtraLight,
$style: $styles,
$formats: $formats
$formats: $formats,
$package-name: $package-name
);
}
}
Expand All @@ -53,7 +56,8 @@ $formats: (woff2, woff);
$name: $name,
$weight: Light,
$style: $styles,
$formats: $formats
$formats: $formats,
$package-name: $package-name
);
}
}
Expand All @@ -68,7 +72,8 @@ $formats: (woff2, woff);
$name: $name,
$weight: Regular,
$style: $styles,
$formats: $formats
$formats: $formats,
$package-name: $package-name
);
}
}
Expand All @@ -83,7 +88,8 @@ $formats: (woff2, woff);
$name: $name,
$weight: Text,
$style: $styles,
$formats: $formats
$formats: $formats,
$package-name: $package-name
);
}
}
Expand All @@ -98,7 +104,8 @@ $formats: (woff2, woff);
$name: $name,
$weight: Medium,
$style: $styles,
$formats: $formats
$formats: $formats,
$package-name: $package-name
);
}
}
Expand All @@ -113,7 +120,8 @@ $formats: (woff2, woff);
$name: $name,
$weight: SemiBold,
$style: $styles,
$formats: $formats
$formats: $formats,
$package-name: $package-name
);
}
}
Expand All @@ -128,7 +136,8 @@ $formats: (woff2, woff);
$name: $name,
$weight: Bold,
$style: $styles,
$formats: $formats
$formats: $formats,
$package-name: $package-name
);
}
}
Expand Down
Loading

0 comments on commit efd08bc

Please sign in to comment.