(Is this possible?) Font-forge python script modify font to add ligatures

Viewed 293

For those more in the know than I am; I'm looking to try to work out whether a certain fontforge/python script would be possible. ATM I have no clue, and I'm hoping someone more knowledgeable than me would be willing to let me know and possibly even give me a few pointers :)

What I'm Trying to Do

I'd like to add a bunch (of the order 10^3) ligatures to a font, more along the lines of mapping 'words' to pre-existing symbols. This is for use with latex code, so an example would be \times → Ɨ.

I'm trying to determine if, and how easy it would be, to:

  • given an arbitrary font
  • go through a list of 'words' and associated symbols by Unicode codepoint
  • create a new ligature mapping that word to the symbol
  • which is added to a new font, with a name like the_font-latex-ligaturised
  • if the symbol doesn't exist for the arbitrary font, try to get the symbol for a fallback font

Why I think this might be possible

In my search so far for more info I've come across pages such as https://github.com/ToxicFrog/Ligaturizer that appear to do similar things.

Why I'm not sure that it is, and don't have a good idea of what would be involved

I've never used font forge, let alone the python module before, so I'm not quite sure how it works, and precisely what can and can't be done.

What I'm looking for

I know this may not be the best question ever asked on stack overflow, and I've definitely got a good amount of investigation to go regardless, but I thought before I actually got started it may be a good idea to get the wisdom of those that know far more about this than I do. Just a 'yes this is possible' or 'not easily' would be helpful. If I could even get a few pointers that would be fantastic!

Any advice appriciated :)

0 Answers
Related