Skip to content

Commit

Permalink
feat(rubik-one): update generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
dgadelha committed Apr 20, 2024
1 parent a5182a4 commit 66e76d0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion fonts/other/rubik-one/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"styles": ["normal"],
"defSubset": "latin",
"variable": false,
"lastModified": "2024-04-19",
"lastModified": "2024-04-20",
"version": "v1.0",
"category": "sans-serif",
"license": {
Expand Down
22 changes: 15 additions & 7 deletions fonts/other/rubik-one/scss/mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ $displayVar: null !default;
// Deprecated
$displayVar: $displayVar
) {

@if $displayVar != null {
@warn "$displayVar is deprecated due to the limitation of using css variables in @font-face (https://github.com/fontsource/fontsource/issues/726).";
}
Expand All @@ -52,7 +53,7 @@ $displayVar: null !default;
$subsets: if(
$subsets,
if($subsets == all, map.get($metadata, subsets), $subsets),
map.get($metadata, defaults, subset)
map.get($metadata, subsets)
);
$weights: if(
$weights,
Expand All @@ -72,13 +73,20 @@ $displayVar: null !default;

@each $subset in $subsets {
@each $unicodeSubset, $unicodeRange in map.get($metadata, unicode) {
// If condition is true, generate faces for the current subset
@if (
($subset == $unicodeSubset) or
(
// Is numeric subset
($subset == map.get($metadata, defaults, subset)) and not
list.index(map.get($metadata, subsets), $unicodeSubset)
)
// If there is no unicode information for the font or
($unicodeSubset == null) or
// If the subset match a unicode subset or
($subset == $unicodeSubset) or
(
// If $unicodeSubset is a numeric unicode subset
// and current subset exists in the list of font subsets but does not match any unicode subset
// then generate faces for this numeric unicode subset as it is representing part of the current subset
list.index(map.get($metadata, subsets), $subset) and not
map.has-key($metadata, unicode, $subset) and not
list.index(map.get($metadata, subsets), $unicodeSubset)
)
) {
@each $weight in if($axes, null, $weights) {
@each $axis in $axes {
Expand Down

0 comments on commit 66e76d0

Please sign in to comment.