Skip to content

Commit

Permalink
fix(api): variable variants for numbered subsets (#913)
Browse files Browse the repository at this point in the history
* fix(api): variable variants for numbered subsets

* Create quiet-zebras-relate.md
  • Loading branch information
ayuhito committed Dec 11, 2023
1 parent bb918dc commit 656390c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/quiet-zebras-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"cdn": patch
---

fix(api): variable variants for numbered subsets
6 changes: 4 additions & 2 deletions api/cdn/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ export const generateVariableVariants = (
for (const style of metadata.styles) {
variants[axis][style] = {};

for (const subset of metadata.subsets) {
for (const unicodeKey of Object.keys(metadata.unicodeRange)) {
const subset = unicodeKey.replace('[', '').replace(']', '');
const value = makeFontFileVariablePath(
metadata.family,
style,
Expand Down Expand Up @@ -156,7 +157,8 @@ export const generateVariableVariants = (
variants.full = {};
variants.full[style] = {};

for (const subset of metadata.subsets) {
for (const unicodeKey of Object.keys(metadata.unicodeRange)) {
const subset = unicodeKey.replace('[', '').replace(']', '');
const value = makeFontFileVariablePath(
metadata.family,
style,
Expand Down

0 comments on commit 656390c

Please sign in to comment.