Inkscape.org
Beginners' Questions Why does a centered text object move to the right when I edit the text in 'text and font' but not inline?
  1. #1
    dapab dapab @dapab
    *

    So I have a centered text box 'Some text' at coordinates X 6.0 Y 3.0.  If I edit it inline e.g. 'Some text1' the X and Y coordinates don't change.much X 5.8 Y 3.0

    But if I edit the text in 'text and font', text and hit apply the whole text jumps right a huge distance  to X 9.8 Y 3.0 and I see it is now left justified.  If I change the text box back to centered it doesn't move it back.

    What am I doing wrong / how to fix?

    Thanks

     

  2. #2
    Paddy_CAD Paddy_CAD @Paddy_CAD

    Sorry, I can't reproduce the problem. When I click [Apply], the updated text remains centre-justified and the text anchor doesn't move. Can you upload a misbehaving file for investigation?

  3. #3
    dapab dapab @dapab
    *

    I've hopefully provided a simple example file.  Try editing 'Text line 2' to e.g. 'Text line 22' and see how the text box jumps to the right after hitting apply. 

    I am using Inkscape v1.4 on Windows 11.  

    Thanks

    Text Issue
  4. #4
    dwhall dwhall @dwhall

    I have in part replicated your experience. The problem seems to be related to the diamond anchor point being moved some distance to the right of the text.

    Re-aligning the text to align-right will cause it to jump to the right and then align-center will not return to its original position. You can see some of my experimenting in the attached text_issue_edited.svg.

  5. #5
    dapab dapab @dapab
    *

    I must admit I have no idea how this happened and how to fix it.  I compared two svg files (the original and a corrected one after the right shift) and they are very similar.

    Here is the first with a style applied to a tspan element

     <text
           xml:space="preserve"
           style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:11.2889px;line-height:1.25;font-family:Arimo;-inkscape-font-specification:'Arimo Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
           x="98.275681"
           y="-2.0065973"
           id="text828-8"><tspan
             id="tspan826-0"
             x="98.275681"
             y="-2.0065973"
             style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:11.2889px;font-family:Arimo;-inkscape-font-specification:'Arimo Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;stroke-width:0.264583"
             sodipodi:role="line">Text line 1</tspan></text>

    And after the edit text, apply, the tspan element is simplified:

    <text
           xml:space="preserve"
           style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:11.2889px;line-height:1.25;font-family:Arimo;-inkscape-font-specification:'Arimo, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
           x="98.275681"
           y="-2.0065973"
           id="text828-8"><tspan
             sodipodi:role="line"
             id="tspan1">Text pine 1</tspan></text>

    This is part of a jig template so I would ideally like to know how to fix this without every element being translated (there are 32 text boxes).  I guess they will all translate the same distance so if I get one right the rest will be ok since I can move them as a block.

     

    NB I tried cloning a text object so they were coincident, editing the text of one object, apply and then applying a transform of x="-98.275681" and  y="2.0065973" px and it looks close but not an exact match to the unmoved object.  I assume measurements in the svg are in px unless otherwise specified

    Thanks

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Why does a centered text object move to the right when I edit the text in 'text and font' but not inline?