[scribus] Get the width of a piece of text in a Scribus script?
José Antonio Rocha
joseantoniorocha at gmail.com
Mon Aug 8 05:05:23 UTC 2016
2016-08-06 11:04 GMT-03:00 John Culleton <John at wexfordpress.com>:
> > Does anyone know of any other way to
> > programatically measure the rendered width of a
> > line of text?
>
Try play with:
renderFont(...)
renderFont("name", "filename", "sample", size, format="PPM") -> bool
Creates an image preview of font "name" with given text "sample" and size.
If "filename" is not "", image is saved into "filename". Otherwise image
data is returned as a string. The optional "format" argument specifies the
image format to generate, and supports any format allowed by
QPixmap.save(). Common formats are PPM, JPEG, PNG and XPM.
--
[image: Meira]
------------------------------
nome: "José Antonio Meira da Rocha
<https://plus.google.com/+JoséAntonioMeiradaRocha/>"
email: joseantoniorocha at gmail.com
veículo: [ http://meiradarocha.jor.br ]
fones: [ 55-8448-3866 55-3744-2994 ] 🐊
------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20160808/9a90d3d4/attachment.html>
More information about the scribus
mailing list