probonopd / font-leutkirch

Other
6 stars 0 forks source link

Generate otf #2

Closed probonopd closed 4 years ago

probonopd commented 4 years ago

Adobe afdko can supposedly convert ufo to otf. Since it is a command line based tool, we could run it on Travis CI easily.

How?

/isodevice/Applications/python3.8.2-cp38-cp38-manylinux1_x86_64.AppImage -m pip install afdko

export PATH=/home/me/.local/bin/:$PATH
/isodevice/Applications/python3.8.2-cp38-cp38-manylinux1_x86_64.AppImage /home/me/.local/bin/makeotf -f /home/me/font-rotation/source/SeN-CBL.ufo
Command '['tx', '-dump', '-0', '/home/me/font-rotation/source/SeN-CBL.ufo']' returned non-zero exit status 3.

tx -dump -0 /home/me/font-rotation/source/SeN-CBL.ufo
Failed to read lib.plist
tx: --- /home/me/font-rotation/source/SeN-CBL.ufo
tx: (ufr) source stream error

What is lib.plist and where is it supposed to be coming from?

probonopd commented 4 years ago

When we add an empty lib.plist inside the .ufo directory

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
</plist>

then

tx -dump -0 /home/me/font-rotation/source/SeN-CB.ufo

now proceeds but later steps of the conversion fail. So it seems like we need a properly populated lib.plist and especially a <key>public.glyphOrder</key>.

probonopd commented 4 years ago

For now being done using FontForge

probonopd commented 4 years ago

Thanks to https://github.com/adobe-type-tools/afdko/issues/1130 we can now use afdko to convert ufo to otf:

/isodevice/Applications/python3.8.2-cp38-cp38-manylinux1_x86_64.AppImage -m pip install afdko
export PATH=/home/me/.local/bin/:$PATH
/isodevice/Applications/python3.8.2-cp38-cp38-manylinux1_x86_64.AppImage /home/me/.local/bin/makeotf -f /home/me/font-leutkirch/source/LeutkirchSans-Light.ufo/
ls source/LeutkirchSans-Light.otf 
/isodevice/Applications/python3.8.2-cp38-cp38-manylinux1_x86_64.AppImage /home/me/.local/bin/otf2ttf /home/me/font-leutkirch/source/LeutkirchSans-Light.otf
ls source/LeutkirchSans-Light.ttf
probonopd commented 4 years ago

afdko is now being used.