[librsvg: 7/18] Gather all the pango::Layout mutation in a single place




commit 26c4e2547e2c6a8f7c8437c648b6fb9657f53d67
Author: Federico Mena Quintero <federico gnome org>
Date:   Mon Oct 25 18:22:59 2021 -0500

    Gather all the pango::Layout mutation in a single place
    
    Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/621>

 src/text.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/text.rs b/src/text.rs
index 1637ff90..608cc077 100644
--- a/src/text.rs
+++ b/src/text.rs
@@ -1184,7 +1184,6 @@ fn create_pango_layout(draw_ctx: &DrawingCtx, props: &FontProperties, text: &str
     }
 
     let layout = pango::Layout::new(&pango_context);
-    layout.set_auto_dir(false);
 
     // FIXME: For now we ignore the `line-height` property, even though we parse it.
     // We would need to do something like this:
@@ -1235,6 +1234,7 @@ fn create_pango_layout(draw_ctx: &DrawingCtx, props: &FontProperties, text: &str
 
     layout.set_attributes(Some(&attr_list));
     layout.set_text(text);
+    layout.set_auto_dir(false);
 
     layout
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]