Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Builder] sometimes fails at OTFautohint step because it tries to build || file #1004

Open
arrowtype opened this issue Jul 9, 2024 · 5 comments · May be fixed by #1007
Open

[Builder] sometimes fails at OTFautohint step because it tries to build || file #1004

arrowtype opened this issue Jul 9, 2024 · 5 comments · May be fixed by #1007

Comments

@arrowtype
Copy link
Contributor

I’m not really sure what’s happening here, but I’ve run into the same issue intermittently, so I wanted to report it. It only happens occasionally, and tends to sort itself out with a re-run, so it’s nothing super serious. But, it is a little confusing, and could be a problem worth solving.

Basically, it seems like the GF Builder will occasionally create a file called simply ||, then try to run it through the OTFautohint step. This doesn’t work, so it gives me the following error:

fontmake --output-path /tmp/tmpm2b7lj3i -o otf -u sources/ufo/instance_ufos/Familyname-Black.ufo.json --filter ... --filter FlattenComponentsFilter --filter DecomposeTransformedComponentsFilter
[24/31] autohintOTF
FAILED: /tmp/tmptz84cwqz 
/gftools/bin/python -m gftools.builder.jobrunner otfautohint  -o /tmp/tmptz84cwqz /tmp/tmpc31o27cq \|\| otfautohint  -o /tmp/tmptz84cwqz /tmp/tmpc31o27cq --no-zones-stems 

Command failed:
otfautohint -o /tmp/tmptz84cwqz /tmp/tmpc31o27cq || otfautohint -o /tmp/tmptz84cwqz /tmp/tmpc31o27cq --no-zones-stems

usage: otfautohint [-h] [-v]
                   [-g GLYPH_LIST | --glyphs-file PATH | -x GLYPH_LIST | --exclude-glyphs-file PATH]
                   [-m GLYPH_LIST | --overlaps-file PATH | --force-overlap | --force-no-overlap]
                   [--log PATH] [-p PROCESSES] [--version] [--traceback]
                   [-o PATH [PATH ...]] [-r PATH] [-b PATH] [-a] [-w] [-k]
                   [-c | --report-only] [-d] [--no-flex] [--no-hint-sub]
                   [--no-zones-stems] [--fontinfo-file PATH]
                   [--ignore-fontinfo]
                   [--print-list-fddict | --print-all-fddict] [--doc-fontinfo]
                   [--info] [--max-segments MAX_SEGMENTS] [--test]
                   [FONT ...]
otfautohint: error: argument -o/--output: /fonts/Familyname/|| is not a valid path to write to.

This has happened for various different fonts, and it generally works itself out if I simply re-run the build. I’m not sure what causes it, but because it works out without any changes from me, I don’t think it’s an issue in my fonts or my config files. As a total guess, maybe it’s something like a race condition, or a random glitch of temporary file naming, or something similar and slightly unpredictable. I mostly just wanted to record it in case others run into this, or in case there’s an obvious solution.

I’m on gftools 0.9.61, and my current config file looks like this:

familyName: Familyname
buildSmallCap: false
buildStatic: true
buildVariable: false
buildWebfont: false
autohintOTF: true
autohintTTF: true
interpolate: true
outputDir: ./fonts
sources:
  - sources/ufo/Familyname.designspace
recipeProvider: googlefonts
recipe:
  fonts/variable/FamilynameVariable[wdth].ttf:
    - source: sources/ufo/Familyname.designspace
    - args: --filter ...  --filter FlattenComponentsFilter --filter DecomposeTransformedComponentsFilter
      operation: buildVariable
    - args: "fix-nonhinting $in $out"
      exe: "gftools"
      operation: exec
    - args: "../scripts/rename-fonts.py $in --new_name 'Familyname Variable' && cp $in $out"
      exe: "python3"
      operation: exec
@simoncozens
Copy link
Contributor

Looks like a quoting problem.

@arrowtype
Copy link
Contributor Author

Oh, that would make sense. Just to clarify: are you guessing that the quoting problem is in my config file, or in GFtools?

@simoncozens
Copy link
Contributor

No, it's in gftools, we're passing a command to another command, and probably mucking up the shell quoting when we do so.

@arrowtype
Copy link
Contributor Author

Okay, makes sense. Thanks for the quick response, and for the further explanation!

@aragon999 aragon999 linked a pull request Jul 15, 2024 that will close this issue
@m4rc1e
Copy link
Collaborator

m4rc1e commented Jul 17, 2024

@arrowtype could you test out #1007? If you have the repo on github, I can do it for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants