psb1558 / Elstob-font

A variable font for medievalists

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build_font ſcript potentially broken on Linux

Alice196498 opened this issue · comments

When trying to build a fount, I get the following error : /home/alice/Elstob-font/sources/build_font: line 123: Echo: command not found , which is followed by warning: failed to load external entity "del_usanchor.xsl" cannot parse del_usanchor.xsl

Editing the ſcript to replace “ Echo ” with “ echo ” on line 123 fixes the firſt, but the ſecond ſtill occurs. I am unſure why it is failing to load or parſe this file.

Funny that the script has been running on the Mac despite that erroneous E in echo (which I've corrected).

I assume that you're running the script in a complete copy of the sources directory? I.e. del_usanchor.xsl is in the same directory as build_font.

I've got Ubuntu running in a VM on my Mac: I'll see if I can get the script working there.

I can't duplicate the error from xsltproc running the build script under Ubuntu, thus:

./build_font -n Elstob.ttf

One thing I did learn while doing this experiment is that it's pretty important to run in a virtual environment. First make sure you've got Python 3.7 or later (version on the current Ubuntu LTS is 3.8.N), and do this to make and enter the virtual environment:

python3 -m venv ./p38 (or whatever you want the dir for the virtual environment to be named)
source ./p38/bin/activate

Then use pip to install fontmake and run the command as above (where the -n skips hinting, which you don't really need on a Linux system).

Maybe I'll make a build script for Linux, but for now I recommend these edits to build_font:

  • lines 114 and 125: change gsed to sed.
  • In line 188 change option -a to -A (this will skip autohinting of static instances; or if you want hints, make sure ttfautohint is installed on your system)
  • And of course Echo to echo in line 123.

Then you should be able to build the static fonts (seven instances) with

./build_font -t -i Elstob.glyphs

Omit the -i for a bigger collection of instances.

I’ve carefully followed your inſtructions as written here, and it does build ſucceſsfully. The trouble was the Echo and not building in a virtual environment. This may be cloſed, as it is reſolved.

The latest version of build_font should run in a Linux terminal without editing. There are now two more options, -s for setting the italic slant and -p for setting the width of the space characters. Run ./build_font -h for details.