@fontsource/genos 4.5.11 → 5.0.0

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 (280) hide show
  1. package/100-italic.css +19 -16
  2. package/100.css +19 -16
  3. package/200-italic.css +19 -16
  4. package/200.css +19 -16
  5. package/300-italic.css +19 -16
  6. package/300.css +19 -16
  7. package/400-italic.css +19 -16
  8. package/400.css +19 -16
  9. package/500-italic.css +19 -16
  10. package/500.css +19 -16
  11. package/600-italic.css +19 -16
  12. package/600.css +19 -16
  13. package/700-italic.css +19 -16
  14. package/700.css +19 -16
  15. package/800-italic.css +19 -16
  16. package/800.css +19 -16
  17. package/900-italic.css +19 -16
  18. package/900.css +19 -16
  19. package/CHANGELOG.md +1 -2
  20. package/LICENSE +93 -0
  21. package/README.md +13 -14
  22. package/cherokee-100-italic.css +4 -5
  23. package/cherokee-100.css +4 -5
  24. package/cherokee-200-italic.css +4 -5
  25. package/cherokee-200.css +4 -5
  26. package/cherokee-300-italic.css +4 -5
  27. package/cherokee-300.css +4 -5
  28. package/cherokee-400-italic.css +4 -5
  29. package/cherokee-400.css +4 -5
  30. package/cherokee-500-italic.css +4 -5
  31. package/cherokee-500.css +4 -5
  32. package/cherokee-600-italic.css +4 -5
  33. package/cherokee-600.css +4 -5
  34. package/cherokee-700-italic.css +4 -5
  35. package/cherokee-700.css +4 -5
  36. package/cherokee-800-italic.css +4 -5
  37. package/cherokee-800.css +4 -5
  38. package/cherokee-900-italic.css +4 -5
  39. package/cherokee-900.css +4 -5
  40. package/cherokee-italic.css +80 -0
  41. package/cherokee.css +36 -37
  42. package/files/genos-cherokee-100-italic.woff +0 -0
  43. package/files/genos-cherokee-100-italic.woff2 +0 -0
  44. package/files/genos-cherokee-100-normal.woff +0 -0
  45. package/files/genos-cherokee-100-normal.woff2 +0 -0
  46. package/files/genos-cherokee-200-italic.woff +0 -0
  47. package/files/genos-cherokee-200-italic.woff2 +0 -0
  48. package/files/genos-cherokee-200-normal.woff +0 -0
  49. package/files/genos-cherokee-200-normal.woff2 +0 -0
  50. package/files/genos-cherokee-300-italic.woff +0 -0
  51. package/files/genos-cherokee-300-italic.woff2 +0 -0
  52. package/files/genos-cherokee-300-normal.woff +0 -0
  53. package/files/genos-cherokee-300-normal.woff2 +0 -0
  54. package/files/genos-cherokee-400-italic.woff +0 -0
  55. package/files/genos-cherokee-400-italic.woff2 +0 -0
  56. package/files/genos-cherokee-400-normal.woff +0 -0
  57. package/files/genos-cherokee-400-normal.woff2 +0 -0
  58. package/files/genos-cherokee-500-italic.woff +0 -0
  59. package/files/genos-cherokee-500-italic.woff2 +0 -0
  60. package/files/genos-cherokee-500-normal.woff +0 -0
  61. package/files/genos-cherokee-500-normal.woff2 +0 -0
  62. package/files/genos-cherokee-600-italic.woff +0 -0
  63. package/files/genos-cherokee-600-italic.woff2 +0 -0
  64. package/files/genos-cherokee-600-normal.woff +0 -0
  65. package/files/genos-cherokee-600-normal.woff2 +0 -0
  66. package/files/genos-cherokee-700-italic.woff +0 -0
  67. package/files/genos-cherokee-700-italic.woff2 +0 -0
  68. package/files/genos-cherokee-700-normal.woff +0 -0
  69. package/files/genos-cherokee-700-normal.woff2 +0 -0
  70. package/files/genos-cherokee-800-italic.woff +0 -0
  71. package/files/genos-cherokee-800-italic.woff2 +0 -0
  72. package/files/genos-cherokee-800-normal.woff +0 -0
  73. package/files/genos-cherokee-800-normal.woff2 +0 -0
  74. package/files/genos-cherokee-900-italic.woff +0 -0
  75. package/files/genos-cherokee-900-italic.woff2 +0 -0
  76. package/files/genos-cherokee-900-normal.woff +0 -0
  77. package/files/genos-cherokee-900-normal.woff2 +0 -0
  78. package/files/genos-latin-100-italic.woff +0 -0
  79. package/files/genos-latin-100-italic.woff2 +0 -0
  80. package/files/genos-latin-100-normal.woff +0 -0
  81. package/files/genos-latin-100-normal.woff2 +0 -0
  82. package/files/genos-latin-200-italic.woff +0 -0
  83. package/files/genos-latin-200-italic.woff2 +0 -0
  84. package/files/genos-latin-200-normal.woff +0 -0
  85. package/files/genos-latin-200-normal.woff2 +0 -0
  86. package/files/genos-latin-300-italic.woff +0 -0
  87. package/files/genos-latin-300-italic.woff2 +0 -0
  88. package/files/genos-latin-300-normal.woff +0 -0
  89. package/files/genos-latin-300-normal.woff2 +0 -0
  90. package/files/genos-latin-400-italic.woff +0 -0
  91. package/files/genos-latin-400-italic.woff2 +0 -0
  92. package/files/genos-latin-400-normal.woff +0 -0
  93. package/files/genos-latin-400-normal.woff2 +0 -0
  94. package/files/genos-latin-500-italic.woff +0 -0
  95. package/files/genos-latin-500-italic.woff2 +0 -0
  96. package/files/genos-latin-500-normal.woff +0 -0
  97. package/files/genos-latin-500-normal.woff2 +0 -0
  98. package/files/genos-latin-600-italic.woff +0 -0
  99. package/files/genos-latin-600-italic.woff2 +0 -0
  100. package/files/genos-latin-600-normal.woff +0 -0
  101. package/files/genos-latin-600-normal.woff2 +0 -0
  102. package/files/genos-latin-700-italic.woff +0 -0
  103. package/files/genos-latin-700-italic.woff2 +0 -0
  104. package/files/genos-latin-700-normal.woff +0 -0
  105. package/files/genos-latin-700-normal.woff2 +0 -0
  106. package/files/genos-latin-800-italic.woff +0 -0
  107. package/files/genos-latin-800-italic.woff2 +0 -0
  108. package/files/genos-latin-800-normal.woff +0 -0
  109. package/files/genos-latin-800-normal.woff2 +0 -0
  110. package/files/genos-latin-900-italic.woff +0 -0
  111. package/files/genos-latin-900-italic.woff2 +0 -0
  112. package/files/genos-latin-900-normal.woff +0 -0
  113. package/files/genos-latin-900-normal.woff2 +0 -0
  114. package/files/genos-latin-ext-100-italic.woff +0 -0
  115. package/files/genos-latin-ext-100-italic.woff2 +0 -0
  116. package/files/genos-latin-ext-100-normal.woff +0 -0
  117. package/files/genos-latin-ext-100-normal.woff2 +0 -0
  118. package/files/genos-latin-ext-200-italic.woff +0 -0
  119. package/files/genos-latin-ext-200-italic.woff2 +0 -0
  120. package/files/genos-latin-ext-200-normal.woff +0 -0
  121. package/files/genos-latin-ext-200-normal.woff2 +0 -0
  122. package/files/genos-latin-ext-300-italic.woff +0 -0
  123. package/files/genos-latin-ext-300-italic.woff2 +0 -0
  124. package/files/genos-latin-ext-300-normal.woff +0 -0
  125. package/files/genos-latin-ext-300-normal.woff2 +0 -0
  126. package/files/genos-latin-ext-400-italic.woff +0 -0
  127. package/files/genos-latin-ext-400-italic.woff2 +0 -0
  128. package/files/genos-latin-ext-400-normal.woff +0 -0
  129. package/files/genos-latin-ext-400-normal.woff2 +0 -0
  130. package/files/genos-latin-ext-500-italic.woff +0 -0
  131. package/files/genos-latin-ext-500-italic.woff2 +0 -0
  132. package/files/genos-latin-ext-500-normal.woff +0 -0
  133. package/files/genos-latin-ext-500-normal.woff2 +0 -0
  134. package/files/genos-latin-ext-600-italic.woff +0 -0
  135. package/files/genos-latin-ext-600-italic.woff2 +0 -0
  136. package/files/genos-latin-ext-600-normal.woff +0 -0
  137. package/files/genos-latin-ext-600-normal.woff2 +0 -0
  138. package/files/genos-latin-ext-700-italic.woff +0 -0
  139. package/files/genos-latin-ext-700-italic.woff2 +0 -0
  140. package/files/genos-latin-ext-700-normal.woff +0 -0
  141. package/files/genos-latin-ext-700-normal.woff2 +0 -0
  142. package/files/genos-latin-ext-800-italic.woff +0 -0
  143. package/files/genos-latin-ext-800-italic.woff2 +0 -0
  144. package/files/genos-latin-ext-800-normal.woff +0 -0
  145. package/files/genos-latin-ext-800-normal.woff2 +0 -0
  146. package/files/genos-latin-ext-900-italic.woff +0 -0
  147. package/files/genos-latin-ext-900-italic.woff2 +0 -0
  148. package/files/genos-latin-ext-900-normal.woff +0 -0
  149. package/files/genos-latin-ext-900-normal.woff2 +0 -0
  150. package/files/genos-vietnamese-100-italic.woff +0 -0
  151. package/files/genos-vietnamese-100-italic.woff2 +0 -0
  152. package/files/genos-vietnamese-100-normal.woff +0 -0
  153. package/files/genos-vietnamese-100-normal.woff2 +0 -0
  154. package/files/genos-vietnamese-200-italic.woff +0 -0
  155. package/files/genos-vietnamese-200-italic.woff2 +0 -0
  156. package/files/genos-vietnamese-200-normal.woff +0 -0
  157. package/files/genos-vietnamese-200-normal.woff2 +0 -0
  158. package/files/genos-vietnamese-300-italic.woff +0 -0
  159. package/files/genos-vietnamese-300-italic.woff2 +0 -0
  160. package/files/genos-vietnamese-300-normal.woff +0 -0
  161. package/files/genos-vietnamese-300-normal.woff2 +0 -0
  162. package/files/genos-vietnamese-400-italic.woff +0 -0
  163. package/files/genos-vietnamese-400-italic.woff2 +0 -0
  164. package/files/genos-vietnamese-400-normal.woff +0 -0
  165. package/files/genos-vietnamese-400-normal.woff2 +0 -0
  166. package/files/genos-vietnamese-500-italic.woff +0 -0
  167. package/files/genos-vietnamese-500-italic.woff2 +0 -0
  168. package/files/genos-vietnamese-500-normal.woff +0 -0
  169. package/files/genos-vietnamese-500-normal.woff2 +0 -0
  170. package/files/genos-vietnamese-600-italic.woff +0 -0
  171. package/files/genos-vietnamese-600-italic.woff2 +0 -0
  172. package/files/genos-vietnamese-600-normal.woff +0 -0
  173. package/files/genos-vietnamese-600-normal.woff2 +0 -0
  174. package/files/genos-vietnamese-700-italic.woff +0 -0
  175. package/files/genos-vietnamese-700-italic.woff2 +0 -0
  176. package/files/genos-vietnamese-700-normal.woff +0 -0
  177. package/files/genos-vietnamese-700-normal.woff2 +0 -0
  178. package/files/genos-vietnamese-800-italic.woff +0 -0
  179. package/files/genos-vietnamese-800-italic.woff2 +0 -0
  180. package/files/genos-vietnamese-800-normal.woff +0 -0
  181. package/files/genos-vietnamese-800-normal.woff2 +0 -0
  182. package/files/genos-vietnamese-900-italic.woff +0 -0
  183. package/files/genos-vietnamese-900-italic.woff2 +0 -0
  184. package/files/genos-vietnamese-900-normal.woff +0 -0
  185. package/files/genos-vietnamese-900-normal.woff2 +0 -0
  186. package/index.css +19 -16
  187. package/latin-100-italic.css +4 -5
  188. package/latin-100.css +4 -5
  189. package/latin-200-italic.css +4 -5
  190. package/latin-200.css +4 -5
  191. package/latin-300-italic.css +4 -5
  192. package/latin-300.css +4 -5
  193. package/latin-400-italic.css +4 -5
  194. package/latin-400.css +4 -5
  195. package/latin-500-italic.css +4 -5
  196. package/latin-500.css +4 -5
  197. package/latin-600-italic.css +4 -5
  198. package/latin-600.css +4 -5
  199. package/latin-700-italic.css +4 -5
  200. package/latin-700.css +4 -5
  201. package/latin-800-italic.css +4 -5
  202. package/latin-800.css +4 -5
  203. package/latin-900-italic.css +4 -5
  204. package/latin-900.css +4 -5
  205. package/latin-ext-100-italic.css +4 -5
  206. package/latin-ext-100.css +4 -5
  207. package/latin-ext-200-italic.css +4 -5
  208. package/latin-ext-200.css +4 -5
  209. package/latin-ext-300-italic.css +4 -5
  210. package/latin-ext-300.css +4 -5
  211. package/latin-ext-400-italic.css +4 -5
  212. package/latin-ext-400.css +4 -5
  213. package/latin-ext-500-italic.css +4 -5
  214. package/latin-ext-500.css +4 -5
  215. package/latin-ext-600-italic.css +4 -5
  216. package/latin-ext-600.css +4 -5
  217. package/latin-ext-700-italic.css +4 -5
  218. package/latin-ext-700.css +4 -5
  219. package/latin-ext-800-italic.css +4 -5
  220. package/latin-ext-800.css +4 -5
  221. package/latin-ext-900-italic.css +4 -5
  222. package/latin-ext-900.css +4 -5
  223. package/latin-ext-italic.css +80 -0
  224. package/latin-ext.css +36 -37
  225. package/latin-italic.css +80 -0
  226. package/latin.css +36 -37
  227. package/metadata.json +22 -1
  228. package/package.json +29 -1
  229. package/scss/metadata.scss +19 -0
  230. package/scss/mixins.scss +161 -106
  231. package/unicode.json +6 -1
  232. package/vietnamese-100-italic.css +4 -5
  233. package/vietnamese-100.css +4 -5
  234. package/vietnamese-200-italic.css +4 -5
  235. package/vietnamese-200.css +4 -5
  236. package/vietnamese-300-italic.css +4 -5
  237. package/vietnamese-300.css +4 -5
  238. package/vietnamese-400-italic.css +4 -5
  239. package/vietnamese-400.css +4 -5
  240. package/vietnamese-500-italic.css +4 -5
  241. package/vietnamese-500.css +4 -5
  242. package/vietnamese-600-italic.css +4 -5
  243. package/vietnamese-600.css +4 -5
  244. package/vietnamese-700-italic.css +4 -5
  245. package/vietnamese-700.css +4 -5
  246. package/vietnamese-800-italic.css +4 -5
  247. package/vietnamese-800.css +4 -5
  248. package/vietnamese-900-italic.css +4 -5
  249. package/vietnamese-900.css +4 -5
  250. package/vietnamese-italic.css +80 -0
  251. package/vietnamese.css +36 -37
  252. package/files/file-list.json +0 -1
  253. package/files/genos-all-100-italic.woff +0 -0
  254. package/files/genos-all-100-normal.woff +0 -0
  255. package/files/genos-all-200-italic.woff +0 -0
  256. package/files/genos-all-200-normal.woff +0 -0
  257. package/files/genos-all-300-italic.woff +0 -0
  258. package/files/genos-all-300-normal.woff +0 -0
  259. package/files/genos-all-400-italic.woff +0 -0
  260. package/files/genos-all-400-normal.woff +0 -0
  261. package/files/genos-all-500-italic.woff +0 -0
  262. package/files/genos-all-500-normal.woff +0 -0
  263. package/files/genos-all-600-italic.woff +0 -0
  264. package/files/genos-all-600-normal.woff +0 -0
  265. package/files/genos-all-700-italic.woff +0 -0
  266. package/files/genos-all-700-normal.woff +0 -0
  267. package/files/genos-all-800-italic.woff +0 -0
  268. package/files/genos-all-800-normal.woff +0 -0
  269. package/files/genos-all-900-italic.woff +0 -0
  270. package/files/genos-all-900-normal.woff +0 -0
  271. package/files/genos-cherokee-variable-wghtOnly-italic.woff2 +0 -0
  272. package/files/genos-cherokee-variable-wghtOnly-normal.woff2 +0 -0
  273. package/files/genos-latin-ext-variable-wghtOnly-italic.woff2 +0 -0
  274. package/files/genos-latin-ext-variable-wghtOnly-normal.woff2 +0 -0
  275. package/files/genos-latin-variable-wghtOnly-italic.woff2 +0 -0
  276. package/files/genos-latin-variable-wghtOnly-normal.woff2 +0 -0
  277. package/files/genos-vietnamese-variable-wghtOnly-italic.woff2 +0 -0
  278. package/files/genos-vietnamese-variable-wghtOnly-normal.woff2 +0 -0
  279. package/variable-italic.css +0 -36
  280. package/variable.css +0 -36
