Closed naiyerasif closed 1 year ago
Hey JetBrains, would be awesome if you could merge this!
Cheers
@philippnurullin Anything I can do to get this merged? I'd be happy to work on this further if you've any suggestions.
@naiyerasif Hi, and sorry for the long wait. It's hard for me to merge this PR because it modifies files I'm not responsible for. The build scripts provided by Google fonts team. Regarding that, thank you. This is a very useful addition.
@RosaWagner Hi. Can you please look at the build script modifications and validate them?
It's all fine.
@naiyerasif
Made a build with the new script. No files in fonts/variable
.
@philippnurullin Seems like an issue with the latest job. I can see that the build didn't run fully.
I took the latest changes in my fork and ran the job here to verify if my script is running: https://github.com/naiyerasif/JetBrainsMono/actions/runs/4064950771 If you download the generated font archive, you'll notice that it does contain the variable fonts: https://github.com/naiyerasif/JetBrainsMono/suites/10713117746/artifacts/536769546
Hi @naiyerasif I believe that your script is running well in your particular environment. Unfortunately, in my case it is not working. And I don't have the qualification to fix it. I believe there will be a lot of people like me.
So, I need your help to fix the script and find the solution. If it is not possible, the script will be removed because the results are not stable. I'm sorry if this sounds harsh.
@philippnurullin Can you please provide me a reproduction of the issue so that I can investigate this? e.g. how are you trying to generate the font? Are you running it on local or on GitHub Actions?
For my demonstration, I pulled the HEAD of this very repository, ran the exact same GitHub Actions workflow that is used officially and the results are available for you to verify: https://github.com/naiyerasif/JetBrainsMono/actions/runs/4064950771
If you're trying to run this on local, you'll have to run gftools
first which generates the .ttf
files in fonts/variable
directory from where my script picks them up for conversion.
# this command generates the files in `fonts/variable` directory
gftools builder sources/config.yaml
# this script picks the `ttf` files from `fonts/variable` directory and converts them to `woff2` files
python scripts/generate_variable_webfonts.py
Mac OS Ventura 13x Terminal -bash
cd .../sources
using Terminal.gftools builder config.yaml
python generate_variable_webfonts.py
The script is running but produce no results.
Also, run code in IntelliJ IDEA.
Result:
usr.../python3.11
Users...JetBrainsMono/scripts/generate_variable_webfont.py
finished with code 0
Still no new files in /variable
This is a path resolution issue. Can you try the following instructions and see if things work?
gftools builder sources/config.yaml
in Terminal and run it.python scripts/generate_variable_webfonts.py
in Terminal and run it to generate variable webfonts.I've also created a PR https://github.com/JetBrains/JetBrainsMono/pull/602 with updated instructions. Tested this on Alpine Linux but this should work on other ecosystems as well.
Thanks. It works!
This change adds
fontTools.ttLib
based build script that can generate variable webfonts fromttf
files. It runs after thegftools
and dumps thewoff2
fonts infonts/variable
directory. The script does not modify any files generated bygftools
.A test run for this change (not including upload) is available here: https://github.com/naiyerasif/JetBrainsMono/runs/5702196890?check_suite_focus=true