Versions in this module Expand all Collapse all v1 v1.1.0 Sep 3, 2026 Changes in this version type Line + func KnuthPlassWith(items []Item, lineWidth float64, p Params) ([]Line, bool) + type Params struct + AdjDemerits float64 + DoubleHyph float64 + FinalHyph float64 + LinePenalty float64 + Tolerance float64 + func DefaultParams(tolerance, linePenalty float64) Params v1.0.0 Aug 18, 2026 v0 v0.4.0 Aug 18, 2026 Changes in this version + const InfPenalty + const MaxBadRatio + type Item struct + Depth float64 + Flagged bool + Height float64 + Kind ItemKind + Penalty float64 + R rune + Shrink float64 + Stretch float64 + Width float64 + func Box(w float64) Item + func Glue(w, stretch, shrink float64) Item + func Glyph(r rune, w, h, d float64) Item + func Penalty(w, p float64, flagged bool) Item + type ItemKind uint8 + const KBox + const KGlue + const KPenalty + type Line struct + End int + Ratio float64 + Start int + func KnuthPlass(items []Item, lineWidth, tolerance, linePenalty float64) ([]Line, bool)