Fontbakery: [com.google.fonts/check/ftxvalidator_is_available] ftxvalidator not available warning despite binary

Created on 11 Mar 2020  ·  10Comments  ·  Source: googlefonts/fontbakery

Observed behaviour

After a bunch of trouble getting ftxvalidator installed I can confirm it is installed by calling the binary. Calling fontbakery consequently still complains about missing ftxvalidator.

``$ ftxvalidator ftxvalidator build 207, FontToolbox.framework build 335 Usage: ftxvalidator [-hlrSTvV] [-t testList] [-o outputfile] fontfile Options: -e An optional list of tests to exclude -h Output this message -K (--check-build-number) Check that the tool is at least the given version ftxvalidator-K 200` returns -1 if the build number is not 200 or higher
-l List available tests
...
$ fontbakery check-googlefonts AnyFont.ttf
...

com.google.fonts/check/ftxvalidator_is_available
Is the command ftxvalidator (Apple Font Tool Suite) available?

  Rationale:
  There's no reasonable (and legal) way to run the command `ftxvalidator`
  of the Apple Font Tool Suite on a non-macOS machine. I.e. on GNU+Linux or
  Windows etc.

  If Font Bakery is not running on an OSX machine, the machine running Font
  Bakery could access `ftxvalidator` on OSX, e.g. via ssh or a remote
  procedure call (rpc).

  There's an ssh example implementation at:
  https://github.com/googlefonts/fontbakery/blob/master/prebuilt/workarounds/ftxvalidator/ssh-implementation/ftxvalidator

* WARN: ftxvalidator is not available.

Result: WARN

```

Expected behaviour

Perform ftxvalidator checks.

Resources and exact process needed to replicate

Not sure _how_ to reproduce it aside from simply running the above commands in my setup. Happy to help debug this further.

Support

All 10 comments

thanks for reporting. I will take a look at it

I've just improved the way ftxvalidator is handled. It would be important that you test whether this solves your problem. Please let me know.

For now I will close the issue, but please be sure to reopen it if fontbakery from git master still causes trouble for you.

No such luck :/

(signika) Johanness-iMac:Signika johannes$ ftxvalidator
ftxvalidator build 207, FontToolbox.framework build 335
Usage:  ftxvalidator [-hlrSTvV] [-t testList] [-o outputfile] fontfile
Options:
    -e An optional list of tests to exclude
    -h Output this message
    -K (--check-build-number) Check that the tool is at least the given version
        `ftxvalidator-K 200` returns -1 if the build number is not 200 or higher
    -l List available tests
    -o An optional output file for test results; stdout is used if this parameter is not specified
    -r Generate a full report
    -S Generate a summary report
    -t The tests to execute.  Valid inputs are:
        "all", execute all tests,
        "core", execute the core test set,
        "default", execute the default test set,
        or a list of font test types, separated by commas,
        or a list of test identifiers, separated by commas`
    -T Generate a tabular report
    -v Verbose operation, additional data is output to stderr
    -V Output the tool's version to stdout
    -W (--suppress-warnings) Suppress warning messages
(signika) Johanness-iMac:Signika johannes$ fontbakery --version
0.7.25.dev3+g2b9dc662
(signika) Johanness-iMac:Signika johannes$ fontbakery check-googlefonts fonts/signika/Signika-Regular.ttf -c com.google.fonts/check/ftxvalidator_is_available -v
Start ... running 1 individual check executions.
 >> com.google.fonts/check/ftxvalidator_is_available
    Is the command `ftxvalidator` (Apple Font Tool Suite) available?


      Rationale:
      There's no reasonable (and legal) way to run the command `ftxvalidator`
      of the Apple Font Tool Suite on a non-macOS machine. I.e. on GNU+Linux or
      Windows etc.

      If Font Bakery is not running on an OSX machine, the machine running Font
      Bakery could access `ftxvalidator` on OSX, e.g. via ssh or a remote
      procedure call (rpc).

      There's an ssh example implementation at:
      https://github.com/googlefonts/fontbakery/blob/master/prebuilt
      /workarounds/ftxvalidator/ssh-implementation/ftxvalidator

    * WARN: Could not find ftxvalidator.

    Result: WARN


Total:

    ERROR: 0
    FAIL: 0
    WARN: 1
    INFO: 0
    SKIP: 0
    PASS: 0

[W] 100%

DONE!

    Meaning of check results:

    An ERROR is something wrong with FontBakery itself, possibly a bug.
    A FAIL is a problem with the font that must be fixed.
    A WARN is something that you should consider addressing.
    An INFO result simply prints something useful. Typically stats.
    A PASS means the font looks good for the given checking routine.
    And a SKIP happens when the check does not apply to the given font.

    If you get ERRORs, please help us improve the tool by reporting them at
    https://github.com/googlefonts/fontbakery/issues

    (but other kinds of bug reports and/or
     feature requests are also always welcome, of course!)

I was wondering... with the install hazzle of ftxvalidator what I ended up with is a binary that is copied into my ~/bin which is in my PATH, and as see above just running $ ftxvalidator calles the binary, however $ which ftxvalidator finds nothing — could the same reason which does not find it also be by Fontbakery does not find it? I don't think the location of the file should matter as long as its in my PATH, but the which coming up with nothing seems odd and maybe is an indicator of something wrong with my setup?

maybe is an indicator of something wrong with my setup?

Did you try to log out and log in again, or even restart. I had to do this recently after an update, which didn't find stuff as well. Maybe it was just that .profile had to be executed again. This was on a Linux though.

could the same reason which does not find it also be by Fontbakery does not find it?

Indeed, fontbakery uses which to figure out where the binary is.

It seems to me that this is not a fontbakery bug anymore since your which command not working is clearly something else bad in you setup. But I'll keep the issue open for a while in the hope we can continue this conversation and try to find a solution that works for you.

Ah 🤦 Had ~/bin in my PATH, which resolves in the shell when called, but not for which.

I'm glad you figured it out :-)

Yes, nice of you to see it that way, I hope the improvements you made to the detection mechanism prompted by this report are still useful; should have probably tried to narrow down more what could be the cause 👍
TIL shutil has a which command ;)

I've mislabeled an unrelated "units per em criteria" commit pointing to this issue. Sorry!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

felipesanches picture felipesanches  ·  9Comments

bghryct picture bghryct  ·  8Comments

kontur picture kontur  ·  6Comments

m4rc1e picture m4rc1e  ·  7Comments

josh-hadley picture josh-hadley  ·  6Comments