Page
Library
Module
Module type
Parameter
Class
Class type
Source
Tsdl_ttf provides bindings to SDL2_ttf intended to be used with Tsdl.
It has as siblings tsdl-image and tsdl-mixer.
Note that these bindings are at an early stage and have only been used minimally. The interface may change. Comments and bug reports are welcome through the github page.
Via opam:
opam install tsdl-ttfor, to get the latest version:
opam pin https://github.com/sanette/tsdl-ttfThese bindings use dynamic loading of the SDL2_ttf library at runtime.
They should work for any version of SDL2_ttf >= 2.0.14.
On Windows, before installing, you may need to select this tsdl version:
opam pin https://github.com/sanette/tsdlSee test/test.ml
cd test
dune exec ./show_string.exe
Documentation is here, it can be generated with dune build @doc, (or ./make_doc.sh) but the binding follows the SDL2_ttf interface closely, so it may be sufficient to consult its documentation.
Starting from version 0.3, the library is usable in a toplevel (with #require "tsdl-ttf").
Starting from 0.3, the library name is the same as the opam package name tsdl-ttf. (The library name used to be tsdl_ttf, which was confusing).
(This CI uses the official tsdl. For Windows with the modified tsdl, see the Github actions.)
https://ci.ocamllabs.io/github/sanette/tsdl-ttf