Enable hyphenation for monospaced font

Teemu Likonen tlikonen at iki.fi
Fri Jul 30 10:37:51 CEST 2021

I need need to enable hyphenation for monospaced font. I use fontspec
package and Lualatex compiler. I currently do this with HyphenChar


This works but fontspec gives warning at the compile time:

    Package fontspec Warning: Ignored XeTeX-only feature: 'HyphenChar'.

Fontspec's manual says that HyphenChar is a Xetex-only feature except
HyphenChar=None which also works with Luatex. So, my HyphenChar=-
shouldn't work with Lualatex but it actually does.

What is the preferred, officially supported and documented way to enable
hyphenation for monospaced font using fontspec and Lualatex?

/// Teemu Likonen - .-.. https://www.iki.fi/tlikonen/
// OpenPGP: 4E1055DC84E9DFF613D78557719D69D324539450
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: not available
URL: <https://tug.org/pipermail/texhax/attachments/20210730/db475d99/attachment.sig>

More information about the texhax mailing list.