Hyphenation for Lua

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Hyphenation for Lua

Marc Balmer
In case you ever need proper hyphenation in a Lua program, e.g. to annotate text on the web with "­" soft-hyphenation entities, then you might want to take a look at a small module (in fact a binding to libhyphen) that I just made available at https://github.com/arcapos/luahyphen.

On Red Hat based systems, you must install the hyphen-devel package, on Debian based system the libhyphen-dev package is needed.  Windows is not supported.

(Our own use case, fwiw,  is to add ­ markup to texts coming from a database in a webshop application and to print nice labels using Honeywell and Intermec printers, that support printing of multi-line text fields with hyphenation support.)

- Enjoy!