Enable hyphenation for monospaced font

Bob Tennent rdtennent at gmail.com
Fri Jul 30 16:48:58 CEST 2021


Sounds like the fontspec doc is not up to date.  Not a big deal.  Report it.

Bob T.

On Fri, Jul 30, 2021 at 10:08 AM Teemu Likonen <tlikonen at iki.fi> wrote:

> I need need to enable hyphenation for monospaced font. I use fontspec
> package and Lualatex compiler. I currently do this with HyphenChar
> option:
>
>     \usepackage{fontspec}
>     \setmonofont{libertinusmono-regular.otf}[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 --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texhax/attachments/20210730/723b720c/attachment.html>


More information about the texhax mailing list.