fontsource / fontsource

Self-host Open Source fonts in neatly bundled NPM packages.
https://fontsource.org
MIT License
4.96k stars 174 forks source link

Noto Emoji Variables - Path broken in CSS / npm package #772

Closed FineWolf closed 1 year ago

FineWolf commented 1 year ago

Describe the bug

In the published package for Noto Emoji Variable, the url() for the files have a set of square bracket around the number located in the file path; the physical files included in the package do not.

Steps to Reproduce

  1. Install package with npm install @fontsource-variable/noto-emoji
  2. Include the css files as instructed.
  3. The font will not load

Expected behavior

No response

Version

5.0.4

OS

No response

Browser

No response

Additional context

No response

YusukeSano commented 1 year ago

The same issue is occurring in noto-sans-jp as well.

The font file does not include square brackets. https://github.com/fontsource/font-files/tree/main/fonts/variable/noto-sans-jp/files

In the CSS, square brackets are included. https://github.com/fontsource/font-files/blob/0e9c76a4e7a6f66254f74cea2346120c55ac2405/fonts/variable/noto-sans-jp/index.css#L7

Shouldn't all codes be modified as follows?

src: url(./files/noto-sans-jp-0-wght-normal.woff2) format('woff2-variations');
ayuhito commented 1 year ago

Sorry, I've been pretty busy so it might take me a little while to get this sorted. This should only be present in variable fonts as this case is addressed in regular fonts.

Happy to accept a quick PR to address it! Should be a one line change in the variable fonts packager.

YusukeSano commented 1 year ago

@ayuhito I have created a PR to address this issue! Could you please review the code?

YusukeSano commented 1 year ago

@ayuhito It appears that a fix for the packager has been released, but the package itself does not seem to have been changed. https://github.com/fontsource/font-files/blob/43e40e391021ba98408c01a9c861a8f01cc6346a/fonts/variable/noto-sans-jp/index.css#L7

When is it scheduled for the font-files to be updated? Or do you need some PR?