Skip to content

anood/libraqm

 
 

Repository files navigation

Raqm

Raqm is a small library that encapsulates the logic for complex text layout and provide a convenient API.

It currently provides bidirectional text support (using FriBiDi), shaping (using HarfBuzz), with proper script itemization. By the virtue of this, Raqm can support most writing systems covered by Unicode.

This is an early prototype and is still work in progress. We try to not break the API and ABI needlessly, though.

The documentation can be accessed on the web at:

http://host-oman.github.io/libraqm/

Raqm (Arabic: رَقْم) is writing, also number or digit and the Arabic word for digital (رَقَمِيّ) shares the same root, so it is a play on “digital writing”.

Building

Raqm depends on the follwing libraries:

To build the documentation you will also need:

And the units tests require:

To install dependencies on Ubuntu:

sudo apt-get install libfreetype6-dev libharfbuzz-dev libfribidi-dev \
                     libglib2.0-dev gtk-doc-tools

On Mac OS X you can use Homeberw:

brew install freetype harfbuzz fribidi glib gtk-doc
export XML_CATALOG_FILES="/usr/local/etc/xml/catalog" # for the docs

Once you have the source code and the dependencies, you can proceed to build. To do that, run the customary sequence of commands in the source code directory:

$ ./configure
$ make
$ make install

To build the documentation, pass --enable-gtk-doc to the configure script.

To run the units tests:

$ make check

Contributing

Once you have made a change that you are happy with, contribute it back, we’ll be happy to integrate it! Just fork the repository and make a pull request.

Projects using Raqm

  1. ImageMagick

The follwing projects have patches to support complex text layout using Raqm:

  1. LibGD: libgd/libgd#196
  2. Pillow: python-pillow/Pillow#1682
  3. SDL_ttf: https://bugzilla.libsdl.org/show_bug.cgi?id=3211
  4. Pygame: https://bitbucket.org/pygame/pygame/pull-requests/52
  5. Blender: https://developer.blender.org/D1809

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 53.4%
  • Makefile 44.1%
  • Shell 1.4%
  • Batchfile 1.1%