Skip to main content

max / makeover-layout

State who owns the two corners where the runs meet The renderers disagreed and it looked like drift. makeover-tui splits the shared corners across both tones; makeover-immediate gives them to dark by drawing its dark polyline second. Neither is wrong, and saying so belongs here rather than in either renderer, since a cross-renderer rule is what this crate is for. The corners belong to both edges. What a renderer can do about that is bounded by resolution: a terminal cell is roughly 8x17 device pixels, so handing the whole corner to one tone thickens that edge by a visible cell, and a half-cell glyph has room to divide it. A one-point pixel stroke makes the corner a one-point square, where a diagonal seam is sub-pixel and antialiasing resolves it to the blend a mitred join already produces. Same rule, one resolution where it has something to say and one where it does not.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-07-30 17:27 UTC
Signed with PGP, not checked
Commit: 4d575665c75366b3cfee25bd78f83486d4d7a992
Parent: 1e805dd
1 file changed, +22 insertions, -0 deletions
M src/lib.rs +22
@@ -86,6 +86,28 @@
86 86 /// light is always assumed to come from the top left: every consumer measured
87 87 /// agreed on that and none of them ever varied it, so it is an invariant here
88 88 /// rather than a parameter.
89 + ///
90 + /// # The two corners that belong to both edges
91 + ///
92 + /// Top-right and bottom-left are where the lit run meets the shaded one, and
93 + /// the description's claim is that they belong to *both*. How a renderer says
94 + /// that is its own business, because the answer is bounded by resolution and
95 + /// not by taste:
96 + ///
97 + /// - A terminal cell is roughly 8x17 device pixels, so giving the whole corner
98 + /// to one tone thickens that edge by a cell and reads as one run overrunning
99 + /// the other. A half-cell glyph divides the cell already, so `makeover-tui`
100 + /// splits it and recovers real information. Its box-drawing fallback cannot:
101 + /// a single stroke has no half to give, so there both corners go to dark.
102 + /// - A pixel bevel is a one-point stroke by default, which makes the corner a
103 + /// one-point square. There is nothing to divide — a diagonal seam across one
104 + /// point is sub-pixel, and antialiasing renders it as the blend a mitred join
105 + /// already produces. So `makeover-immediate` mitres and is *not* diverging;
106 + /// it is the same rule at a resolution where the split degenerates.
107 + ///
108 + /// Stated here so the difference reads as a decision rather than as drift. A
109 + /// renderer with room to divide the corner should; one without should mitre or
110 + /// pick the shaded tone, and neither is a bug.
89 111 #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
90 112 pub enum Bevel {
91 113 /// Lit from the top left: light on top and left, dark on bottom and right.