@fontsource/maven-pro 4.5.13 → 5.0.1

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.
Files changed (64) hide show
  1. package/400.css +15 -13
  2. package/500.css +15 -13
  3. package/600.css +15 -13
  4. package/700.css +15 -13
  5. package/800.css +15 -13
  6. package/900.css +15 -13
  7. package/CHANGELOG.md +1 -2
  8. package/LICENSE +93 -0
  9. package/README.md +11 -12
  10. package/files/maven-pro-latin-400-normal.woff +0 -0
  11. package/files/maven-pro-latin-500-normal.woff +0 -0
  12. package/files/maven-pro-latin-600-normal.woff +0 -0
  13. package/files/maven-pro-latin-700-normal.woff +0 -0
  14. package/files/maven-pro-latin-800-normal.woff +0 -0
  15. package/files/maven-pro-latin-900-normal.woff +0 -0
  16. package/files/maven-pro-latin-ext-400-normal.woff +0 -0
  17. package/files/maven-pro-latin-ext-600-normal.woff +0 -0
  18. package/files/maven-pro-latin-ext-700-normal.woff +0 -0
  19. package/files/maven-pro-latin-ext-800-normal.woff +0 -0
  20. package/files/maven-pro-latin-ext-900-normal.woff +0 -0
  21. package/files/maven-pro-vietnamese-400-normal.woff +0 -0
  22. package/files/maven-pro-vietnamese-500-normal.woff +0 -0
  23. package/files/maven-pro-vietnamese-600-normal.woff +0 -0
  24. package/files/maven-pro-vietnamese-700-normal.woff +0 -0
  25. package/files/maven-pro-vietnamese-800-normal.woff +0 -0
  26. package/files/maven-pro-vietnamese-900-normal.woff +0 -0
  27. package/index.css +15 -13
  28. package/latin-400.css +4 -5
  29. package/latin-500.css +4 -5
  30. package/latin-600.css +4 -5
  31. package/latin-700.css +4 -5
  32. package/latin-800.css +4 -5
  33. package/latin-900.css +4 -5
  34. package/latin-ext-400.css +4 -5
  35. package/latin-ext-500.css +4 -5
  36. package/latin-ext-600.css +4 -5
  37. package/latin-ext-700.css +4 -5
  38. package/latin-ext-800.css +4 -5
  39. package/latin-ext-900.css +4 -5
  40. package/latin-ext.css +24 -25
  41. package/latin.css +24 -25
  42. package/metadata.json +21 -1
  43. package/package.json +30 -1
  44. package/scss/metadata.scss +18 -0
  45. package/scss/mixins.scss +157 -106
  46. package/unicode.json +5 -1
  47. package/vietnamese-400.css +4 -5
  48. package/vietnamese-500.css +4 -5
  49. package/vietnamese-600.css +4 -5
  50. package/vietnamese-700.css +4 -5
  51. package/vietnamese-800.css +4 -5
  52. package/vietnamese-900.css +4 -5
  53. package/vietnamese.css +24 -25
  54. package/files/file-list.json +0 -1
  55. package/files/maven-pro-all-400-normal.woff +0 -0
  56. package/files/maven-pro-all-500-normal.woff +0 -0
  57. package/files/maven-pro-all-600-normal.woff +0 -0
  58. package/files/maven-pro-all-700-normal.woff +0 -0
  59. package/files/maven-pro-all-800-normal.woff +0 -0
  60. package/files/maven-pro-all-900-normal.woff +0 -0
  61. package/files/maven-pro-latin-ext-variable-wghtOnly-normal.woff2 +0 -0
  62. package/files/maven-pro-latin-variable-wghtOnly-normal.woff2 +0 -0
  63. package/files/maven-pro-vietnamese-variable-wghtOnly-normal.woff2 +0 -0
  64. package/variable.css +0 -27
