|
|
||
|---|---|---|
| examples | ||
| libs/freetype | ||
| raqm | ||
| .gitignore | ||
| LICENSE.md | ||
| ols.json | ||
| README.md | ||
Odin Raqm Bindings
Odin bindings for the Raqm library.
The Raqm library is a light weight text layout library with strong emphasis on supporting languages and writing systems that require complex text layout.
To work the library depends on the following libraries:
The API source for the binding has been obtained collating the API header and the API documentation.
Library version
- Up to Raqm version 0.10.2 released on 2024-09-22.
Limitations
- Does not include the Raqm library itself (nor any of its dependencies): the Windows binaries for some of them are available from their respective web sites, more or less recent Linux binaries may be available on distribution repositories and in all other cases have to be compiled from the sources.
Example
The examples directory contains the simple Raqm example listed in the API site and ported to Odin. The example (and likely any non-trivial use of Raqm) requires the Freetype bindings; for this reason Josh Engler's Freetype bindings have been imported in the libs/freetype directory (thanks for the nice work!).
To be compiled and run, it still requires all the dependencies to be installed in the system and accessible.
Installing
Project-specific installation
-
Create a directory named
libsin the root of your project. -
Copy the
raqmdirectory (with all its files) of this project in the aforementionedlibsdirectory by any way available to you (fromgit submodule addto manual file copying...). -
You can now import this library in your source file as follows:
import rq "libs/raqm"
Alternatively, you may place this project wherever you want (for instance in a
git-cloned directory) and import it in your sources using the full relative path
from your sources to the project raqm directory: this will not be portable
to other machines or platforms, though (not recommended if you are developing a
library other developers may re-use)
Odin-wide installation
To make the bindings directly available to all your Odin projects:
-
Copy the
raqmdirectory (with all its files) of this project in theshareddirectory of your Odin installation. -
You can now import these bindings in whatever Odin source file as follows:
import rq "shared:raqm"
In both cases the rq label can be replaced with any identifier of your
liking which does not conflict with existing identifiers.
Contributing
Pull requests and bug or issue reports are very welcome, as well as suggestions about code style improvements!