kiliman / operator-mono-lig

Add ligatures to Operator Mono similar to Fira Code
MIT License
3.2k stars 202 forks source link

Running ./build.sh just create build folder with empty #171

Closed umardevid closed 2 years ago

umardevid commented 3 years ago

Hi I running ./build.sh but why doesn't do anything, but just create build folder with empty

gu3s commented 2 years ago

...

kiliman commented 2 years ago

Ugh. Sorry I didn't see this issue before.

Did you make sure you copied your Operator Mono fonts into the ./original folder?

The filenames should not includes spaces and look like this:

relandboyle commented 2 years ago

Hi. I can confirm I did the above. Files are in the ./original folder. Errors are like:

Building OperatorMonoLig-Book ./build.sh: line 20: ttx: command not found Reading original font file ./original/OperatorMono-Book.ttx internal/fs/utils.js:314 throw err; ^

Error: ENOENT: no such file or directory, open './original/OperatorMono-Book.ttx'

kiliman commented 2 years ago

If ttx is not found, then that means fonttools has not been installed properly. Did you make sure that all the prerequisites have been installed?

relandboyle commented 2 years ago

@kiliman I believe I have installed the prerequisites.

I'm new to Python but I had Python 2.6 installed previously. The README says I need Python 2.7+ so I installed a recent version. I though I was getting Python 3.10 but when I check the version it says it's 3.8.10. Do I need the version to be 2.x?

I had to install pip, which I did.

I installed fonttools. If I run 'pip install fonttools' again now I see: Requirement already satisfied: fonttools in ./.local/lib/python3.8/site-packages (4.27.1)

This is on a Win 10 machine, using the terminal in VS Code, working in the WSL2/Ubuntu file system.

kiliman commented 2 years ago

Yes, any version 2.7+ including 3+.

Ok, since fonttools is installed, it looks like it's not in the PATH.

I tried it on WSL and for some reason packages installed using pip3 don't show up in the PATH automatically. However, the shell did prompt me to run sudo apt install fonttools instead. So after running that command, I was able to run ttx and fonttools

Let me know if that helps.

image

relandboyle commented 2 years ago

Yes, that did help. Thank you very much.

I now have four .ttx files in the /original folder, the same four .ttx files in the /build folder, and the corresponding /otf files in the build folder.

It handled light, light italic, book, and book italic but missed medium, medium italic, bold, and bold italic for some reason. I'm not sure if the file names would make a difference here. The file names do not include spaces. They also do not include 'SSm' as in the README.

image

Thanks again.

kiliman commented 2 years ago

Good. I'm glad you got it working.

The .ttx files in the original folder is the XML description of the original font. The tool adds the ligatures to this .ttx file and writes it to the build directory where it is used to generate the new font with ligatures.

Currently, I only have ligatures for Book and Light weights for the standard Operator Mono family. There are Book, Light, Medium, and Bold weights for Operator Mono SSm (ScreenSmart). Each set of ligatures have to be generated by hand for all the weights (including italic versions as well). Unfortunately I didn't have time to work on those other weights.

Anyway, I'm glad you were able to get it working. If you want to update the README, I'll gladly accept a pull request. Thanks!

relandboyle commented 2 years ago

I added the note and submitted a PR.

Thanks again for your help.

I'm not sure if I'll have the time or ability to help out with ligatures for the remaining font weights but I would love to contribute if I can.

kiliman commented 2 years ago

Thanks for the PR!