From 6ff60bc3688d8ae2caa3ea18bc23963d25ab5daa Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 22 Nov 2019 20:15:00 +0100 Subject: =?UTF-8?q?Fix=20secondary=20non-origin=20alignment=20=F0=9F=9A=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/mod.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/layout/mod.rs') diff --git a/src/layout/mod.rs b/src/layout/mod.rs index e78e6067..2e643295 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -308,7 +308,17 @@ pub enum Alignment { } #[derive(Debug, Copy, Clone, PartialEq)] -pub enum SpaceState { +pub enum SpaceKind { + /// Soft spaces are eaten up by hard spaces before or after them. + Soft, + /// Independent do not eat up soft spaces and are not eaten up by hard spaces. + Independent, + /// Hard spaces eat up soft spaces before or after them. + Hard, +} + +#[derive(Debug, Copy, Clone, PartialEq)] +enum SpaceState { Soft(Size), Forbidden, Allowed, -- cgit v1.2.3