Module segments

Source
Expand description

Segment computation and linking.

A segment is a series of at least two consecutive points that are appropriately aligned along a coordinate axis.

The linking stage associates pairs of segments to form stems and identifies serifs with a post-process pass.

Structsยง

State ๐Ÿ”’
Capture current and previous state while computing segments.

Constantsยง

MAX_SCORE ๐Ÿ”’
MIN_SCORE ๐Ÿ”’

Functionsยง

_detect_round_segments_cjk ๐Ÿ”’
Performs the additional step of detecting round segments for the CJK script group.
adjust_segment_heights ๐Ÿ”’
Slightly increase the height of segments when it makes sense to better detect and ignore serifs.
assign_point_uvs ๐Ÿ”’
Set the (u, v) values to font unit coords for each point depending on the axis dimension.
build_segments ๐Ÿ”’
Build the set of segments for each contour.
compute_segments ๐Ÿ”’
Computes segments for the Latin writing system.
link_segments ๐Ÿ”’
Link segments to form stems and serifs.
link_segments_cjk ๐Ÿ”’
Link segments to form stems and serifs for the CJK script group.
link_segments_default ๐Ÿ”’
Link segments to form stems and serifs.