You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Local fonts are not sorted correctly during lookup. Looks to be because the filename utility used to find the file extension during the sort actually returns the filenames without the extension, and as such is unable to differ between them.
Hey @haakonmt! I'm here to assist you with any bugs, questions, or contributions you may have. Let me know how I can help while you wait for a human maintainer.
To resolve the issue where the extension priority is not respected by the local provider, causing local fonts to not be sorted correctly during lookup due to the filename utility returning filenames without the extension, you need to modify the lookupFont function. Specifically, ensure that the extension is correctly extracted and used for sorting.
In this corrected version, the extA and extB variables are correctly assigned the file extensions by splitting the a and b strings, ensuring that the sorting respects the extension priority [1][2].
Local fonts are not sorted correctly during lookup. Looks to be because the
filename
utility used to find the file extension during the sort actually returns the filenames without the extension, and as such is unable to differ between them.EDIT: Seemingly confirmed by this unit test: https://github.com/unjs/pathe/blob/main/test/utils.spec.ts#L61
The text was updated successfully, but these errors were encountered: