Fix horizontal text alignment
This commit is contained in:
parent
35c0e14452
commit
179a34d37b
23 changed files with 141 additions and 67 deletions
|
|
@ -58,7 +58,16 @@ impl Cache {
|
|||
text::to_shaping(key.shaping),
|
||||
);
|
||||
|
||||
let bounds = text::measure(&buffer);
|
||||
let (bounds, has_rtl) = text::measure(&buffer);
|
||||
|
||||
if has_rtl {
|
||||
buffer.set_size(
|
||||
font_system,
|
||||
Some(bounds.width),
|
||||
Some(bounds.height),
|
||||
);
|
||||
}
|
||||
|
||||
let _ = entry.insert(Entry {
|
||||
buffer,
|
||||
min_bounds: bounds,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue