help with fitting text to width

Previous topic - Next topic

DavidIS

Hi

I am new to scribus, and have zero knowledge in coding. so I wondered if anyone could help me with some layout settings that I need (maybe using a script).

1. is it possible to set the autofit to begin new line of text only where I used ENTER (so if there are too many words it would shrink text width rather than start new line)

2. In case there are not enough characters in a line to fit, is it possible to set it to strech to fit only certain characters (so instead of streching all letters in a line, it would strech all the A H and W's for example). I need this function to work based on unicode since I am not writing in english.

I would very much appreciate any help and advice on this matter.

RobSay

In terms of the actual mechanics of (1) & (2) I think I understand what you're trying to do ... I'm thinking of those bill posters for concerts with all of the artists on different lines but all expanded to the same width. I really can't think of a situation where you'd apply it to actual text blocks... the human eye is *very* good at spotting inconsistencies in text layouts and it is really distracting for the reader.

For me this is one of those situations where just because you can (in Scribus) doesn't meant you should .. having said that:

(1) It would be possible to write a script that:

  • took a text frame and chopped the text into blocks based on carriage return
  • put each line in it's own frame
  • adjusted the font size, glyph width and/or kerning to achieve max width (by checking for overflow in the frame)
That would be a lot of work for something not very pretty and not very easy to edit. I think you'd also be reliant on the behaviour of the font for a strict width alignment between the frames. I don't think you could use a justified paragraph in a single frame with line break characters as I've not been able to manipulate that special non-paragraph line break in python script ..

(2) It would be possible to modify the above script to individually select and adjust the glyph width for specific (wide) characters
That would be even more work and spectacularly unpretty in a lot of cases ..

In both cases the script would essentially be automating the 'try this change and see' approach to approximate a real 'fill to width' behaviour. If I wanted the 'character fill to width' you've described - I'd be doing that in a graphics tool (both gimp and inkscape could do this) not a frame based tool - and then importing the graphic if I needed it to live with other (frame based) text content.