TrueType glyph outline extraction.
Parses the glyf table to extract vertex data (moves, lines, quadratic
bezier curves) for simple and composite glyphs. Fortran port of
stbtt__GetGlyphShapeTT from stb_truetype.h lines 1658-1895.
Variables
| Type |
Visibility | Attributes |
|
Name |
| Initial | |
|
integer,
|
public, |
parameter
|
:: |
TT_VMOVE |
= |
1 |
|
|
integer,
|
public, |
parameter
|
:: |
TT_VLINE |
= |
2 |
|
|
integer,
|
public, |
parameter
|
:: |
TT_VCURVE |
= |
3 |
|
Derived Types
Components
| Type |
Visibility | Attributes |
|
Name |
| Initial | |
|
integer,
|
public |
|
:: |
x |
|
|
|
|
integer,
|
public |
|
:: |
y |
|
|
|
|
integer,
|
public |
|
:: |
cx |
|
|
|
|
integer,
|
public |
|
:: |
cy |
|
|
|
|
integer,
|
public |
|
:: |
vtype |
|
|
|
Functions
Construct a vertex with the given type and coordinates.
Arguments
| Type |
Intent | Optional | Attributes |
|
Name |
|
|
integer,
|
intent(in) |
|
|
:: |
vtype |
|
|
integer,
|
intent(in) |
|
|
:: |
x |
|
|
integer,
|
intent(in) |
|
|
:: |
y |
|
|
integer,
|
intent(in) |
|
|
:: |
cx |
|
|
integer,
|
intent(in) |
|
|
:: |
cy |
|
Subroutines
Extract glyph outline as an array of move/line/curve vertices.
Handles simple glyphs (numberOfContours > 0) and composite glyphs
(numberOfContours < 0) with recursive component resolution.
Arguments
| Type |
Intent | Optional | Attributes |
|
Name |
|
|
integer(kind=int8),
|
intent(in) |
|
|
:: |
data(:) |
|
|
integer,
|
intent(in) |
|
|
:: |
loca |
|
|
integer,
|
intent(in) |
|
|
:: |
glyf |
|
|
integer,
|
intent(in) |
|
|
:: |
index_to_loc_format |
|
|
integer,
|
intent(in) |
|
|
:: |
num_glyphs |
|
|
integer,
|
intent(in) |
|
|
:: |
glyph_index |
|
|
type(tt_vertex_t),
|
intent(out), |
|
allocatable
|
:: |
vertices(:) |
|
|
integer,
|
intent(out) |
|
|
:: |
nvertices |
|