static Pair textLayoutToOutlineAndSize_multiLine(S text, Font font, Component c) { LS lines = lines(text); Area area = null; int y = 0, w = 0; for (S line : lines) { Pair p = textLayoutToOutlineAndSize(line, font, c); w = max(w, p.b.w); Area a = new(p.a); new AffineTransform tx; tx.translate(0, y); area = areaUnion(area, a.createTransformedArea(tx)); y += p.b.h; } ret pair(area, rect(0, 0, w, y)); }