@fontsource/material-symbols-sharp 5.0.0 → 5.0.2

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
@@ -6,7 +6,7 @@ The CSS and web font files to easily self-host the “Material Symbols Sharp”
6
6
 
7
7
  ## Quick Installation
8
8
 
9
- Fontsource has a variety of methods to import CSS, such as using a bundler like Webpack. Alternatively, it supports SASS. Full documentation can be found [here](https://fontsource.org/docs/getting-started/introduction).
9
+ Fontsource offers multiple methods to import the CSS, including using a bundler like Vite or using SASS. You can find full documentation [here](https://fontsource.org/docs/getting-started/introduction).
10
10
 
11
11
  ```javascript
12
12
  npm install @fontsource/material-symbols-sharp
@@ -18,7 +18,6 @@ Within your app entry file or site component, import it in.
18
18
  import "@fontsource/material-symbols-sharp"; // Defaults to weight 400
19
19
  import "@fontsource/material-symbols-sharp/400.css"; // Specify weight
20
20
  import "@fontsource/material-symbols-sharp/400-italic.css"; // Specify weight and style
21
-
22
21
  ```
23
22
 
24
23
  Supported variables:
@@ -26,26 +25,23 @@ Supported variables:
26
25
  - Styles: `[normal]`
27
26
  - Subsets: `[latin]`
28
27
 
28
+ > Note: `italic` may not be supported by all fonts. To learn more about what weights and styles are supported, please visit the [Fontsource website](https://fontsource.org/fonts/material-symbols-sharp).
29
+
29
30
  Finally, you can reference the font name in a CSS stylesheet, CSS Module, or CSS-in-JS.
30
31
 
31
32
  ```css
32
33
  body {
33
- font-family: "Material Symbols Sharp;
34
+ font-family: "Material Symbols Sharp";
34
35
  }
35
36
  ```
36
37
 
37
- ## Variable Fonts
38
-
39
- This particular typeface supports [variable fonts](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide).
40
- Variable documentation can be found [here](https://fontsource.org/docs/getting-started/variable).
41
-
42
38
  ## Licensing
43
- It is important to always read the license for every font that you use.
44
- Most of the fonts in the collection use the SIL Open Font License, v1.1. Some fonts use the Apache 2 license. The Ubuntu fonts use the Ubuntu Font License v1.0.
39
+ Always make sure to read the license for each font you use. Most of the fonts in the collection use the SIL Open Font License, v1.1. Some fonts use the Apache 2 license. The Ubuntu fonts use the Ubuntu Font License v1.0.
45
40
 
46
41
  Copyright 2022, 2022 Google LLC. All Rights Reserved.
47
42
  [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
48
43
 
49
44
  ## Other Notes
50
45
  Font version (provided by source): `v104`.
51
- 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).
46
+
47
+ If you have any suggestions or ideas to improve the performance of font loading or expand the existing library, feel free to star and contribute to this repository. You can share your suggestions or ideas by creating an [issue](https://github.com/fontsource/fontsource/issues).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fontsource/material-symbols-sharp",
3
- "version": "5.0.0",
3
+ "version": "5.0.2",
4
4
  "description": "Self-host the Material Symbols Sharp font in a neatly bundled NPM package.",
5
5
  "main": "index.css",
6
6
  "publishConfig": {"access": "public"},
@@ -25,5 +25,6 @@
25
25
  "type": "git",
26
26
  "url": "https://github.com/fontsource/font-files.git",
27
27
  "directory": "fonts/google/material-symbols-sharp"
28
- }
28
+ },
29
+ "publishHash": "cc75315cd5491b8a"
29
30
  }
package/scss/mixins.scss CHANGED
@@ -30,20 +30,18 @@ $axes: null !default;
30
30
  $styles: $styles,
31
31
  $axes: $axes
32
32
  ) {
33
+ $isVariable: map.get($metadata, axes) != null;
34
+
33
35
  $directory: if(
34
36
  $directory,
35
37
  $directory,
36
- '~@fontsource#{if(map.get($metadata, axes), '-variable', '')}/#{map.get($metadata, id)}/files'
38
+ '~@fontsource#{if($isVariable, '-variable', '')}/#{map.get($metadata, id)}/files'
37
39
  );
38
40
 
39
- $family: if(
40
- $family,
41
- $family,
42
- map.get($metadata, family) + if(map.get($metadata, axes), ' Variable', '')
43
- );
41
+ $family: if($family, $family, map.get($metadata, family) + if($isVariable, ' Variable', ''));
44
42
  $display: if($display, $display, swap);
45
43
  $displayVar: if($displayVar != null, $displayVar, true);
46
- $formats: if(not $formats or $formats == all, (woff2, woff), $formats);
44
+ $formats: if(not $formats or $formats == all, if($isVariable, woff2, (woff2, woff)), $formats);
47
45
  $subsets: if(
48
46
  $subsets,
49
47
  if($subsets == all, map.get($metadata, subsets), $subsets),
@@ -62,25 +60,23 @@ $axes: null !default;
62
60
  $axes: if(
63
61
  $axes,
64
62
  if($axes == all, full, $axes),
65
- if(map.get($metadata, axes), if(map.has-key($metadata, axes, wght), wght, full), null)
63
+ if($isVariable, if(map.has-key($metadata, axes, wght), wght, full), null)
66
64
  );
67
65
 
68
66
  @each $subset in $subsets {
69
67
  @each $unicodeSubset, $unicodeRange in map.get($metadata, unicode) {
70
68
  @if (
71
- $subset ==
72
- $unicodeSubset or
69
+ ($subset == $unicodeSubset) or
73
70
  (
74
71
  // Is numeric subset
75
- $subset ==
76
- map.get($metadata, defaults, subset) and not
72
+ ($subset == map.get($metadata, defaults, subset)) and not
77
73
  list.index(map.get($metadata, subsets), $unicodeSubset)
78
74
  )
79
75
  ) {
80
76
  @each $weight in if($axes, null, $weights) {
81
77
  @each $axis in $axes {
82
78
  @each $style in $styles {
83
- $variant: '#{map.get($metadata, id)}-#{$unicodeSubset}-#{if($axis, $axis, $weight)}-#{$style}';
79
+ $variant: '#{map.get($metadata, id)}-#{if($unicodeSubset, $unicodeSubset, $subset)}-#{if($axis, $axis, $weight)}-#{$style}';
84
80
 
85
81
  $src: ();
86
82
  @each $format in $formats {
@@ -114,18 +110,18 @@ $axes: null !default;
114
110
 
115
111
  font-family: string.quote($family),
116
112
  font-style: if(
117
- ($axis == full or $axis == slnt) and map.has-key($metadata, axes, slnt),
113
+ (($axis == full) or ($axis == slnt)) and map.has-key($metadata, axes, slnt),
118
114
  oblique map.get($metadata, axes, slnt, min) + deg map.get($metadata, axes, slnt, max) + deg,
119
115
  $style
120
116
  ),
121
117
  font-display: if($displayVar, var(--fontsource-display, $display), $display),
122
118
  font-weight: if(
123
- ($axis == full or $axis == wght) and map.has-key($metadata, axes, wght),
119
+ (($axis == full) or ($axis == wght)) and map.has-key($metadata, axes, wght),
124
120
  map.get($metadata, axes, wght, min) map.get($metadata, axes, wght, max),
125
121
  $weight
126
122
  ),
127
123
  font-stretch: if(
128
- ($axis == full or $axis == wdth) and map.has-key($metadata, axes, wdth),
124
+ (($axis == full) or ($axis == wdth)) and map.has-key($metadata, axes, wdth),
129
125
  '#{map.get($metadata, axes, wdth, min)}% #{map.get($metadata, axes, wdth, max)}%',
130
126
  null
131
127
  ),