summaryrefslogtreecommitdiff
path: root/src/layout/elements.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-10-03 11:09:32 +0200
committerLaurenz <laurmaedje@gmail.com>2020-10-03 11:09:32 +0200
commit730715c064294337ee9befc3b9332d45eb74818f (patch)
treee8bad130d43b3eefcb065365b223c3bdbd997026 /src/layout/elements.rs
parentdc8d5d2f1eadb19d0351fa214400d7ec7ba31a20 (diff)
Rename text layouting to shaping ✏
Diffstat (limited to 'src/layout/elements.rs')
-rw-r--r--src/layout/elements.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/layout/elements.rs b/src/layout/elements.rs
index b4a6b31c..dd148a24 100644
--- a/src/layout/elements.rs
+++ b/src/layout/elements.rs
@@ -41,11 +41,14 @@ pub enum LayoutElement {
/// A shaped run of text.
#[derive(Clone, PartialEq)]
pub struct Shaped {
+ /// The shaped text.
pub text: String,
+ /// The font face the text was shaped with.
pub face: FaceId,
+ /// The shaped glyphs.
pub glyphs: Vec<GlyphId>,
- /// The horizontal offsets of the glyphs with the same indices. Vertical
- /// offets are not yet supported.
+ /// The horizontal offsets of the glyphs. This is indexed parallel to `glyphs`.
+ /// Vertical offets are not yet supported.
pub offsets: Vec<f64>,
/// The font size.
pub size: f64,