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

Building from source on Linux #417

Closed
alexmyczko opened this issue Nov 1, 2020 · 15 comments
Closed

Building from source on Linux #417

alexmyczko opened this issue Nov 1, 2020 · 15 comments

Comments

@alexmyczko
Copy link

alexmyczko commented Nov 1, 2020

Problem description
One of the imported modules is macOS only?

Expected behavior
Maybe a print on non macOS could be run instead?

To Reproduce
Build it on Linux

Environment (please complete the following information):

  • OS: Debian GNU/Linux sid on amd64
  • Browser: n/a
  • Fonts: latest release
@arrowtype
Copy link
Owner

Thanks for taking the time to write an issue, @alexmyczko!

Quick question: are you completely unable to run the build due to the mac-only dependency, or are you only unable to use the --pync option to get a notification for build completions? I tried to make this an option so it wouldn't disrupt the build on other OSes, but I may have done it incorrectly.

@alexmyczko
Copy link
Author

well where to start. i try to build without venv, but then there is so much requirements not packaged to build. i am now trying to get it to build with ufo2otg/ufo2glyphs and/or fontmake but keep failing there too (i dont want to build the vf part)

@arrowtype
Copy link
Owner

arrowtype commented Nov 1, 2020

Hmm, yes, it is a bit of a complex project to build. Mostly, to be honest, it is setup for myself to build as I work on finishing things up.

Is there a certain reason you want to build this on your own? Is there a certain reason you want to avoid using venv?

there is so much requirements not packaged to build

Sorry! Have I missed anything in the readme, or is there anything specific you might suggest adjusting to make it easier for someone on Linux to build?

@alexmyczko
Copy link
Author

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=944202

someone asks for it for debian, and we build everything from source (if possible). ubuntu, raspbian get a free copy.

@arrowtype
Copy link
Owner

arrowtype commented Nov 1, 2020

Nice, thanks for that detail!

Might the fonts in the official releases work for this purpose?

@alexmyczko
Copy link
Author

alexmyczko commented Nov 1, 2020

Theoretically yes, but preferred are built from source (and that is what I would also like to do) if somehow possible - sorry I didn't answer the other questions yet (but will try to get to that asap)

What software with do you design the font? Do you have .glyphs by any chance?

@arrowtype
Copy link
Owner

I didn't answer the other questions yet (but will try to get to that asap)

All good, no rush. Yeah, I’d be happy for this to work for you, and grateful if you have any suggestions on how I can improve the Build docs for Linux users. I’m most curious if the venv & requirements will work ... to my knowledge, pync is the only thing that requires macOS, but it is totally optional (just a convenience thing for me, so I can multitask during the somewhat long build process). As far as I know, all other build dependencies are cross-platform.

If you wish to generate woff2 files, you will probably need to install woff2_compress separately.

What software with do you design the font? Do you have .glyphs by any chance?

I used RoboFont for this, as I prefer the UFO format for source control and some of the extensions in the RoboFont ecosystem. The main build preps clean sources (getting rid of glyphs that are experiments/sketches), then uses AFDKO to build static fonts and FontMake to build the variable font.

@alexmyczko
Copy link
Author

i've got a hard time to decide what's worse/better, robofonts or fontship/npm: be5invis/Iosevka#715

@alerque
Copy link

alerque commented Nov 6, 2020

@alexmyczko I'm not sure what your beef is with Fontship, but don't lump it into the same bucket as npm (chaos, and not really suited to being a build system for non JS projects) or robofonts (proprietary). Fontship is just a convenience cli and way to making all the open source build toolchain stuff work together without reinventing the wheel every time. Under the hood it's just using fontmake, psautomint, and woff2_compress and many other similar tools tied together using GNU Make to build targets. It should be quite Debian philosophy friendly. It's also not quite up to the task of being a drop in replacement for this font yet. But why are you knocking on this project's open source build chain and open sources just because the author happens to work on those sources in Robo Font?

@alexmyczko
Copy link
Author

didn't mean to be rude or knock around randomly, but your reply clarified a few things, so thank you for that.

@arrowtype
Copy link
Owner

Yup, my use of RoboFont makes this somewhat more open-source friendly than a project that uses GlyphsApp (even if in your particular case, this is slightly inconvenient – sorry that is the case right now!).

Either way, though, there are tools that can handle the sources and build them.

I’m closing this issue, but if you have any outstanding specific questions or build blockers, feel free to add further comments, or open new issues with the specific problem.

Thanks!

@arrowtype
Copy link
Owner

Also, I’m guessing you already saw this, but the readme includes fairly specific instructions for building. Basically:

  1. Install dependencies
  2. Run the prep scripts
  3. Run the build (but don’t use the --pync option)
version=1.066 # (replace version number)
python build.py --statfiles --version $version
python build.py --static --version $version

Let me know if you have any blocking errors due to Pync, and I can either remove it or try to make sure it isn’t activated outside of Mac environments.

@alexmyczko
Copy link
Author

no idea what's missing now...

python3 build.py --static --version $version
🏗  Initial OTF building
Traceback (most recent call last):--------------------| 0.0% Complete
  File "build.py", line 83, in <module>
    build_static(files["cff"], files["ttf"], out)
  File "/var/www/debian/fonts-recursive/fonts-recursive-1.066+dfsg/mastering/build_static.py", line 7
59, in build_static
    makeSFNT(cff_root, d)
  File "/var/www/debian/fonts-recursive/fonts-recursive-1.066+dfsg/mastering/build_static.py", line 6
89, in makeSFNT
    run = subprocess.run(args,
  File "/usr/lib/python3.8/subprocess.py", line 489, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'makeotf'

@alerque
Copy link

alerque commented Nov 13, 2020

@alexmyczko makeotf is part of AFDKO, which is listed in the requirements file.

@alexmyczko
Copy link
Author

well today one can install https://github.com/alexmyczko/fnt and just say: fnt install recursive

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