Hamza
Hamza is a light-weight, fast and portable C89 (ANSI C) OpenType library. It was written primarily for Arabic but supports any Unicode/OpenType script. That is as long as you are not using special features which are not implemented for a specific writing system. Note that this is not a renderer, it handles shaping only.
Feature Overview
- Joining script support and Right-To-Left writing
- OpenType Kerning
- Ligatures
- Support for new OpenType language tags (mixture of ISO 639-3 and ISO 639-2 codes)
- Support for old Two-Letter ISO 639-1:2002 language tags (same as HarfBuzz)
- Vertical layout (i.e. for Chinese)
- Emojis
- OpenMP / TinyCThread Multi-Threading
- SIMD optimization
- Justification
- Freetype interop
- stb_truetype.h interop
Why?
Hamza was written primarily for the development of a text rendering library, Hamza's goal was to be a pure C OpenType library. I wrote this because I wanted a simpler API for shaping and dealing with caches, atlases, and glyph attributes. I needed the knowledge on OpenType to write an efficient and powerful renderer. This is even more exacerbated especially for a language like Arabic or Chinese with often thousands of glyphs and complex interactions.
Usage
Make sure to read the docs.
C coding style
The library is written in a style inspired by Linux Kernel style and the GNU C style.
style guides: https://devnull-cz.github.io/unix-linux-prog-in-c/cstyle.html