[scribus] determine maximum point size of a given font that will fit within a given width

Fred Zimmerman wfz at nimblebooks.com
Sat Aug 27 19:47:28 UTC 2011


I am trying to figure out how to do this so I can automagically determine
the font size for spine text on a spine of arbitrary width.

To do that directly, Iwould need to be able to determine the maximum y
height above and below the baseline for all the characters in the text
string; I don't see the right commands for that in the Scripter API, but am
I missing something?

Otherwise, it looks like I could do something iterative with increasing the
font size and seeing if it overflows.  That strikes me as clumsy.  Anyone
else have any ideas?

Fred



-----------------------------------------------------
Subscribe to the Nimble Books Mailing List  http://eepurl.com/czS- for
monthly updates
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20110827/af44393d/attachment.html>


More information about the scribus mailing list