foliojs / fontkit

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

'ff' ligature in Source Han renders wierdly #197

Closed casperno closed 5 years ago

casperno commented 5 years ago

When rendering 'ff' in Source Han Sans, the ligature looks very strange. Reproducible on https://fontkit-demo.now.sh/

Same font with ligature looks ok in Indesign, but give the nature of CJK fonts, I'm not sure that it's a direct comparison.

SourceHanSansCN_Normal.otf.zip

Pomax commented 5 years ago

Got a screenshot of what you're seeing it do vs. what indesign makes it look like for you?

Using the official Source Han Sans CN I see this, which looks pretty okay to me:

image

And using the unicode "preassigned" ligature codepoints (,,,,):

image

casperno commented 5 years ago
Skjermbilde 2019-03-14 kl  21 21 58

This is what I get using SourcHanSansCN_normal, _bold look even stranger.

Pomax commented 5 years ago

Your attached font indeed looks broken, but using the official releases I can't reproduce this, and if I use a tool like Font Creator to subset your font to only have the latin block (with ligatures) things look fine again, so it feels like wherever you got your copy of the font did something to it (it's 50% the size of the official release, for example) that subtly breaks it.

casperno commented 5 years ago

Thank you so much for looking into this. The font came from a client — replacing it with the official version does seem to be the best choice. Or disable ligatures.