@@ -0,0 +1,19 @@
1
+ $id: 'genos' !default;
2
+ $family: 'Genos' !default;
3
+ $category: sans-serif !default;
4
+ $subsets: (cherokee, latin, latin-ext, vietnamese) !default;
5
+ $weights: (100, 200, 300, 400, 500, 600, 700, 800, 900) !default;
6
+ $styles: (italic, 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
+ cherokee: (U+0300-0302,U+0304,U+030B-030C,U+0323-0324,U+0330-0331,U+13A0-13FF,U+AB70-ABBF),
16
+ 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),
17
+ 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),
18
+ 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),
19
+ ) !default;
package/scss/mixins.scss CHANGED
@@ -1,124 +1,179 @@
1
- $fontName: "Genos";
2
- $fontId: "genos";
3
- $style: normal;
4
- $display: swap;
5
- $weight: 400;
6
- $fontDir: "~@fontsource/#{$fontId}/files";
7
- $unicodeMap: (cherokee: (U+0300-0302,U+0304,U+030B-030C,U+0323-0324,U+0330-0331,U+13A0-13FF,U+AB70-ABBF), 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
+ $directory: if(
34
+ $directory,
35
+ $directory,
36
+ '~@fontsource#{if(map.get($metadata, axes), '-variable', '')}/#{map.get($metadata, id)}/files'
37
+ );
52
38
 
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
- }
39
+ $family: if(
40
+ $family,
41
+ $family,
42
+ map.get($metadata, family) + if(map.get($metadata, axes), ' Variable', '')
43
+ );
44
+ $display: if($display, $display, swap);
45
+ $displayVar: if($displayVar != null, $displayVar, true);
46
+ $formats: if(not $formats or $formats == all, (woff2, woff), $formats);
47
+ $subsets: if(
48
+ $subsets,
49
+ if($subsets == all, map.get($metadata, subsets), $subsets),
50
+ map.get($metadata, defaults, subset)
51
+ );
52
+ $weights: if(
53
+ $weights,
54
+ if($weights == all, map.get($metadata, weights), $weights),
55
+ map.get($metadata, defaults, weight)
56
+ );
57
+ $styles: if(
58
+ $styles,
59
+ if($styles == all, map.get($metadata, styles), $styles),
60
+ map.get($metadata, defaults, style)
61
+ );
62
+ $axes: if(
63
+ $axes,
64
+ if($axes == all, full, $axes),
65
+ if(map.get($metadata, axes), if(map.has-key($metadata, axes, wght), wght, full), null)
66
+ );
64
67
 
