tonsky / FiraCode

Free monospaced font with programming ligatures
SIL Open Font License 1.1
76.92k stars 3.09k forks source link

Is there any standard to follow to implement this feature on my own editor? #354

Closed vhanla closed 7 years ago

vhanla commented 7 years ago

I'm trying to add this ligature support to my programming editor, so I'm new to this ligatures feature and I really love it, but I don't know if all fonts supporting ligatures does respect a standard or I have to map those characters to their corresponding/equivalent ligature character depending on the chosen font?

Since I couldn't find any info regarding ligatures and its implementation on editors, I had to ask about it here, and I hope you can drive me to the right direction. Thanks by advance.

BTW: I love Fira Code. Kudos.

tonsky commented 7 years ago

Ligatures in Fira Code are implemented on top of calt, or contextual alternates, opentype feature. Another way it might be implemented is by using liga opentype feature. They both gets compiled down to GSUB substitution table, I believe, or something like that. I’m not an opentype expert, but maybe these keywords could drive you into the right direction

vhanla commented 7 years ago

Thank you, I will do more research.