The pngquant command is now available as 'pngquant-cli' on PyPI so we can install it with pip like the rest of the dependencies: https://pypi.org/project/pngquant-cli
I still had to wrap the pngquant command with a script that handles two special error codes 98 (output larger than input) and 99 (conversion quality below minimum) by copying the input file to the output file. The noto-emoji Makefile has a similar rule. If we don't add that, then a bunch of noto-emojis would fail to quantize (e.g. the standalone skin tone modifiers e.g. 🏽), as ninja sees the non-zero exit code and stops early.
I tried running this on my local machine and I now get a CBDT noto-emoji font which is around 10MB large (only 220KB larger than the original, not sure exactly where the extra bytes come from but I think it's a good start).
I'm going to add some tests that check that everything runs as expected
The pngquant command is now available as 'pngquant-cli' on PyPI so we can install it with pip like the rest of the dependencies: https://pypi.org/project/pngquant-cli
I still had to wrap the pngquant command with a script that handles two special error codes 98 (output larger than input) and 99 (conversion quality below minimum) by copying the input file to the output file. The noto-emoji Makefile has a similar rule. If we don't add that, then a bunch of noto-emojis would fail to quantize (e.g. the standalone skin tone modifiers e.g. 🏽), as ninja sees the non-zero exit code and stops early.
I tried running this on my local machine and I now get a CBDT noto-emoji font which is around 10MB large (only 220KB larger than the original, not sure exactly where the extra bytes come from but I think it's a good start).
I'm going to add some tests that check that everything runs as expected