[scribus] Where is the text frame word wrap code?
john at wexfordpress.com
Mon May 31 16:04:37 CEST 2010
On Monday 31 May 2010 00:43:43 Drew Vogel wrote:
> I am working on an application that will generate a scribus
document from a
> database of survey questions. The output of each question will
look a bit
> like this image: http://imgur.com/ha2ag.png
> The question text is inside the text frame itself. The response
> in text frames of their own. In order to determine the appropriate
> position for the first response option, I need to determine where
> will wrap the text inside the text frame (the width of the text
> pre-determined). I first thought that I could use
> QFontMetrics::boundingRect() to determine where the text would
need to be
> wrapped. However that seems dependent on the DPI of the
> the text is drawn on and, in my testing, scribus wraps text
> the monitor DPI.
> Thus it seems that I need to emulate the word wrap logic in
> but I'm having trouble locating that part of the scribus code. It
> logical to me that the word wrap code would either be in or
> PageItem_TextFrame::DrawObj_Item() but if it's there, it's not
> me. Could someone help me locate the word wrap logic?
> -------------- next part --------------
> An HTML attachment was scrubbed...
> scribus mailing list
> scribus at lists.scribus.net
There are as they say horses for courses. In my experience (going
back to 1996) the best way to create formatted text from a data
base is to run it through a program or script that creates a text file
with TeX formatting tags added where needed. I did a book listing
dog breeders this way, and an index of a book listing 6000
cemetery entries similarly.
Also in my experience you can do anything in any computer
software tool with enough time and effort. I have encountered
General Ledger accounting programs written in FORTRAN. But there
is a solution that provides maximum benefit with least effort. In
your situation my only question would be, which flavor of TeX? A
Scribus solution will require far more effort on your behalf.
"Create Book Covers with Scribus"
Printable E-book 38 pages $5.95
More information about the scribus