65
- $fontNameVariable: "GenosVariable";
66
- $weightVariable: 100 900;
67
- $type: "wghtOnly";
68
- $stretch: null;
68
+ @each $subset in $subsets {
69
+ @each $unicodeSubset, $unicodeRange in map.get($metadata, unicode) {
70
+ @if (
71
+ $subset ==
72
+ $unicodeSubset or
73
+ (
74
+ // Is numeric subset
75
+ $subset ==
76
+ map.get($metadata, defaults, subset) and not
77
+ list.index(map.get($metadata, subsets), $unicodeSubset)
78
+ )
79
+ ) {
80
+ @each $weight in if($axes, null, $weights) {
81
+ @each $axis in $axes {
82
+ @each $style in $styles {
83
+ $variant: '#{map.get($metadata, id)}-#{$unicodeSubset}-#{if($axis, $axis, $weight)}-#{$style}';
69
84
 
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;
85
+ $src: ();
86
+ @each $format in $formats {
87
+ $src: append(
88
+ $src,
89
+ url('#{$directory}/#{$variant}.#{$format}')
90
+ format('#{$format}#{if($axis, '-variations', '')}'),
91
+ comma
92
+ );
93
+ }
94
+
95
+ @content ((
96
+ metadata: $metadata,
97
+ directory: $directory,
98
+ family: $family,
99
+ display: $display,
100
+ displayVar: $displayVar,
101
+ formats: $formats,
102
+ subsets: $subsets,
103
+ weights: $weights,
104
+ styles: $styles,
105
+ axes: $axes,
106
+
107
+ variant: $variant,
108
+ subset: $subset,
109
+ unicodeSubset: $unicodeSubset,
110
+ unicodeRange: $unicodeRange,
111
+ weight: $weight,
112
+ axis: $axis,
113
+ style: $style,
114
+
115
+ font-family: string.quote($family),
116
+ font-style: if(
117
+ ($axis == full or $axis == slnt) and map.has-key($metadata, axes, slnt),
118
+ oblique map.get($metadata, axes, slnt, min) + deg map.get($metadata, axes, slnt, max) + deg,
119
+ $style
120
+ ),
121
+ font-display: if($displayVar, var(--fontsource-display, $display), $display),
122
+ font-weight: if(
123
+ ($axis == full or $axis == wght) and map.has-key($metadata, axes, wght),
124
+ map.get($metadata, axes, wght, min) map.get($metadata, axes, wght, max),
125
+ $weight
126
+ ),
127
+ font-stretch: if(
128
+ ($axis == full or $axis == wdth) and map.has-key($metadata, axes, wdth),
129
+ '#{map.get($metadata, axes, wdth, min)}% #{map.get($metadata, axes, wdth, max)}%',
130
+ null
131
+ ),
132
+ src: $src,
133
+ unicode-range: $unicodeRange,
134
+ ));
135
+ }
136
+ }
137
+ }
89
138
  }
90
- src: url("#{$fontDir}/#{$fontId}-#{$subset}-variable-#{$type}-#{$style}.woff2") format("woff2");
91
- unicode-range: $unicodeRangeValues;
92
139
  }
93
140
  }
