Draft: Fix mixup of TextAlignment vs Justification for Labels
TextAlignment is the vertical alignment, while Justification is the horizontal alignment. here, get_text was passed the vertical, while it expected the horizontal. This caused the alignment of a Label to be wrong in the resulting SVG (e.g. in a TechDraw draft view). This seems to have been broken since SVG support for Labels was first introduced in commit d6f8ded4ca (Initial work, only text (no lines)).
This commit is contained in:
@@ -641,7 +641,7 @@ def get_svg(obj,
|
||||
fontname = obj.ViewObject.TextFont
|
||||
position = get_proj(obj.Placement.Base, plane)
|
||||
rotation = obj.Placement.Rotation
|
||||
justification = obj.ViewObject.TextAlignment
|
||||
justification = obj.ViewObject.Justification
|
||||
text = obj.Text
|
||||
svg += svgtext.get_text(plane, techdraw,
|
||||
stroke, fontsize, fontname,
|
||||
|
||||
Reference in New Issue
Block a user