Add text alignment to the Text node (#2920)

* Add text alignment to Text node

* Lots of renames and improvements

* Add text alignment to the Text tool

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Salman Abuhaimed
2025-07-26 08:04:12 +03:00
committed by GitHub
parent 91156d295c
commit 85021fd9e0
14 changed files with 92 additions and 28 deletions

View File

@@ -28,6 +28,7 @@ fn text<'i: 'n>(
#[unit("°")]
#[default(0.)]
tilt: f64,
align: TextAlign,
/// Splits each text glyph into its own instance, i.e. row in the table of vector data.
#[default(false)]
per_glyph_instances: bool,
@@ -39,6 +40,7 @@ fn text<'i: 'n>(
max_width,
max_height,
tilt,
align,
};
let font_data = editor.font_cache.get(&font_name).map(|f| load_font(f));