94
141
  }
95
142
 
96
- @mixin fontFaceVariableCustom(
97
- $fontName: $fontNameVariable,
98
- $fontId: $fontId,
99
- $style: $style,
143
+ @mixin faces(
144
+ $metadata: $metadata,
145
+ $directory: $directory,
146
+ $family: $family,
100
147
  $display: $display,
101
- $weight: $weightVariable,
102
- $type: $type,
103
- $woff2Path: null,
104
- $unicodeRange: $unicodeRange,
105
- $unicodeRangeValues: $unicodeRangeValues
148
+ $displayVar: $displayVar,
149
+ $formats: $formats,
150
+ $subsets: $subsets,
151
+ $weights: $weights,
152
+ $styles: $styles,
153
+ $axes: $axes
106
154
  ) {
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;
155
+ @include generator(
156
+ $metadata: $metadata,
157
+ $directory: $directory,
158
+ $family: $family,
159
+ $display: $display,
160
+ $displayVar: $displayVar,
161
+ $formats: $formats,
162
+ $subsets: $subsets,
163
+ $weights: $weights,
164
+ $styles: $styles,
165
+ $axes: $axes
166
+ )
167
+ using ($props) {
168
+ /* #{map.get($props, variant)} */
169
+ @font-face {
170
+ font-family: map.get($props, font-family);
171
+ font-style: map.get($props, font-style);
172
+ font-display: map.get($props, font-display);
173
+ font-weight: map.get($props, font-weight);
174
+ font-stretch: map.get($props, font-stretch);
175
+ unicode-range: map.get($props, unicode-range);
176
+ src: map.get($props, src);
122
177
  }
123
178
  }
124
179
  }
package/unicode.json CHANGED
@@ -1 +1,6 @@
1
- {"cherokee":"U+0300-0302,U+0304,U+030B-030C,U+0323-0324,U+0330-0331,U+13A0-13FF,U+AB70-ABBF","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
+ "cherokee": "U+0300-0302,U+0304,U+030B-030C,U+0323-0324,U+0330-0331,U+13A0-13FF,U+AB70-ABBF",
3
+ "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",
4
+ "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",
5
+ "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"
6
+ }
@@ -1,9 +1,8 @@
1
- /* genos-vietnamese-100-italic*/
1
+ /* genos-vietnamese-100-italic */
2
2
  @font-face {
3
3
  font-family: 'Genos';
4
4
  font-style: italic;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 100;
7
- src: url('./files/genos-vietnamese-100-italic.woff2') format('woff2'), url('./files/genos-vietnamese-100-italic.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/genos-vietnamese-100-italic.woff2) format('woff2'), url(./files/genos-vietnamese-100-italic.woff) format('woff');
8
+ }
@@ -1,9 +1,8 @@
1
- /* genos-vietnamese-100-normal*/
1
+ /* genos-vietnamese-100-normal */
2
2
  @font-face {
3
3
  font-family: 'Genos';
4
4
  font-style: normal;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 100;
7
- src: url('./files/genos-vietnamese-100-normal.woff2') format('woff2'), url('./files/genos-vietnamese-100-normal.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/genos-vietnamese-100-normal.woff2) format('woff2'), url(./files/genos-vietnamese-100-normal.woff) format('woff');
8
+ }
@@ -1,9 +1,8 @@
1
- /* genos-vietnamese-200-italic*/
1
+ /* genos-vietnamese-200-italic */
2
2
  @font-face {
3
3
  font-family: 'Genos';
4
4
  font-style: italic;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 200;
7
- src: url('./files/genos-vietnamese-200-italic.woff2') format('woff2'), url('./files/genos-vietnamese-200-italic.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/genos-vietnamese-200-italic.woff2) format('woff2'), url(./files/genos-vietnamese-200-italic.woff) format('woff');
8
+ }
@@ -1,9 +1,8 @@
1
- /* genos-vietnamese-200-normal*/
1
+ /* genos-vietnamese-200-normal */
2
2
  @font-face {
3
3
  font-family: 'Genos';
4
4
  font-style: normal;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 200;
7
- src: url('./files/genos-vietnamese-200-normal.woff2') format('woff2'), url('./files/genos-vietnamese-200-normal.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/genos-vietnamese-200-normal.woff2) format('woff2'), url(./files/genos-vietnamese-200-normal.woff) format('woff');
8
+ }
@@ -1,9 +1,8 @@
1
- /* genos-vietnamese-300-italic*/
1
+ /* genos-vietnamese-300-italic */
2
2
  @font-face {
3
3
  font-family: 'Genos';
4
4
  font-style: italic;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 300;
7
- src: url('./files/genos-vietnamese-300-italic.woff2') format('woff2'), url('./files/genos-vietnamese-300-italic.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/genos-vietnamese-300-italic.woff2) format('woff2'), url(./files/genos-vietnamese-300-italic.woff) format('woff');
8
+ }
@@ -1,9 +1,8 @@
1
- /* genos-vietnamese-300-normal*/
1
+ /* genos-vietnamese-300-normal */
2
2
  @font-face {
3
3
  font-family: 'Genos';
4
4
  font-style: normal;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 300;
7
- src: url('./files/genos-vietnamese-300-normal.woff2') format('woff2'), url('./files/genos-vietnamese-300-normal.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/genos-vietnamese-300-normal.woff2) format('woff2'), url(./files/genos-vietnamese-300-normal.woff) format('woff');
8
+ }
@@ -1,9 +1,8 @@
1
- /* genos-vietnamese-400-italic*/
1
+ /* genos-vietnamese-400-italic */
2
2
  @font-face {
3
3
  font-family: 'Genos';
4
4
  font-style: italic;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 400;
7
- src: url('./files/genos-vietnamese-400-italic.woff2') format('woff2'), url('./files/genos-vietnamese-400-italic.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/genos-vietnamese-400-italic.woff2) format('woff2'), url(./files/genos-vietnamese-400-italic.woff) format('woff');
8
+ }
@@ -1,9 +1,8 @@
1
- /* genos-vietnamese-400-normal*/
1
+ /* genos-vietnamese-400-normal */
2
2
  @font-face {
3
3
  font-family: 'Genos';
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/genos-vietnamese-400-normal.woff2') format('woff2'), url('./files/genos-vietnamese-400-normal.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/genos-vietnamese-400-normal.woff2) format('woff2'), url(./files/genos-vietnamese-400-normal.woff) format('woff');
8
+ }
@@ -1,9 +1,8 @@
1
- /* genos-vietnamese-500-italic*/
1
+ /* genos-vietnamese-500-italic */
2
2
  @font-face {
3
3
  font-family: 'Genos';
4
4
  font-style: italic;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 500;
7
- src: url('./files/genos-vietnamese-500-italic.woff2') format('woff2'), url('./files/genos-vietnamese-500-italic.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/genos-vietnamese-500-italic.woff2) format('woff2'), url(./files/genos-vietnamese-500-italic.woff) format('woff');
8
+ }
@@ -1,9 +1,8 @@
1
- /* genos-vietnamese-500-normal*/
1
+ /* genos-vietnamese-500-normal */
2
2
  @font-face {
3
3
  font-family: 'Genos';
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/genos-vietnamese-500-normal.woff2') format('woff2'), url('./files/genos-vietnamese-500-normal.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/genos-vietnamese-500-normal.woff2) format('woff2'), url(./files/genos-vietnamese-500-normal.woff) format('woff');
8
+ }
@@ -1,9 +1,8 @@
1
- /* genos-vietnamese-600-italic*/
1
+ /* genos-vietnamese-600-italic */
2
2
  @font-face {
3
3
  font-family: 'Genos';
4
4
  font-style: italic;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 600;
7
- src: url('./files/genos-vietnamese-600-italic.woff2') format('woff2'), url('./files/genos-vietnamese-600-italic.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/genos-vietnamese-600-italic.woff2) format('woff2'), url(./files/genos-vietnamese-600-italic.woff) format('woff');
8
+ }
@@ -1,9 +1,8 @@
1
- /* genos-vietnamese-600-normal*/
1
+ /* genos-vietnamese-600-normal */
2
2
  @font-face {
3
3
  font-family: 'Genos';
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/genos-vietnamese-600-normal.woff2') format('woff2'), url('./files/genos-vietnamese-600-normal.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/genos-vietnamese-600-normal.woff2) format('woff2'), url(./files/genos-vietnamese-600-normal.woff) format('woff');
8
+ }
@@ -1,9 +1,8 @@
1
- /* genos-vietnamese-700-italic*/
1
+ /* genos-vietnamese-700-italic */
2
2
  @font-face {
3
3
  font-family: 'Genos';
4
4
  font-style: italic;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 700;
7
- src: url('./files/genos-vietnamese-700-italic.woff2') format('woff2'), url('./files/genos-vietnamese-700-italic.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/genos-vietnamese-700-italic.woff2) format('woff2'), url(./files/genos-vietnamese-700-italic.woff) format('woff');
8
+ }
@@ -1,9 +1,8 @@
1
- /* genos-vietnamese-700-normal*/
1
+ /* genos-vietnamese-700-normal */
2
2
  @font-face {
3
3
  font-family: 'Genos';
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/genos-vietnamese-700-normal.woff2') format('woff2'), url('./files/genos-vietnamese-700-normal.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/genos-vietnamese-700-normal.woff2) format('woff2'), url(./files/genos-vietnamese-700-normal.woff) format('woff');
8
+ }
@@ -1,9 +1,8 @@
1
- /* genos-vietnamese-800-italic*/
1
+ /* genos-vietnamese-800-italic */
2
2
  @font-face {
3
3
  font-family: 'Genos';
4
4
  font-style: italic;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 800;
7
- src: url('./files/genos-vietnamese-800-italic.woff2') format('woff2'), url('./files/genos-vietnamese-800-italic.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/genos-vietnamese-800-italic.woff2) format('woff2'), url(./files/genos-vietnamese-800-italic.woff) format('woff');
8
+ }
@@ -1,9 +1,8 @@
1
- /* genos-vietnamese-800-normal*/
1
+ /* genos-vietnamese-800-normal */
2
2
  @font-face {
3
3
  font-family: 'Genos';
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/genos-vietnamese-800-normal.woff2') format('woff2'), url('./files/genos-vietnamese-800-normal.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/genos-vietnamese-800-normal.woff2) format('woff2'), url(./files/genos-vietnamese-800-normal.woff) format('woff');
8
+ }
@@ -1,9 +1,8 @@
1
- /* genos-vietnamese-900-italic*/
1
+ /* genos-vietnamese-900-italic */
2
2
  @font-face {
3
3
  font-family: 'Genos';
4
4
  font-style: italic;
5
- font-display: swap;
5
+ font-display: var(--fontsource-display, swap);
6
6
  font-weight: 900;
7
- src: url('./files/genos-vietnamese-900-italic.woff2') format('woff2'), url('./files/genos-vietnamese-900-italic.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/genos-vietnamese-900-italic.woff2) format('woff2'), url(./files/genos-vietnamese-900-italic.woff) format('woff');
8
+ }
@@ -1,9 +1,8 @@
1
- /* genos-vietnamese-900-normal*/
1
+ /* genos-vietnamese-900-normal */
2
2
  @font-face {
3
3
  font-family: 'Genos';
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/genos-vietnamese-900-normal.woff2') format('woff2'), url('./files/genos-vietnamese-900-normal.woff') format('woff');
8
-
9
- }
7
+ src: url(./files/genos-vietnamese-900-normal.woff2) format('woff2'), url(./files/genos-vietnamese-900-normal.woff) format('woff');
8
+ }