source-foundry / Hack

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

Build not reproduceable #481

Closed copart closed 5 years ago

copart commented 5 years ago

Hi,

Trying to build the fonts. I tried both master and dev branch.

python3 -m venv venv venv/bin/python3 -m pip install fontmake venv/bin/python3 -m pip install fonttools venv/bin/python3 -m pip install fs venv/bin/python3 -m pip install ttfautohint-py

I then build, fontmake and fontbakery works.

However, in post processing: venv/bin/python3 -m ttfautohint -l 6 -r 50 -x 10 -H 181 -D latn -f latn -w G -W -t -X "" -I -m postbuild_processing/tt-hinting/Hack-Regular-TA.txt master_ttf/Hack-Regular.ttf master_ttf/hinted/Hack-Regular.ttf venv/lib64/python3.7/site-packages/ttfautohint/options.py:455: UserWarning: Option '-w' is deprecated! Use option '-a' instead UserWarning("Option '-w' is deprecated! Use option '-a' instead")) ttfautohint: ERROR: postbuild_processing/tt-hinting/Hack-Regular-TA.txt:3:1: invalid glyph name (0x204) uni0023 touch 0,1,2,3,18,19,20,21,22,23,24,25,26,27,28,31 x 0.25 @ 13

Any ideas?

habamax commented 5 years ago

I have the same error -- wanted to build slashed zero variant -- started with default font first.

And I have exactly the same error.

I do it on windows WSL opensuse leap 15.

chrissimpkins commented 5 years ago

Sorry. I have to update all of the documentation in the dev branch. I apologize for all of the troubles. I think that this may be related to how newer versions of the compiler (fontmake) treats the glyph names. We are named with production names in the ttfautohint scripts and I don't think that those are generated by default with the compiler any longer. All versions of the build tools are pinned using pipenv in the dev branch.

Give this a try:

Install pipenv globally:

$ pip install pipenv

Navigate to the Hack source that you cloned and use the make file target that builds all dependencies. This takes a bit of time because it compiles local pinned version installs of Harfbuzz, Freetype and ttfautohint, then builds all of the fonts (including web fonts + subsets).

$ make build-with-dependencies

After you make those upstream default fonts, you can just use the make target for the build that you want after you modify the source with alternates. For ttf builds only,

$ make ttf

Let me know if that is still a problem.

habamax commented 5 years ago

make build-with-dependencies

image

habamax commented 5 years ago

Not sure if the following error matters?

image

I do non-sudo make, should I do it with more privilegies?

habamax commented 5 years ago

sudo make build-with-dependencies has the same error as OP.

copart commented 5 years ago

can we use pip to request a specific version of fontmake? perhaps the version that you know worked. I am not too familiar with pip and if you can specifiy old versions.

habamax commented 5 years ago

As this is not a priority as far as I can see... Does anyone have hack ttfs with slashed 0? Or dotted 0?

Love this font and hate zero it has :)

chrissimpkins commented 5 years ago

Not that it is not a priority. It's just that there are unfortunately others that are higher on the list and I have been traveling this week... Sorry for the delay.

I will build new sets with slashed and dotted zeroes based on the current work in the dev branch, then push here over the weekend. This will provide me with an opportunity to review the build process and troubleshoot the issue here. It is likely to be a simple glyph name renaming issue in the ttfautohint control instructions files but I need to review the fonts to see what names we need to use as replacements for the uniXXXX names in the files that are causing problems.

habamax commented 5 years ago

Thx a lot, will wait for slashed one!

chrissimpkins commented 5 years ago

These were the type of changes that were required to build with the ttfautohint control instruction files:

p8axa-image

Conversion from the Unicode hexadecimal production names (uniXXXX) to the name of the glyph in the Basic Latin set does the trick and the build completes to the font files for me.

Note that when you build with alternates for the zero glyph, you need to remove (or comment out) the zero definition lines in each of the four control instructions files on the path postbuild_processing/tt-hinting/*.txt.

Swapping out source files now and will push the slash zero and dotted zero builds.

chrissimpkins commented 5 years ago

Slashed zero ttf builds based on dev branch at https://github.com/source-foundry/Hack/commit/db2d3feb771762953d571cfd3c2b76499f26c23d with current master versions of the alt-hack forward slash zeroes (https://github.com/source-foundry/alt-hack/tree/master/glyphs/u0030-forwardslash)

ttf.zip

chrissimpkins commented 5 years ago

Dotted zero ttf builds based on dev branch at https://github.com/source-foundry/Hack/commit/db2d3feb771762953d571cfd3c2b76499f26c23d with current master versions of the alt-hack dotted zeroes (https://github.com/source-foundry/alt-hack/tree/master/glyphs/u0030-dotted)

ttf.zip

chrissimpkins commented 5 years ago

The modifications in the ttfautohint control instructions files were pushed to the dev branch and you should be able to build from that branch without these errors now. Please let me know if this did not fix your build issues here.

Thanks much for this report!

habamax commented 5 years ago

Thank you! Slashed zero FTW!

chrissimpkins commented 5 years ago

@habamax enjoy!