Skip to content

Commit 8a40cfd

Browse files
madigsimoncozens
authored andcommitted
Set the HR buffers up before shaping with a plan
1 parent 72290f0 commit 8a40cfd

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

diffenator3-lib/src/render/renderer.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ impl<'a> Renderer<'a> {
9494

9595
let output = if let Some(plan) = &self.plan {
9696
// If we have a shaping plan, we can use it to shape the string
97+
if let Some(script) = plan.script() {
98+
buffer.set_script(script);
99+
}
100+
buffer.set_direction(plan.direction());
101+
if let Some(lang) = plan.language() {
102+
buffer.set_language(lang.clone());
103+
}
97104
shaper.shape_with_plan(plan, buffer, &[])
98105
} else {
99106
// Otherwise, we guess segment properties

0 commit comments

Comments
 (0)