ebraminio / libraqm-nofreetype

A library for complex text layout

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This fork doesn't need FreeType which was needed for a minmal WASM/JS build.

Raqm

Linux & macOS build Windows build

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

It currently provides bidirectional text support (using FriBiDi), shaping (using HarfBuzz), and proper script itemization. As a result, Raqm can support most writing systems covered by Unicode.

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 following libraries:

To build the documentation you will also need:

To install dependencies on Fedora:

sudo dnf install freetype-devel harfbuzz-devel fribidi-devel gtk-doc

To install dependencies on Ubuntu:

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

On Mac OS X you can use Homebrew:

brew install freetype harfbuzz fribidi 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 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
  2. LibGD
  3. FontView
  4. Pillow
  5. mplcairo

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

  1. SDL_ttf: https://bugzilla.libsdl.org/show_bug.cgi?id=3211
  2. Pygame: https://bitbucket.org/pygame/pygame/pull-requests/52
  3. Blender: https://developer.blender.org/D1809

About

A library for complex text layout

License:MIT License


Languages

Language:C 52.5%Language:M4 32.1%Language:Makefile 12.6%Language:Python 1.7%Language:Shell 1.0%