Text layout library for Golang API reference

This module provides a chain of tools to layout text. It is mainly a port of the following C libraries : Pango, fribidi, fontconfig, harfbuzz and graphite.


The package fonts provides the low level primitives to load and read font files. The selection of a font given some criterion (like language or style) is facilitated by the fontconfig package. Once a font is selected, harfbuzz is responsible for laying out a line of text, that is transforming a sequence of unicode points (runes) to a sequence of positionned glyphs. Graphite fonts are supported via the graphite package. fribidi provides support for bidirectional text : it finds the alternates LTR and RTL sequences (embedding levels) in a paragraph. Finally, pango wraps these tools to provide an higher level interface capable of laying out an entire text.

Status of the project

This project is a work in progress. Some parts of it are already usable : fribidi, fonts/truetype, harfbuzz and graphite, but breaking changes may be committed on the fly.


This module is licensed as MIT, but some packages (fribidi, pango) are derivative work and thus licensed as LGPL.