@fontsource/m-plus-2 4.5.0 → 4.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -47,6 +47,6 @@ Most of the fonts in the collection use the SIL Open Font License, v1.1. Some fo
47
47
 
48
48
  ## Other Notes
49
49
 
50
- Font version (provided by source): `v1`.
50
+ Font version (provided by source): `v4`.
51
51
 
52
52
  Feel free to star and contribute new ideas to this repository that aim to improve the performance of font loading, as well as expanding the existing library we already have. Any suggestions or ideas can be voiced via an [issue](https://github.com/fontsource/fontsource/issues).
package/metadata.json CHANGED
@@ -5,11 +5,9 @@
5
5
  "weights": [100, 200, 300, 400, 500, 600, 700, 800, 900],
6
6
  "styles": ["normal"],
7
7
  "defSubset": "latin",
8
- "variable": {
9
- "wght": { "default": "400", "min": "100", "max": "900", "step": "1" }
10
- },
11
- "lastModified": "2021-11-10",
12
- "version": "v1",
8
+ "variable": { "wght": { "default": "400", "min": "100", "max": "900", "step": "1" } },
9
+ "lastModified": "2022-02-03",
10
+ "version": "v4",
13
11
  "category": "sans-serif",
14
12
  "source": "https://fonts.google.com/",
15
13
  "license": "https://fonts.google.com/attribution",
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@fontsource/m-plus-2","version":"4.5.0","description":"Self-host the M PLUS 2 font in a neatly bundled NPM package.","main":"index.css","publishConfig":{"access":"public"},"keywords":["fontsource","font","font family","google fonts","M PLUS 2","m-plus-2","css","sass","front-end","web","typeface"],"author":"Lotus <declininglotus@gmail.com>","license":"MIT","homepage":"https://github.com/fontsource/fontsource/tree/master/packages/m-plus-2#readme","repository":{"type":"git","url":"https://github.com/fontsource/fontsource.git","directory":"packages/m-plus-2"}}
1
+ {"name":"@fontsource/m-plus-2","version":"4.5.4","description":"Self-host the M PLUS 2 font in a neatly bundled NPM package.","main":"index.css","publishConfig":{"access":"public"},"keywords":["fontsource","font","font family","google fonts","M PLUS 2","m-plus-2","css","sass","front-end","web","typeface"],"author":"Lotus <declininglotus@gmail.com>","license":"MIT","homepage":"https://github.com/fontsource/fontsource/tree/master/packages/m-plus-2#readme","repository":{"type":"git","url":"https://github.com/fontsource/fontsource.git","directory":"packages/m-plus-2"}}
package/scss/mixins.scss CHANGED
@@ -29,8 +29,6 @@ $unicodeMap: (0: (U+25ee8, U+25f23, U+25f5c, U+25fd4, U+25fe0, U+25ffb, U+2600c,
29
29
  }
30
30
 
31
31
  $defSubset: "latin";
32
- $woff2Path: "#{$fontDir}/#{$fontId}-#{$defSubset}-#{$weight}-#{$style}.woff2";
33
- $woffPath: "#{$fontDir}/#{$fontId}-#{$defSubset}-#{$weight}-#{$style}.woff";
34
32
  $unicodeRange: false;
35
33
  $unicodeRangeValues: ();
36
34
 
@@ -40,11 +38,18 @@ $unicodeRangeValues: ();
40
38
  $style: $style,
41
39
  $display: $display,
42
40
  $weight: $weight,
43
- $woff2Path: $woff2Path,
44
- $woffPath: $woffPath,
41
+ $woff2Path: null,
42
+ $woffPath: null,
45
43
  $unicodeRange: $unicodeRange,
46
44
  $unicodeRangeValues: $unicodeRangeValues
47
45
  ) {
46
+ @if $woffPath == null {
47
+ $woffPath: "#{$fontDir}/#{$fontId}-#{$defSubset}-#{$weight}-#{$style}.woff";
48
+ }
49
+ @if $woff2Path == null {
50
+ $woff2Path: "#{$fontDir}/#{$fontId}-#{$defSubset}-#{$weight}-#{$style}.woff2";
51
+ }
52
+
48
53
  @font-face {
49
54
  font-family: "#{$fontName}";
50
55
  font-style: $style;
@@ -57,17 +62,17 @@ $unicodeRangeValues: ();
57
62
  }
58
63
  }
59
64
 
60
- $fontName: "M PLUS 2Variable";
61
- $weight: 100 900;
65
+ $fontNameVariable: "M PLUS 2Variable";
66
+ $weightVariable: 100 900;
62
67
  $type: "wghtOnly";
63
68
  $stretch: null;
64
-
69
+
65
70
  @mixin fontFaceVariable(
66
- $fontName: $fontName,
71
+ $fontName: $fontNameVariable,
67
72
  $fontId: $fontId,
68
73
  $style: $style,
69
74
  $display: $display,
70
- $weight: $weight,
75
+ $weight: $weightVariable,
71
76
  $fontDir: $fontDir,
72
77
  $type: $type,
73
78
  $stretch: $stretch,
@@ -88,18 +93,20 @@ $stretch: null;
88
93
  }
89
94
  }
90
95
 
91
- $woff2Path: "#{$fontDir}/#{$fontId}-#{$defSubset}-variable-#{$type}-#{$style}.woff2";
92
-
93
96
  @mixin fontFaceVariableCustom(
94
- $fontName: $fontName,
97
+ $fontName: $fontNameVariable,
95
98
  $fontId: $fontId,
96
99
  $style: $style,
97
100
  $display: $display,
98
- $weight: $weight,
99
- $woff2Path: $woff2Path,
101
+ $weight: $weightVariable,
102
+ $woff2Path: null,
100
103
  $unicodeRange: $unicodeRange,
101
104
  $unicodeRangeValues: $unicodeRangeValues
102
105
  ) {
106
+ @if $woff2Path == null {
107
+ $woff2Path: "#{$fontDir}/#{$fontId}-#{$defSubset}-variable-#{$type}-#{$style}.woff2";
108
+ }
109
+
103
110
  @font-face {
104
111
  font-family: "#{$fontName}";
105
112
  font-style: $style;