maranget / hevea

Hevea is a fast latex to html translator
http://hevea.inria.fr
Other
98 stars 11 forks source link

correct use of Zero Width Joiner? #60

Closed sanette closed 3 years ago

sanette commented 3 years ago

This follows up from https://github.com/ocaml/ocaml/issues/10254 When Hevea is applied to the Ocaml manual, it produces section titles like this one:

'Chapter\u2004\u200d2\u2003The module system'

The \u200d is "Zero Width Joiner", and AFAIU is supposed to be used to combine two letters (producing ligatures, for instance). Somewhat strangely here it has the effect that Firefox changes the font of the following char "2". So I was wondering, maybe this is an incorrect use of this "ZWJ".

Octachron commented 3 years ago

I didn't notice that the zero-width joiner was mixing a white space and a number. It does seem unlikely that font renderers would known how to handle such combination. A combination of narrow non-breaking space would probably work better with most font renderer.

maranget commented 3 years ago

Merged PR #61 should fix the issue.

maranget commented 3 years ago

Since PR #61 has been merged, I close the issue.