-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Demo URL
No response
What happened?
There's an issue when using custom fonts with absolute src paths. The problem arises in the resolveFontFiles function, where the absolute root is joined with the absolute source, leading to incorrect path resolution. This prevents the plugin from loading custom fonts specified with absolute paths.
unplugin-fonts/src/loaders/custom.ts
Lines 83 to 84 in 8bc315c
| for (const source of sources) { | |
| const results = fg.sync(join(root, source), { absolute: true, cwd: root, onlyFiles: true }) |
Reproduction steps
Unfonts({
custom: {
families: [
{
name: 'Geist',
src: path.resolve(...), // any absolute path
},
],
injectTo: 'head',
},
});Relevant log output
No error is thrown, the files are simply not found.What browsers are you seeing the problem on?
Other
What is your operating system?
Windows
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working