Liblinebreak has been superseded by libunibreak in order to support more break types based on Unicode specifications. Please check out libunibreak for future updates.
Liblinebreak is an implementation of the line breaking algorithm as described in Unicode 6.0.0 Standard Annex 14, Revision 26. It breaks lines that contain Unicode characters. It is designed to be used in a generic text renderer. FBReader is one real-world example, and you may also check some simple sample code, like showbreak and breaktext.
The latest version (2.1) of liblinebreak can be download here, and you may want to check What’s New if you are an existing user.
Please check the information here. The module path is ‘common/tools/linebreak’.
This library is released under an open-source licence, the zlib/libpng licence. Please check the file LICENCE for details.
Apart from using the algorithm, part of the code is derived from the Unicode Online Data, and the Unicode Terms of Use may apply.
There are three ways to build the library:
./configure make sudo make installto build and install both the dynamic and static libraries. In addition, one may
make doc
’ to generate the doxygen documentation; ormake linebreakdata
’ to regenerate linebreakdata.c from
LineBreak.txt.cp -p Makefile.gcc Makefile maketo build the static library. In addition, one may
make debug
’ or ‘make release
’ to explicitly generate the
debug or release build;make doc
’ to generate the doxygen documentation; ormake linebreakdata
’ to regenerate linebreakdata.c from
LineBreak.txt.nmake -f Makefile.msvcto build the static library. By default the debug release is built. To build the release version
nmake -f Makefile.msvc CFG="linebreak - Win32 Release"
Check the generated document doc/html/linebreak_8h.html in the downloaded file for the public interfaces exposed to applications.