Skip to content

Commit

Permalink
fix: bug
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKreil committed Apr 9, 2024
1 parent de93c5d commit 138a7fc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/build_fonts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ packer.add('dist/fonts.tar.gz', fontGlyphs);
const fontFamilies: Record<string, FontGlyphsWrapper[]> = {};
fontGlyphs.forEach(f => {
const key = f.fontFace.familyId;
if (fontFamilies[key].push(f)) return;
fontFamilies[key] = [f];
if (key in fontFamilies) {
fontFamilies[key].push(f);
} else {
fontFamilies[key] = [f];
}
});
for (const [family, fontSubset] of Object.entries(fontFamilies)) {
packer.add(`dist/${family}.tar.gz`, fontSubset);
Expand Down

0 comments on commit 138a7fc

Please sign in to comment.