google-fonts-css2
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "google-fonts-css2", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "A helper package to interact with google fonts API.", |
@@ -32,3 +32,3 @@ # Google Fonts CSS2 | ||
- Wonkiness - `WONK` | ||
- | ||
[https://developers.google.com/fonts/docs/css2](https://developers.google.com/fonts/docs/css2) | ||
@@ -38,3 +38,2 @@ [https://fonts.google.com/variablefonts](https://fonts.google.com/variablefonts) | ||
## Usage: | ||
@@ -48,28 +47,29 @@ ```javascript | ||
let url = assembleCommon([ | ||
{ | ||
family: "Cabin", //Family Name | ||
styles: [ | ||
"600..700", //Range, if family supports it. | ||
"100..200italic", //Range with italic | ||
"300italic", //Weight with italic | ||
"regular", // Shortcut to 400 | ||
"italic", //Shortcut to 400 Italic | ||
"500", //regular with weight | ||
444 //regular weight for variable font | ||
] | ||
}, | ||
{ | ||
family: "Roboto", //Family Name - Roboto doesn't support ranges | ||
styles: [ | ||
"300italic", //Weight with italic | ||
"regular", // Shortcut to 400 | ||
"italic", //Shortcut to 400 Italic | ||
"500", | ||
100 | ||
] | ||
}, | ||
], 'swap') //display style | ||
let url = assembleCommon([ | ||
{ | ||
family: "Cabin", // Family Name | ||
styles: [ | ||
"600..700", // Range, if family supports it. | ||
"100..200italic", // Range with italic | ||
"300italic", // Weight with italic | ||
"regular", // Shortcut to 400 | ||
"italic", // Shortcut to 400 Italic | ||
"500", // Regular with weight | ||
444 // Regular weight for variable font | ||
] | ||
}, | ||
{ | ||
family: "Roboto", // Family Name - Roboto doesn't support ranges | ||
styles: [ | ||
"300italic", // Weight with italic | ||
"regular", // Shortcut to 400 | ||
"italic", // Shortcut to 400 Italic | ||
"500", | ||
100 | ||
] | ||
}, | ||
], 'swap') // Display Style | ||
//The output will be: | ||
// The output will be: | ||
"https://fonts.googleapis.com/css2?family=Cabin:ital,wght@0,400;0,444;0,500;0,600..700;1,100..200;1,300;1,400;1,600..700&family=Roboto:ital,wght@0,100;0,400;0,500;1,300;1,400&display=auto" | ||
@@ -76,0 +76,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14370