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

Running fontcustom on Windows 7 'apparently requires' woff2 as a dependency thus failing compilation. #362

Open
classicmike opened this issue Dec 6, 2017 · 4 comments

Comments

@classicmike
Copy link

I'm currently trying to get fontcustom installed on a windows machine I have. I have followed the instructions as provided in the readme. Keep note that it makes no mention to explicitly install the Woff2 package from Google. Only Linux and Mac have those instructions.

When I try to run a compile step, the compilation fails like so:
screen shot 2017-11-22 at 5 46 37 pm

It make mention that woff2_compress doesn't exist in the file system.

Upon checking the source code

  • From the initialisation of the fontcustom script it runs check_woff2 as below:
    screen shot 2017-11-22 at 5 49 17 pm

It's not checking whether or not we are currently running windows bfore the woff2_compress check.

So that means one of two things:

  1. If I am required to install woff2 anyway that means the documentation is not that accurate and will need to be updated
  2. If we don't actually need to install woff2, then we need to check if we are currently running on windows before running the woff2 check.

Thanks.

@Szmiglo
Copy link

Szmiglo commented Dec 22, 2017

+1

@TWiStErRob
Copy link

TWiStErRob commented Mar 17, 2019

Raised PR for doc updates

@TWiStErRob
Copy link

TWiStErRob commented Mar 17, 2019

This error comes because which is not a Windows command, but you can easily polyfill it:
which.bat somewhere on path:

@echo off
where %*
exit /B %errorlevel%

Note that if you do this you can bypass the check_woff2 by adding an extra echo in there which fails the string comparison.

As far as I could see woff2 support is not necessarily required to run fontcustom. It'll generate the other files no problem, and the CSS which refers to woff2 files, but they won't exist. I know this because I forgot the exit line.

@TWiStErRob
Copy link

Raised PR to not crash, but tell the user to install.

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

No branches or pull requests

3 participants