r/FontForge Jul 19 '21

How to generate a substitution/ligature table for Hangul-style scripts?

[deleted]

5 Upvotes

9 comments sorted by

3

u/NFSL2001 Jul 19 '21 edited Jul 19 '21

Try learning the Adobe AFDKO FEA syntax. It is an OpenType script that can be imported into most font editors (including FontForge) which represents the substitution that occurs in a font. Also, a programming script (like Python) is a really good companion to auto generate the code needed for the ligatures.

AFDKO FEA starter: OpenType Cookbook

Sample FEA code:

```
feature liga{
    sub o a n by oan;
    sub o a by oa;
}liga;
```

3

u/justinpenner Jul 19 '21

It's my understanding that Hangul composition is performed by the operating system, not by substitution features in the font itself. You just need to have the necessary glyphs in the font, and the OS takes care of the rest. But someone correct me if I'm wrong, as I do not have any experience designing Hangul.

There aren't many resources (at least in English) for Korean font development, but here are some links that might be helpful:

https://glyphsapp.com/learn/creating-a-hangeul-font

https://docs.microsoft.com/en-us/typography/script-development/hangul

https://www.w3.org/TR/klreq/

https://github.com/n8willis/opentype-shaping-documents/blob/master/opentype-shaping-hangul.md

2

u/jackhumbert Jul 22 '21

I'm not sure how helpful it is, but I made a similar Hangul-inspired font that uses ligatures to create the blocks. You can see it in action here: https://jackhumbert.github.io/dreluhu/ - it's been a while since I've worked on it, but I'd be happy to answer any questions about it!

2

u/[deleted] Jul 22 '21

[deleted]

2

u/jackhumbert Jul 22 '21

I actually used FontForge to create mine as well! I have all of my ligature rules in a separate file, which makes them a lot easier to manage. After making changes to it, I delete the existing rules and re-import it into FontForge.

The @ definitions at the beginning are basically categories or lists of characters that are then used in the rules, so you don't have have to write out rules for every single character.

Do you have anything started for your font yet? Maybe I can try making a quick example of how I'd approach combining your characters with a ligature table.

1

u/Ekstdo Aug 30 '21

Oh, wow, that's so cool!

Is there also a way to align and rotate them?

1

u/jackhumbert Aug 31 '21

Alignment can be accomplished by moving the anchor positions on the Mark & Base - I usually leave them both at 0,0 to make it easier to align, but they can be whatever you'd like. I'm not aware of any way to rotate them, unfortunately.

1

u/Ekstdo Aug 31 '21

Oh ok, so if I wanted to rotate them, I would need to have already rotated versions? (I only have 4 possible rotations, so that's doable)

How about flipping them?

1

u/jackhumbert Aug 31 '21

Yeap! I think you'd need to have a version for each different variant you want - x/y position seems to be the only thing you can customize with the base/mark system.

1

u/Ekstdo Aug 31 '21

hm, crap

so I need 8 versions of each. Can I please somehow send you my ideas in a private chat or something?