Skip to content

Commit

Permalink
fix: font family including tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Zyie committed Oct 22, 2024
1 parent f293a15 commit a90be8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/assetpack/src/webfont/webfont.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { checkExt, createNewAssetAt, path } from '../core/index.js';
import { checkExt, createNewAssetAt, path, stripTags } from '../core/index.js';
import { fonts } from './fonts.js';

import type { Asset, AssetPipe } from '../core/index.js';
Expand Down Expand Up @@ -44,7 +44,7 @@ export function webfont(): AssetPipe<any, 'wf'>
newAsset.buffer = buffer;

// set the family name to the filename if it doesn't exist
asset.metaData.family ??= path.trimExt(asset.filename);
asset.metaData.family ??= stripTags(path.trimExt(asset.filename));

return [newAsset];
}
Expand Down

0 comments on commit a90be8d

Please sign in to comment.