[librsvg: 6/18] Do not set the PangoAlignment of a layout




commit 6f9a5a4aaf7451e16a5293709ba55567e78e1c95
Author: Federico Mena Quintero <federico gnome org>
Date:   Mon Oct 25 18:20:20 2021 -0500

    Do not set the PangoAlignment of a layout
    
    This is not necessary since librsvg doesn't use Pango's multi-line
    layouts; it does not use Pango's features to wrap text to a certain width.
    
    Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/621>

 src/text.rs | 10 ----------
 1 file changed, 10 deletions(-)
---
diff --git a/src/text.rs b/src/text.rs
index 29253090..1637ff90 100644
--- a/src/text.rs
+++ b/src/text.rs
@@ -1030,15 +1030,6 @@ impl From<Direction> for pango::Direction {
     }
 }
 
-impl From<Direction> for pango::Alignment {
-    fn from(d: Direction) -> pango::Alignment {
-        match d {
-            Direction::Ltr => pango::Alignment::Left,
-            Direction::Rtl => pango::Alignment::Right,
-        }
-    }
-}
-
 impl From<WritingMode> for pango::Direction {
     fn from(m: WritingMode) -> pango::Direction {
         use WritingMode::*;
@@ -1243,7 +1234,6 @@ fn create_pango_layout(draw_ctx: &DrawingCtx, props: &FontProperties, text: &str
     }
 
     layout.set_attributes(Some(&attr_list));
-    layout.set_alignment(pango::Alignment::from(props.direction));
     layout.set_text(text);
 
     layout


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