mirror of
https://github.com/JetBrains/JetBrainsMono.git
synced 2024-08-16 11:40:37 +03:00
Merge pull request #535 from naiyerasif/feat/vwebfonts
Generate variable webfonts
This commit is contained in:
commit
2a2595ada7
4
.github/workflows/build-fonts.yml
vendored
4
.github/workflows/build-fonts.yml
vendored
@ -38,7 +38,9 @@ jobs:
|
|||||||
update-wheel: "true"
|
update-wheel: "true"
|
||||||
update-setuptools: "true"
|
update-setuptools: "true"
|
||||||
- name: Build fonts
|
- name: Build fonts
|
||||||
run: gftools builder sources/config.yaml
|
run: |
|
||||||
|
gftools builder sources/config.yaml
|
||||||
|
python scripts/generate_variable_webfonts.py
|
||||||
- name: Upload Fonts
|
- name: Upload Fonts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
@ -1 +1,2 @@
|
|||||||
gftools
|
gftools
|
||||||
|
fonttools[woff]
|
||||||
|
9
scripts/generate_variable_webfonts.py
Normal file
9
scripts/generate_variable_webfonts.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import glob
|
||||||
|
import os
|
||||||
|
from fontTools.ttLib import TTFont
|
||||||
|
|
||||||
|
for filepath in glob.iglob('fonts/variable/*.ttf'):
|
||||||
|
f = TTFont(filepath)
|
||||||
|
f.flavor = 'woff2'
|
||||||
|
print('INFO:fontTools.ttLib.woff2:Building WOFF2 for ' + filepath)
|
||||||
|
f.save(os.path.splitext(filepath)[0] + '.woff2')
|
Loading…
Reference in New Issue
Block a user