Note
Fork of https://github.com/fetisov/ttf2mesh
Build system is changed here, it is based on Meson and Build Master
Run the following to build and install as library
$ meson setup build
$ meson compile -C build
$ meson install -C build
Add the followings when you compile your project with gcc or clang
pkg-config ttf2mesh_static --cflags
for include dirs (library header files)
pkg-config ttf2mesh_shared --libs
for linking against the library
Or You may also use this repository as a meson wrap dependency, depedencies are exported as ttf2mesh_static_dep
and ttf2mesh_shared_dep
The ttf2mesh crossplatform library allows to convert a glyphs of truetype font (ttf) to a mesh objects in 2d and 3d space. The library does not require any graphical context and does not use system dependent functions.
The library consists of two files written in the C language of the c99 standard: ttf2mesh.c and ttf2mesh.h. The ttf2mesh.c code implements a parsing of ttf-files and a tessellation algorithm that provides the formats conversion. The tessellation algorithm uses the Delaunay test to form an optimal set of triangles. Tessellation (triangulation) process is described in "this post" and is shown in the animation below.
The library has a simple doxygen-documented API for loading TTF files and converting glyphs into mesh objects. Examples of using the library are presented in examples/src directory. There are three main examples:
To compile examples on Linux system you can use the GNU make utility: make -C examples/build-linux-make all
. In the Windows operating system, you can use for compilation the Microsoft Visual Studio C++ project files that are located in the examples/build-win-msvc
directory. Additionally, the examples\build-any-qmake
directory contains pro files for building examples using the qtcreator IDE.
You can read information on how the library works at this link.
PayPal me or: MasterCard 5469 3800 5517 1176 wmz Z518568605100 wmr R885157851601