STLL
0.0
Simple Text Layouting Library
|
STLL is a simple text layouting engine specifically designed for all the applications that need good text output with support for many languages including ones with writing systems that to right to left (like Hebrew).
There are a lot of simple text output libraries out there, but all of them only support basic left to right text, not formatting no font organisation.
There is also Pango. But Pango is way too big and way too complicated for smaller applications.
This library is supposed to be in the middle between the heavyweight Pango and the trivial libraries like SDL_ttf. It is supposed to support all line-based text systems. Column based support is not planned.
Current home of the library is at github.
STLL has the following design goals
STLL depends on some libraries. The following libraries must be installed
optionally the following needs to be installed
First, install all required libraries and tools.
On Debian/Wheezy, you can accomplish this via:
On Debian/Jessie and above, you can accomplish this via:
Clone the Git repository:
Build the library via CMake:
You may want to run the test suite afterwards:
The library is split into some parts that can be used independently and that are designed in a way that allows you to limit your dependencies.
The first part is a small Freetype 2 wrapper, that only wraps the library and font face structures of the library into classes. It also provides some helper functions to handle fonts and to avoid loading the same font multiple times.
This part of the library has only freetype and boost as a dependency.
STLL is written in such a way that it can use different XML libraries. There is one header that abstracts away the DOM tree creation and traversing.
The next part of the library is the layouter. The layouter will create a text layout out of a given text with additional layouting information.
The layout is just a collection of drawing commands that a system dependent graphics library can use to output the text.
If you have only very simple layouting tasks like some simple texts in a rectangular box or so, you can use this part only and stay away from the rest.
This part of the library has additional dependencies: fribidi, harfbuzz and liblinebreak or libunibreak. All these libraries are used to layout the text according to unicode specifications.
This part of the library contains a more complex layouter that can be used for more complicated text output like an on-line help system.
It implements a part of the HTML5 specification but uses XHTML syntax for it. It uses a simple CSS emulation to define the looks of your text.
The XHTML layouter uses the paragraph layouter to layout single paragraphs of text.
This part introduces pugixml or libxml2 as dependency for the parsing.
The library also contains a few drivers for different graphic libraries to output the generated layouts. Right now we have drivers for
Of course these drivers will add a dependency on the corresponding graphics library.
Finally some additional tools are probably going to be added: