tt_flatten_curves Subroutine

public subroutine tt_flatten_curves(vertices, num_verts, objspace_flatness, points, contour_lengths, num_contours)

Convert glyph vertex array to flattened point arrays with contour info. Uses a two-pass algorithm: pass 1 counts points, pass 2 fills them. Port of stbtt_FlattenCurves (stb_truetype.h lines 3618-3693).

Arguments

Type IntentOptional Attributes Name
type(tt_vertex_t), intent(in) :: vertices(:)
integer, intent(in) :: num_verts
real(kind=dp), intent(in) :: objspace_flatness
type(tt_point_t), intent(out), allocatable :: points(:)
integer, intent(out), allocatable :: contour_lengths(:)
integer, intent(out) :: num_contours