Align Left, Right, and Center works

This commit is contained in:
Hojjat 2023-02-22 18:31:49 -07:00
parent 9a4d067f9d
commit 00ff5b72f3
5 changed files with 106 additions and 31 deletions

View file

@ -100,6 +100,7 @@ where
self.metrics.font_size,
limits.max().width as i32,
self.line.wrap(),
self.line.align(),
);
let mut width = 0;
@ -160,7 +161,12 @@ where
let shape = self.line.shape_opt().as_ref().unwrap();
//TODO: can we cache this?
let layout_lines = shape.layout(self.metrics.font_size, layout_w, self.line.wrap());
let layout_lines = shape.layout(
self.metrics.font_size,
layout_w,
self.line.wrap(),
self.line.align(),
);
let mut cache = state.cache.lock().unwrap();