foliojs / fontkit

An advanced font engine for Node and the browser
1.46k stars 219 forks source link

Mongolian font support in fontkit ???? #222

Open mhjy opened 4 years ago

mhjy commented 4 years ago

I need Mongolian font support in fontkit. I don't know how to do it. The Mongolian font used the 5 features: isol, init, medi,fina and rlig.

devongovett commented 4 years ago

Mongolian should already be handled by the Arabic shaper due to it's similarity. There may be some differences that we don't handle though. Do you have a test case that's failing?

The Arabic shaper is based on code from Harfbuzz. Looks like they have a few Mongolian specific features that we don't. Maybe a place to start? https://github.com/harfbuzz/harfbuzz/blob/2dda6dd744b192616c65ca4aa5fce8e90fd0ff30/src/hb-ot-shape-complex-arabic.cc#L348