FiraCode icon indicating copy to clipboard operation
FiraCode copied to clipboard

Failed custom build with features

Open unennhexium opened this issue 7 months ago • 2 comments

Trying to build custom font version using the following command:

./script/build.sh --family-name "Fira Code Custom" --weights "Regular,Medium,SemiBold,Bold" --features "cv06,cv12,cv14,ss04,cv18,cv31,ss02,ss09,cv25,cv26,cv32,cv28,ss06,ss07,ss10"

..., which produces the following output:

Creating font with these features: cv06 cv12 cv14 cv18 cv25 cv26 cv28 cv31 cv32 ss02 ss04 ss06 ss07 ss09 ss10
sed: -e expression #1, char 1: unknown command: `-'

... due to unfound name = calt line in previous expression using sed.

The error comes from ./script/bake_in_features.sh#L28. There is no line "name = calt;" in glyphs file, hence linenum=((linenum - 1)) is actually linenum=((0 - 1)), so sed -i -e '-1s@...@...@' uses invalid pattern.

unennhexium avatar Jun 03 '25 09:06 unennhexium

I have tried to fix this by changing the script, so it searches the first line beginning with "name =" and inserts code blocks above. Then the build successes, but produced font has no features. You should correct the script, since I'm not familiar with glyphs file format and does not know, to where actually the code blocks should come.

unennhexium avatar Jun 03 '25 09:06 unennhexium

Thanks!

tonsky avatar Jun 03 '25 14:06 tonsky