package/latin-ext-500.css CHANGED
@@ -1,9 +1,8 @@
1
- /* maven-pro-latin-ext-500-normal*/
1
+ /* maven-pro-latin-ext-500-normal */
2
2
  @font-face {
3
3
  font-family: 'Maven Pro';
4
4
  font-style: normal;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 500;
7
- src: url('./files/maven-pro-latin-ext-500-normal.woff2') format('woff2'), url('./files/maven-pro-latin-ext-500-normal.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/maven-pro-latin-ext-500-normal.woff2) format('woff2'), url(./files/maven-pro-latin-ext-500-normal.woff) format('woff');
8
+ }
package/latin-ext-600.css CHANGED
@@ -1,9 +1,8 @@
1
- /* maven-pro-latin-ext-600-normal*/
1
+ /* maven-pro-latin-ext-600-normal */
2
2
  @font-face {
3
3
  font-family: 'Maven Pro';
4
4
  font-style: normal;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 600;
7
- src: url('./files/maven-pro-latin-ext-600-normal.woff2') format('woff2'), url('./files/maven-pro-latin-ext-600-normal.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/maven-pro-latin-ext-600-normal.woff2) format('woff2'), url(./files/maven-pro-latin-ext-600-normal.woff) format('woff');
8
+ }
package/latin-ext-700.css CHANGED
@@ -1,9 +1,8 @@
1
- /* maven-pro-latin-ext-700-normal*/
1
+ /* maven-pro-latin-ext-700-normal */
2
2
  @font-face {
3
3
  font-family: 'Maven Pro';
4
4
  font-style: normal;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 700;
7
- src: url('./files/maven-pro-latin-ext-700-normal.woff2') format('woff2'), url('./files/maven-pro-latin-ext-700-normal.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/maven-pro-latin-ext-700-normal.woff2) format('woff2'), url(./files/maven-pro-latin-ext-700-normal.woff) format('woff');
8
+ }
package/latin-ext-800.css CHANGED
@@ -1,9 +1,8 @@
1
- /* maven-pro-latin-ext-800-normal*/
1
+ /* maven-pro-latin-ext-800-normal */
2
2
  @font-face {
3
3
  font-family: 'Maven Pro';
4
4
  font-style: normal;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 800;
7
- src: url('./files/maven-pro-latin-ext-800-normal.woff2') format('woff2'), url('./files/maven-pro-latin-ext-800-normal.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/maven-pro-latin-ext-800-normal.woff2) format('woff2'), url(./files/maven-pro-latin-ext-800-normal.woff) format('woff');
8
+ }
package/latin-ext-900.css CHANGED
@@ -1,9 +1,8 @@
1
- /* maven-pro-latin-ext-900-normal*/
1
+ /* maven-pro-latin-ext-900-normal */
2
2
  @font-face {
3
3
  font-family: 'Maven Pro';
4
4
  font-style: normal;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 900;
7
- src: url('./files/maven-pro-latin-ext-900-normal.woff2') format('woff2'), url('./files/maven-pro-latin-ext-900-normal.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/maven-pro-latin-ext-900-normal.woff2) format('woff2'), url(./files/maven-pro-latin-ext-900-normal.woff) format('woff');
8
+ }
package/latin-ext.css CHANGED
@@ -1,54 +1,53 @@
1
- /* maven-pro-latin-ext-400-normal*/
1
+ /* maven-pro-latin-ext-400-normal */
2
2
  @font-face {
3
3
  font-family: 'Maven Pro';
4
4
  font-style: normal;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 400;
7
- src: url('./files/maven-pro-latin-ext-400-normal.woff2') format('woff2'), url('./files/maven-pro-latin-ext-400-normal.woff') format('woff');
8
-
7
+ src: url(./files/maven-pro-latin-ext-400-normal.woff2) format('woff2'), url(./files/maven-pro-latin-ext-400-normal.woff) format('woff');
9
8
  }
10
- /* maven-pro-latin-ext-500-normal*/
9
+
10
+ /* maven-pro-latin-ext-500-normal */
11
11
  @font-face {
12
12
  font-family: 'Maven Pro';
13
13
  font-style: normal;
14
- font-display: swap;
14
+ font-display: var(--fontsource-display, swap);
15
15
  font-weight: 500;
16
- src: url('./files/maven-pro-latin-ext-500-normal.woff2') format('woff2'), url('./files/maven-pro-latin-ext-500-normal.woff') format('woff');
17
-
16
+ src: url(./files/maven-pro-latin-ext-500-normal.woff2) format('woff2'), url(./files/maven-pro-latin-ext-500-normal.woff) format('woff');
18
17
  }
19
- /* maven-pro-latin-ext-600-normal*/
18
+
19
+ /* maven-pro-latin-ext-600-normal */
20
20
  @font-face {
21
21
  font-family: 'Maven Pro';
22
22
  font-style: normal;
23
- font-display: swap;
23
+ font-display: var(--fontsource-display, swap);
24
24
  font-weight: 600;
25
- src: url('./files/maven-pro-latin-ext-600-normal.woff2') format('woff2'), url('./files/maven-pro-latin-ext-600-normal.woff') format('woff');
26
-
25
+ src: url(./files/maven-pro-latin-ext-600-normal.woff2) format('woff2'), url(./files/maven-pro-latin-ext-600-normal.woff) format('woff');
27
26
  }
28
- /* maven-pro-latin-ext-700-normal*/
27
+
28
+ /* maven-pro-latin-ext-700-normal */
29
29
  @font-face {
30
30
  font-family: 'Maven Pro';
31
31
  font-style: normal;
32
- font-display: swap;
32
+ font-display: var(--fontsource-display, swap);
33
33
  font-weight: 700;
34
- src: url('./files/maven-pro-latin-ext-700-normal.woff2') format('woff2'), url('./files/maven-pro-latin-ext-700-normal.woff') format('woff');
35
-
34
+ src: url(./files/maven-pro-latin-ext-700-normal.woff2) format('woff2'), url(./files/maven-pro-latin-ext-700-normal.woff) format('woff');
36
35
  }
37
- /* maven-pro-latin-ext-800-normal*/
36
+
37
+ /* maven-pro-latin-ext-800-normal */
38
38
  @font-face {
39
39
  font-family: 'Maven Pro';
40
40
  font-style: normal;
41
- font-display: swap;
41
+ font-display: var(--fontsource-display, swap);
42
42
  font-weight: 800;
43
- src: url('./files/maven-pro-latin-ext-800-normal.woff2') format('woff2'), url('./files/maven-pro-latin-ext-800-normal.woff') format('woff');
44
-
43
+ src: url(./files/maven-pro-latin-ext-800-normal.woff2) format('woff2'), url(./files/maven-pro-latin-ext-800-normal.woff) format('woff');
45
44
  }
46
- /* maven-pro-latin-ext-900-normal*/
45
+
46
+ /* maven-pro-latin-ext-900-normal */
47
47
  @font-face {
48
48
  font-family: 'Maven Pro';
49
49
  font-style: normal;
50
- font-display: swap;
50
+ font-display: var(--fontsource-display, swap);
51
51
  font-weight: 900;
52
- src: url('./files/maven-pro-latin-ext-900-normal.woff2') format('woff2'), url('./files/maven-pro-latin-ext-900-normal.woff') format('woff');
53
-
54
- }
52
+ src: url(./files/maven-pro-latin-ext-900-normal.woff2) format('woff2'), url(./files/maven-pro-latin-ext-900-normal.woff) format('woff');
53
+ }
package/latin.css CHANGED
@@ -1,54 +1,53 @@
1
- /* maven-pro-latin-400-normal*/
1
+ /* maven-pro-latin-400-normal */
2
2
  @font-face {
3
3
  font-family: 'Maven Pro';
4
4
  font-style: normal;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 400;
7
- src: url('./files/maven-pro-latin-400-normal.woff2') format('woff2'), url('./files/maven-pro-latin-400-normal.woff') format('woff');
8
-
7
+ src: url(./files/maven-pro-latin-400-normal.woff2) format('woff2'), url(./files/maven-pro-latin-400-normal.woff) format('woff');
9
8
  }
10
- /* maven-pro-latin-500-normal*/
9
+
10
+ /* maven-pro-latin-500-normal */
11
11
  @font-face {
12
12
  font-family: 'Maven Pro';
13
13
  font-style: normal;
14
- font-display: swap;
14
+ font-display: var(--fontsource-display, swap);
15
15
  font-weight: 500;
16
- src: url('./files/maven-pro-latin-500-normal.woff2') format('woff2'), url('./files/maven-pro-latin-500-normal.woff') format('woff');
17
-
16
+ src: url(./files/maven-pro-latin-500-normal.woff2) format('woff2'), url(./files/maven-pro-latin-500-normal.woff) format('woff');
18
17
  }
19
- /* maven-pro-latin-600-normal*/
18
+
19
+ /* maven-pro-latin-600-normal */
20
20
  @font-face {
21
21
  font-family: 'Maven Pro';
22
22
  font-style: normal;
23
- font-display: swap;
23
+ font-display: var(--fontsource-display, swap);
24
24
  font-weight: 600;
25
- src: url('./files/maven-pro-latin-600-normal.woff2') format('woff2'), url('./files/maven-pro-latin-600-normal.woff') format('woff');
26
-
25
+ src: url(./files/maven-pro-latin-600-normal.woff2) format('woff2'), url(./files/maven-pro-latin-600-normal.woff) format('woff');
27
26
  }
28
- /* maven-pro-latin-700-normal*/
27
+
28
+ /* maven-pro-latin-700-normal */
29
29
  @font-face {
30
30
  font-family: 'Maven Pro';
31
31
  font-style: normal;
32
- font-display: swap;
32
+ font-display: var(--fontsource-display, swap);
33
33
  font-weight: 700;
34
- src: url('./files/maven-pro-latin-700-normal.woff2') format('woff2'), url('./files/maven-pro-latin-700-normal.woff') format('woff');
35
-
34
+ src: url(./files/maven-pro-latin-700-normal.woff2) format('woff2'), url(./files/maven-pro-latin-700-normal.woff) format('woff');
36
35
  }
37
- /* maven-pro-latin-800-normal*/
36
+
37
+ /* maven-pro-latin-800-normal */
38
38
  @font-face {
39
39
  font-family: 'Maven Pro';
40
40
  font-style: normal;
41
- font-display: swap;
41
+ font-display: var(--fontsource-display, swap);
42
42
  font-weight: 800;
43
- src: url('./files/maven-pro-latin-800-normal.woff2') format('woff2'), url('./files/maven-pro-latin-800-normal.woff') format('woff');
44
-
43
+ src: url(./files/maven-pro-latin-800-normal.woff2) format('woff2'), url(./files/maven-pro-latin-800-normal.woff) format('woff');
45
44
  }
46
- /* maven-pro-latin-900-normal*/
45
+
46
+ /* maven-pro-latin-900-normal */
47
47
  @font-face {
48
48
  font-family: 'Maven Pro';
49
49
  font-style: normal;
50
- font-display: swap;
50
+ font-display: var(--fontsource-display, swap);
51
51
  font-weight: 900;
52
- src: url('./files/maven-pro-latin-900-normal.woff2') format('woff2'), url('./files/maven-pro-latin-900-normal.woff') format('woff');
53
-
54
- }
52
+ src: url(./files/maven-pro-latin-900-normal.woff2) format('woff2'), url(./files/maven-pro-latin-900-normal.woff) format('woff');
53
+ }
package/metadata.json CHANGED
@@ -1 +1,21 @@
1
- {"fontId":"maven-pro","fontName":"Maven Pro","subsets":["latin","latin-ext","vietnamese"],"weights":[400,500,600,700,800,900],"styles":["normal"],"defSubset":"latin","variable":{"wght":{"default":"400","min":"400","max":"900","step":"1"}},"lastModified":"2022-09-22","version":"v32","category":"sans-serif","source":"https://fonts.google.com/","license":"https://fonts.google.com/attribution","type":"google"}
1
+ {
2
+ "id": "maven-pro",
3
+ "family": "Maven Pro",
4
+ "subsets": ["latin", "latin-ext", "vietnamese"],
5
+ "weights": [400, 500, 600, 700, 800, 900],
6
+ "styles": ["normal"],
7
+ "defSubset": "latin",
8
+ "variable": {
9
+ "wght": {"default": "400", "min": "400", "max": "900", "step": "1"}
10
+ },
11
+ "lastModified": "2022-09-22",
12
+ "version": "v32",
13
+ "category": "sans-serif",
14
+ "license": {
15
+ "type": "OFL-1.1",
16
+ "url": "http://scripts.sil.org/OFL",
17
+ "attribution": "Copyright 2011 The Maven Pro Project Authors (http://www.vissol.co.uk/mavenpro/), with Reserved Font Name \"Maven Pro\"."
18
+ },
19
+ "source": "https://github.com/google/fonts",
20
+ "type": "google"
21
+ }
package/package.json CHANGED
@@ -1 +1,30 @@
1
- {"name":"@fontsource/maven-pro","version":"4.5.13","description":"Self-host the Maven Pro font in a neatly bundled NPM package.","main":"index.css","publishConfig":{"access":"public"},"keywords":["fontsource","font","font family","google fonts","Maven Pro","maven-pro"],"author":"Lotus <declininglotus@gmail.com>","license":"MIT","homepage":"https://github.com/fontsource/fontsource/tree/main/fonts/google/maven-pro#readme","repository":{"type":"git","url":"https://github.com/fontsource/fontsource.git","directory":"fonts/google/maven-pro"}}
1
+ {
2
+ "name": "@fontsource/maven-pro",
3
+ "version": "5.0.1",
4
+ "description": "Self-host the Maven Pro font in a neatly bundled NPM package.",
5
+ "main": "index.css",
6
+ "publishConfig": {"access": "public"},
7
+ "keywords": [
8
+ "fontsource",
9
+ "font",
10
+ "font family",
11
+ "google fonts",
12
+ "maven-pro",
13
+ "Maven Pro",
14
+ "css",
15
+ "sass",
16
+ "front-end",
17
+ "web",
18
+ "typeface",
19
+ "variable"
20
+ ],
21
+ "author": "Google Inc.",
22
+ "license": "OFL-1.1",
23
+ "homepage": "https://fontsource.org/fonts/maven-pro",
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "https://github.com/fontsource/font-files.git",
27
+ "directory": "fonts/google/maven-pro"
28
+ },
29
+ "publishHash": "fac9b67d367deb85"
30
+ }
@@ -0,0 +1,18 @@
1
+ $id: 'maven-pro' !default;
2
+ $family: 'Maven Pro' !default;
3
+ $category: sans-serif !default;
4
+ $subsets: (latin, latin-ext, vietnamese) !default;
5
+ $weights: (400, 500, 600, 700, 800, 900) !default;
6
+ $styles: (normal) !default;
7
+ $axes: null !default;
8
+ $defaults: (
9
+ subset: latin,
10
+ weight: 400,
11
+ style: normal,
12
+ axis: null,
13
+ ) !default;
14
+ $unicode: (
15
+ vietnamese: (U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB),
16
+ latin-ext: (U+0100-02AF,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF),
17
+ latin: (U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD),
18
+ ) !default;
package/scss/mixins.scss CHANGED
@@ -1,124 +1,175 @@
1
- $fontName: "Maven Pro";
2
- $fontId: "maven-pro";
3
- $style: normal;
4
- $display: swap;
5
- $weight: 400;
6
- $fontDir: "~@fontsource/#{$fontId}/files";
7
- $unicodeMap: (vietnamese: (U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB), latin-ext: (U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF), latin: (U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD));
1
+ @use 'sass:list';
2
+ @use 'sass:map';
3
+ @use 'sass:math';
4
+ @use 'sass:meta';
5
+ @use 'sass:string';
8
6
 
9
- @mixin fontFace(
10
- $fontName: $fontName,
11
- $fontId: $fontId,
12
- $style: $style,
13
- $display: $display,
14
- $weight: $weight,
15
- $fontDir: $fontDir,
16
- $unicodeMap: $unicodeMap
17
- ) {
18
- @each $subset, $unicodeRangeValues in $unicodeMap {
19
- @font-face {
20
- font-family: "#{$fontName}";
21
- font-style: $style;
22
- font-display: $display;
23
- font-weight: $weight;
24
- src: url("#{$fontDir}/#{$fontId}-#{$subset}-#{$weight}-#{$style}.woff2") format("woff2"),
25
- url("#{$fontDir}/#{$fontId}-all-#{$weight}-#{$style}.woff") format("woff");
26
- unicode-range: $unicodeRangeValues;
27
- }
28
- }
29
- }
7
+ @use 'metadata';
30
8
 
31
- $defSubset: "latin";
32
- $unicodeRange: false;
33
- $unicodeRangeValues: (U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD);
9
+ $metadata: meta.module-variables(metadata) !default;
10
+ $directory: null !default;
34
11
 
35
- @mixin fontFaceCustom(
36
- $fontName: $fontName,
37
- $fontId: $fontId,
38
- $style: $style,
12
+ $family: null !default;
13
+ $display: null !default;
14
+ $displayVar: null !default;
15
+ $formats: null !default;
16
+ $subsets: null !default;
17
+ $weights: null !default;
18
+ $styles: null !default;
19
+ $axes: null !default;
20
+
21
+ @mixin generator(
22
+ $metadata: $metadata,
23
+ $directory: $directory,
24
+ $family: $family,
39
25
  $display: $display,
40
- $weight: $weight,
41
- $woff2Path: null,
42
- $woffPath: null,
43
- $unicodeRange: $unicodeRange,
44
- $unicodeRangeValues: $unicodeRangeValues
26
+ $displayVar: $displayVar,
27
+ $formats: $formats,
28
+ $subsets: $subsets,
29
+ $weights: $weights,
30
+ $styles: $styles,
31
+ $axes: $axes
45
32
  ) {
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
- }
33
+ $isVariable: map.get($metadata, axes) != null;
52
34
 
53
- @font-face {
54
- font-family: "#{$fontName}";
55
- font-style: $style;
56
- font-display: $display;
57
- font-weight: $weight;
58
- src: url("#{$woff2Path}") format("woff2"), url("#{$woffPath}") format("woff");
59
- @if $unicodeRange {
60
- unicode-range: $unicodeRangeValues;
61
- }
62
- }
63
- }
35
+ $directory: if(
36
+ $directory,
37
+ $directory,
38
+ '~@fontsource#{if($isVariable, '-variable', '')}/#{map.get($metadata, id)}/files'
39
+ );
64
40
 
65
- $fontNameVariable: "Maven ProVariable";
66
- $weightVariable: 400 900;
67
- $type: "wghtOnly";
68
- $stretch: null;
41
+ $family: if($family, $family, map.get($metadata, family) + if($isVariable, ' Variable', ''));
42
+ $display: if($display, $display, swap);
43
+ $displayVar: if($displayVar != null, $displayVar, true);
44
+ $formats: if(not $formats or $formats == all, if($isVariable, woff2, (woff2, woff)), $formats);
45
+ $subsets: if(
46
+ $subsets,
47
+ if($subsets == all, map.get($metadata, subsets), $subsets),
48
+ map.get($metadata, defaults, subset)
49
+ );
50
+ $weights: if(
51
+ $weights,
52
+ if($weights == all, map.get($metadata, weights), $weights),
53
+ map.get($metadata, defaults, weight)
54
+ );
55
+ $styles: if(
56
+ $styles,
57
+ if($styles == all, map.get($metadata, styles), $styles),
58
+ map.get($metadata, defaults, style)
59
+ );
60
+ $axes: if(
61
+ $axes,
62
+ if($axes == all, full, $axes),
63
+ if($isVariable, if(map.has-key($metadata, axes, wght), wght, full), null)
64
+ );
69
65
 
70
- @mixin fontFaceVariable(
71
- $fontName: $fontNameVariable,
72
- $fontId: $fontId,
73
- $style: $style,
74
- $display: $display,
75
- $weight: $weightVariable,
76
- $fontDir: $fontDir,
77
- $type: $type,
78
- $stretch: $stretch,
79
- $unicodeMap: $unicodeMap
80
- ) {
81
- @each $subset, $unicodeRangeValues in $unicodeMap {
82
- @font-face {
83
- font-family: "#{$fontName}";
84
- font-style: $style;
85
- font-display: $display;
86
- font-weight: $weight;
87
- @if $type == "full" {
88
- font-stretch: $stretch;
66
+ @each $subset in $subsets {
67
+ @each $unicodeSubset, $unicodeRange in map.get($metadata, unicode) {
68
+ @if (
69
+ ($subset == $unicodeSubset) or
70
+ (
71
+ // Is numeric subset
72
+ ($subset == map.get($metadata, defaults, subset)) and not
73
+ list.index(map.get($metadata, subsets), $unicodeSubset)
74
+ )
75
+ ) {
76
+ @each $weight in if($axes, null, $weights) {
77
+ @each $axis in $axes {
78
+ @each $style in $styles {
79
+ $variant: '#{map.get($metadata, id)}-#{if($unicodeSubset, $unicodeSubset, $subset)}-#{if($axis, $axis, $weight)}-#{$style}';
80
+
81
+ $src: ();
82
+ @each $format in $formats {
83
+ $src: append(
84
+ $src,
85
+ url('#{$directory}/#{$variant}.#{$format}')
86
+ format('#{$format}#{if($axis, '-variations', '')}'),
87
+ comma
88
+ );
89
+ }
90
+
91
+ @content ((
92
+ metadata: $metadata,
93
+ directory: $directory,
94
+ family: $family,
95
+ display: $display,
96
+ displayVar: $displayVar,
97
+ formats: $formats,
98
+ subsets: $subsets,
99
+ weights: $weights,
100
+ styles: $styles,
101
+ axes: $axes,
102
+
103
+ variant: $variant,
104
+ subset: $subset,
105
+ unicodeSubset: $unicodeSubset,
106
+ unicodeRange: $unicodeRange,
107
+ weight: $weight,
108
+ axis: $axis,
109
+ style: $style,
110
+
111
+ font-family: string.quote($family),
112
+ font-style: if(
113
+ (($axis == full) or ($axis == slnt)) and map.has-key($metadata, axes, slnt),
114
+ oblique map.get($metadata, axes, slnt, min) + deg map.get($metadata, axes, slnt, max) + deg,
115
+ $style
116
+ ),
117
+ font-display: if($displayVar, var(--fontsource-display, $display), $display),
118
+ font-weight: if(
119
+ (($axis == full) or ($axis == wght)) and map.has-key($metadata, axes, wght),
120
+ map.get($metadata, axes, wght, min) map.get($metadata, axes, wght, max),
121
+ $weight
122
+ ),
123
+ font-stretch: if(
124
+ (($axis == full) or ($axis == wdth)) and map.has-key($metadata, axes, wdth),
125
+ '#{map.get($metadata, axes, wdth, min)}% #{map.get($metadata, axes, wdth, max)}%',
126
+ null
127
+ ),
128
+ src: $src,
129
+ unicode-range: $unicodeRange,
130
+ ));
131
+ }
132
+ }
133
+ }
89
134
  }
90
- src: url("#{$fontDir}/#{$fontId}-#{$subset}-variable-#{$type}-#{$style}.woff2") format("woff2");
91
- unicode-range: $unicodeRangeValues;
92
135
  }
93
136
  }
94
137
  }
95
138
 
96
- @mixin fontFaceVariableCustom(
97
- $fontName: $fontNameVariable,
98
- $fontId: $fontId,
99
- $style: $style,
139
+ @mixin faces(
140
+ $metadata: $metadata,
141
+ $directory: $directory,
142
+ $family: $family,
100
143
  $display: $display,
101
- $weight: $weightVariable,
102
- $type: $type,
103
- $woff2Path: null,
104
- $unicodeRange: $unicodeRange,
105
- $unicodeRangeValues: $unicodeRangeValues
144
+ $displayVar: $displayVar,
145
+ $formats: $formats,
146
+ $subsets: $subsets,
147
+ $weights: $weights,
148
+ $styles: $styles,
149
+ $axes: $axes
106
150
  ) {
107
- @if $woff2Path == null {
108
- $woff2Path: "#{$fontDir}/#{$fontId}-#{$defSubset}-variable-#{$type}-#{$style}.woff2";
109
- }
110
-
111
- @font-face {
112
- font-family: "#{$fontName}";
113
- font-style: $style;
114
- font-display: $display;
115
- font-weight: $weight;
116
- @if $type == "full" {
117
- font-stretch: $stretch;
118
- }
119
- src: url("#{$woff2Path}") format("woff2");
120
- @if $unicodeRange {
121
- unicode-range: $unicodeRangeValues;
151
+ @include generator(
152
+ $metadata: $metadata,
153
+ $directory: $directory,
154
+ $family: $family,
155
+ $display: $display,
156
+ $displayVar: $displayVar,
157
+ $formats: $formats,
158
+ $subsets: $subsets,
159
+ $weights: $weights,
160
+ $styles: $styles,
161
+ $axes: $axes
162
+ )
163
+ using ($props) {
164
+ /* #{map.get($props, variant)} */
165
+ @font-face {
166
+ font-family: map.get($props, font-family);
167
+ font-style: map.get($props, font-style);
168
+ font-display: map.get($props, font-display);
169
+ font-weight: map.get($props, font-weight);
170
+ font-stretch: map.get($props, font-stretch);
171
+ unicode-range: map.get($props, unicode-range);
172
+ src: map.get($props, src);
122
173
  }
123
174
  }
124
175
  }
package/unicode.json CHANGED
@@ -1 +1,5 @@
1
- {"vietnamese":"U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB","latin-ext":"U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF","latin":"U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD"}
1
+ {
2
+ "vietnamese": "U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB",
3
+ "latin-ext": "U+0100-02AF,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF",
4
+ "latin": "U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD"
5
+ }
@@ -1,9 +1,8 @@
1
- /* maven-pro-vietnamese-400-normal*/
1
+ /* maven-pro-vietnamese-400-normal */
2
2
  @font-face {
3
3
  font-family: 'Maven Pro';
4
4
  font-style: normal;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 400;
7
- src: url('./files/maven-pro-vietnamese-400-normal.woff2') format('woff2'), url('./files/maven-pro-vietnamese-400-normal.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/maven-pro-vietnamese-400-normal.woff2) format('woff2'), url(./files/maven-pro-vietnamese-400-normal.woff) format('woff');
8
+ }
@@ -1,9 +1,8 @@
1
- /* maven-pro-vietnamese-500-normal*/
1
+ /* maven-pro-vietnamese-500-normal */
2
2
  @font-face {
3
3
  font-family: 'Maven Pro';
4
4
  font-style: normal;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 500;
7
- src: url('./files/maven-pro-vietnamese-500-normal.woff2') format('woff2'), url('./files/maven-pro-vietnamese-500-normal.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/maven-pro-vietnamese-500-normal.woff2) format('woff2'), url(./files/maven-pro-vietnamese-500-normal.woff) format('woff');
8
+ }
@@ -1,9 +1,8 @@
1
- /* maven-pro-vietnamese-600-normal*/
1
+ /* maven-pro-vietnamese-600-normal */
2
2
  @font-face {
3
3
  font-family: 'Maven Pro';
4
4
  font-style: normal;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 600;
7
- src: url('./files/maven-pro-vietnamese-600-normal.woff2') format('woff2'), url('./files/maven-pro-vietnamese-600-normal.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/maven-pro-vietnamese-600-normal.woff2) format('woff2'), url(./files/maven-pro-vietnamese-600-normal.woff) format('woff');
8
+ }