iup

fontTools.varLib.iup.iup_segment(coords: Sequence[Tuple[Real, Real]], rc1: Tuple[Real, Real], rd1: Tuple[Real, Real], rc2: Tuple[Real, Real], rd2: Tuple[Real, Real])[source]

Given two reference coordinates rc1 & rc2 and their respective delta vectors rd1 & rd2, returns interpolated deltas for the set of coordinates coords.

fontTools.varLib.iup.iup_contour(deltas: Sequence[Tuple[Real, Real] | None], coords: Sequence[Tuple[Real, Real]]) Sequence[Tuple[Real, Real]][source]

For the contour given in coords, interpolate any missing delta values in delta vector deltas.

Returns fully filled-out delta vector.

fontTools.varLib.iup.iup_delta(deltas: Sequence[Tuple[Real, Real] | None], coords: Sequence[Tuple[Real, Real]], ends: Sequence[Integral]) Sequence[Tuple[Real, Real]][source]

For the outline given in coords, with contour endpoints given in sorted increasing order in ends, interpolate any missing delta values in delta vector deltas.

Returns fully filled-out delta vector.

fontTools.varLib.iup.can_iup_in_between(deltas: Sequence[Tuple[Real, Real]], coords: Sequence[Tuple[Real, Real]], i: Integral, j: Integral, tolerance: Real)[source]

Return true if the deltas for points at i and j (i < j) can be successfully used to interpolate deltas for points in between them within provided error tolerance.

fontTools.varLib.iup.iup_contour_optimize(deltas: Sequence[Tuple[Real, Real]], coords: Sequence[Tuple[Real, Real]], tolerance: Real = 0.0) Sequence[Tuple[Real, Real] | None][source]

For contour with coordinates coords, optimize a set of delta values deltas within error tolerance.

Returns delta vector that has most number of None items instead of the input delta.

fontTools.varLib.iup.iup_delta_optimize(deltas: Sequence[Tuple[Real, Real]], coords: Sequence[Tuple[Real, Real]], ends: Sequence[Integral], tolerance: Real = 0.0) Sequence[Tuple[Real, Real] | None][source]

For the outline given in coords, with contour endpoints given in sorted increasing order in ends, optimize a set of delta values deltas within error tolerance.

Returns delta vector that has most number of None items instead of the input delta.