summaryrefslogtreecommitdiff
path: root/src/layout/shaping.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-10-16 11:39:26 +0200
committerLaurenz <laurmaedje@gmail.com>2021-10-23 20:22:47 +0200
commit6690bc23545bfe7275ad92de9e6bd11b7345caf4 (patch)
treee116a23f2f04b3053160aae09088830fdb21460f /src/layout/shaping.rs
parent1e74f7c407e42174b631cb7477f3c88252da7e25 (diff)
Revise block node contract
Frames produced by block nodes are now always treated as exactly one per given region and a frame must not be larger than its respective region. Any overflow must be handled internally. This means that stack and grid don't need to search for fitting regions anymore, since the child has already does that for them. This commit further moves stack spacing into a new `SpacingNode`.
Diffstat (limited to 'src/layout/shaping.rs')
-rw-r--r--src/layout/shaping.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/layout/shaping.rs b/src/layout/shaping.rs
index 4580ebf5..7bd2646d 100644
--- a/src/layout/shaping.rs
+++ b/src/layout/shaping.rs
@@ -48,6 +48,7 @@ pub fn shape<'a>(
/// This type contains owned or borrowed shaped text runs, which can be
/// measured, used to reshape substrings more quickly and converted into a
/// frame.
+#[derive(Debug, Clone)]
pub struct ShapedText<'a> {
/// The text that was shaped.
pub text: &'a str,
@@ -64,7 +65,7 @@ pub struct ShapedText<'a> {
}
/// A single glyph resulting from shaping.
-#[derive(Copy, Clone)]
+#[derive(Debug, Copy, Clone)]
pub struct ShapedGlyph {
/// The font face the glyph is contained in.
pub face_id: FaceId,