[scribus] Where is the text frame word wrap code?
John Culleton
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
options are
> in text frames of their own. In order to determine the appropriate
vertical
> position for the first response option, I need to determine where
scribus
> will wrap the text inside the text frame (the width of the text
frame is
> 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
QPaintDevice that
> the text is drawn on and, in my testing, scribus wraps text
independent of
> the monitor DPI.
>
> Thus it seems that I need to emulate the word wrap logic in
scribus itself
> but I'm having trouble locating that part of the scribus code. It
seems
> logical to me that the word wrap code would either be in or
called from
> PageItem_TextFrame::DrawObj_Item() but if it's there, it's not
obvious to
> me. Could someone help me locate the word wrap logic?
>
> Drew
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
>
<http://lists.scribus.net/pipermail/scribus/attachments/20100530/d7b34b97/
>attachment.htm>
_______________________________________________
> scribus mailing list
> scribus at lists.scribus.net
> http://lists.scribus.net/mailman/listinfo/scribus
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.
--
John Culleton
Wexford Press
"Create Book Covers with Scribus"
Printable E-book 38 pages $5.95
http://www.scribd.com/doc/24676863/
http://www.booklocker.com/books/4055.html
More information about the scribus
mailing list