1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
NAME
librifunktionsteckensnittsglyfrasteriseringsprogrambiblioteket - Font rasterisation library
DESCRIPTION
librifunktionsteckensnittsglyfrasteriseringsprogrambiblioteket is a C library
for converting shape outlines to filled shapes, with a focus on fonts, which
that it only supports filled, closed shapes and that the direction of the
outline determines whether a shape adds or subtracts to the image (the absolute
values of the result is used in the image). Furthermore this means that the
library only supports curve types that are used for drawing glyphs; specifically
this means that lines and quadratic Bézier curves are supported by cause this
is what is required to draw vectorised bitmap fonts and TrueType fonts, but also
cubic Bézier curves as this is required for OpenType fonts and circular arcs
as this is commonly used for corners when stroking the outline of a glyph.
The create an image, first create a buffer using rtgrpblib_create_raster(3)
(if you already have one that is large enough, you can reinitialise it with
rtgrpblib_reset_raster(3)), and than using the drawing functions
(rtgrpblib_draw_linear_bezier(3), rtgrpblib_draw_quadratic_bezier(3),
rtgrpblib_draw_cubic_bezier(3), and rtgrpblib_draw_circular_arc(3)) to
draw the components of each shape's outline. When done, create an image
using the rtgrpblib_fill_shapes(3) function: you will receive a ink-level
map, where the value 0 means background, and 1 means foreground, and values
between are colours between (no transfer function is applied).
NOTES
Rifunktionsteckensnittsglyfrasteriseringsprogrambiblioteket (hyphenation:
ri|funk¦tions-tec¦ken|snit¦ts-glyf-ras¦ter¦iser¦ings-prog¦ram|bib¦lio¦te¦ket)
is Swedish for "the library for rasterising glyphs from spline fonts".
Because of the length of the library name, and length limitation on function
names, the functions in this library are namespaced with the prefix "rtgrpblib_".
|