creating textblock by changing font size per line

Discussion about writing code for Inkscape.
morits
Posts: 3
Joined: Mon Jul 08, 2013 6:40 pm

creating textblock by changing font size per line

Postby morits » Mon Jul 08, 2013 7:07 pm

hey everyone,

i searched unsuccessful for an extension that gets a multiple line text and creates a block out of it by changing the font size of the different lines.
example:
http://image.spreadshirt.net/image-serv ... g-sexy.png

(if you know a extension please let me know.)

i thought about programming it my self. it is a bit harder than i thougt. im not very familiar with python and the documentation to create extensions is not very detailed.


so, how can i change the size of a line.
ho can i calculate the length of a line?


im thankful for any help, i can get.

best wishes,
morits
Last edited by morits on Tue Jul 09, 2013 5:57 am, edited 1 time in total.

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: creating textblock by changing font size per line

Postby hulf2012 » Tue Jul 09, 2013 2:43 am

Hola,
i searched unsuccessful for an extension that gets a multiple line text and creates a block out of it by changing the font size of the different lines.
(if you know a extension please let me know.)

I think I don't understand your problem. Could you post some picture of the result that you want?.
Anyway, a text of multiple lines, changing the font size, and aligning, it's something that can be done using the Inkscape's graphic interfase, but surely I'm issing something.

i thought about programming it my self. it is a bit harder than i thougt. im not very familiar with python and the documentation to create extensions is not very detailed.


http://wiki.inkscape.org/wiki/index.php ... Extensions

An extension for text:
viewtopic.php?f=11&t=9212

You can use the command line:
http://tavmjong.free.fr/INKSCAPE/MANUAL ... dLine.html
Recently, one user (baconCatBug) put an example:
viewtopic.php?f=5&t=15542

And other user (Lucas?), created an extension using c++ and command line:
viewtopic.php?f=11&t=15561

Or You can use javascript libs: Raphäel, ... etc
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: creating textblock by changing font size per line

Postby Lazur » Tue Jul 09, 2013 2:51 am

I belive morits wants a solution to create a "wordcloud" -like result, as wordle generates.
Making each starting and end letters in the lines aligned to the edge,
using the same kerning and calculating the right font size.
Not an easy one, for me at least.
The only way I know to do this is manual.

morits
Posts: 3
Joined: Mon Jul 08, 2013 6:40 pm

Re: creating textblock by changing font size per line

Postby morits » Tue Jul 09, 2013 7:09 pm

sorry. i added an example.


Return to “Programming”