Inkscape.org
Tips, Tricks, and Tutorials Dynamic Text Frame
  1. #1
    Paddy_CAD Paddy_CAD @Paddy_CAD
    😀😀😀*

    The forums have several requests for text frames that automatically adjust to the content.  Several times I've told people that Inkscape can't do this.  That changes today!

    The rectangle applies the Bounding Box LPE linked to the text object, then the Offset LPE for a margin.  Here's the svg for your entertainment.

    Dynamic Text Frame
  2. #2
    Roy Torley Roy Torley @Roy_Torley

    Paddy_CAD,

    Thank you very much for discovering this feature!  It helps a lot!  Best wishes, Roy

  3. #3
    Ricardo Gunawan Ricardo Gunawan @akrogun

    Paddy_CAD,

    Thank you very much... This is what I'm looking for.

    Best regards, Ricardo

  4. #4
    Hervé Renault Hervé Renault @HerveRenault

    Paddy_CAD,

    this is a great trick!

    Do you know if there's a way of reusing the result as some sort of text template? I've tried

    • duplicate but the LPE sticks to original text
    • clone, but you can only modify the original text
    • group and then duplicate but the frame doesn't adapt to text anymore

    Best regards

  5. #5
    Paddy_CAD Paddy_CAD @Paddy_CAD
    *

    As you discovered, duplicating (or copy-pasting) a linked LPE faithfully reproduces the original link so you must update the linked LPE manually.

    I played around with this a little more and I'm happy to report that the linked frame responds to all text formatting and kerning.  

    (SVG rendering in this forum seems to have problems with text alignment.  It looks perfect in Inkscape on my macbook)

    Dynamic Text Frame 2
    Update Linked Lpe
  6. #6
    RoggeHaj RoggeHaj @RoggeHaj

    Very neat!

    Would it be possible to restrict growing in only Y direction so that I can define my rectangle with a fixed width and have the height change when the text overflows?

    Best Regards
      Roger

  7. #7
    Paddy_CAD Paddy_CAD @Paddy_CAD

    No, it can't be done. 
    ........(thinks).......

    Well, maybe, but it's complicated.
    ........(thinks).......

    Actually, you could try this.

    Dynamic Text Frame 2
  8. #8
    RoggeHaj RoggeHaj @RoggeHaj

    Nice, I will play around with it tonight

  9. #9
    basti-fantasti-48 basti-fantasti-48 @basti-fantasti-48

    How can i do it (im beginner). I press Text ? and then?