source-foundry / Hack

A typeface designed for source code
http://sourcefoundry.org/hack/
Other
16.39k stars 613 forks source link

Allow for setting a custom build directory #450

Open paride opened 6 years ago

paride commented 6 years ago

I'm thinking of introducing a build-time QA test for the Hack Debian package that compares the Debian built TrueType font with the reference fonts released upstream. This would be based on https://github.com/googlei18n/fontdiff. For this reason it would be useful to retain both the original TTF files as built upstream and the TTF files built for the Debian package. At the moment this is a little tricky, as the original fonts are shipped in the build/ directory, and so they are overwritten by the build scripts. I see two possible solutions to this:

  1. Ship the reference files in a different directory, e.g. reference-build/, and add build/ to .gitignore. This will also keep the git tree clean after building the font locally;
  2. Allow the build directory to be chosen at build time. This can easily done by patching the build scripts, with the exception of build-ttf.sh, where the build/ttf/ path is hardcoded in several places. It would be nicer to have a single TTF_BUILD="build/ttf" definition, as in the other build scripts.

Feel free to consider this a wishlist, low-priority issue. Thanks!

chrissimpkins commented 6 years ago

We can definitely support this Paride. Let me take a look through the build scripting and give some thought to the approaches that you suggested.

paride commented 6 years ago

Thanks! For sure there are other approaches, do what is best for your workflow.

chrissimpkins commented 6 years ago

Shouldn't be an issue. Tend to lean towards your suggestion 2. The refactor shouldn't be significant and I like the idea of providing the ability to customize the build directory path as a constant at the top of the files.