Skip to content

Commit

Permalink
fix(fonts): avoid referencing split woff files (#899)
Browse files Browse the repository at this point in the history
Porting IBM/plex#160.
Fixes #665.
Refs carbon-design-system/carbon-components-react#925.
  • Loading branch information
asudoh authored and tw15egan committed Jun 22, 2018
1 parent f6cec12 commit ac6ed4c
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 2 deletions.
Binary file added src/globals/fonts/IBMPlexMono-Light.woff
Binary file not shown.
Binary file added src/globals/fonts/IBMPlexMono-Regular.woff
Binary file not shown.
Binary file added src/globals/fonts/IBMPlexMono-SemiBold.woff
Binary file not shown.
Binary file added src/globals/fonts/IBMPlexSans-Light.woff
Binary file not shown.
Binary file added src/globals/fonts/IBMPlexSans-Regular.woff
Binary file not shown.
Binary file added src/globals/fonts/IBMPlexSans-SemiBold.woff
Binary file not shown.
10 changes: 8 additions & 2 deletions src/globals/scss/_css--plex-core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,19 @@ $weights: (
@mixin plex-font-face {
@each $family, $name in $families {
@each $weight, $styles in $weights {
@font-face {
font-family: $name;
font-style: map-get($styles, "font-style");
font-weight: map-get($styles, "font-weight");
src: url('#{$font-path}/IBMPlex#{$family}-#{$weight}.woff') format('woff');
}

@each $unicode, $range in $unicodes {
@font-face {
font-family: $name;
font-style: map-get($styles, "font-style");
font-weight: map-get($styles, "font-weight");
src: url('#{$font-path}/IBMPlex#{$family}-#{$weight}-#{$unicode}.woff2') format('woff2'),
url('#{$font-path}/IBMPlex#{$family}-#{$weight}-#{$unicode}.woff') format('woff');
src: url('#{$font-path}/IBMPlex#{$family}-#{$weight}-#{$unicode}.woff2') format('woff2');
unicode-range: map-get($unicodes, $unicode);
}
}
Expand Down

0 comments on commit ac6ed4c

Please sign in to comment.