It is currently Tue Jun 09, 2026 11:14 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Is there a way to have Multi-line text in script-fu
PostPosted: Wed Nov 30, 2011 11:35 pm  (#1) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4826
Location: Bendigo Vic. Australia
Is there a way to have Multi-line text in a script-fu

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Is there a way to have Multi-line text in script-fu
PostPosted: Thu Dec 01, 2011 12:02 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Apr 25, 2011
Posts: 121
Location: Taiwan
you could use SF-TEXT

_________________
Sorry for my poor English, I use Google Translate.
There may be something wrong, Please understand.

GIMP 2.10.38 rev1 portable+GAP+G'MIC+nufraw+Beautify+MathMap+...


Top
 Post subject: Re: Is there a way to have Multi-line text in script-fu
PostPosted: Thu Dec 01, 2011 12:18 am  (#3) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4826
Location: Bendigo Vic. Australia
Thanks James I new I had seen something about it some where but was not sure now I will search

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: Is there a way to have Multi-line text in script-fu
PostPosted: Thu Dec 01, 2011 1:20 am  (#4) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4826
Location: Bendigo Vic. Australia
Found it

Image

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: Is there a way to have Multi-line text in script-fu
PostPosted: Thu Dec 01, 2011 1:29 am  (#5) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6946
Location: Somewhere in GIMP
Unicode for a carriage return is U + 2029, I don't know what the equivalent ascii code is for that (Alt + Numpad).

You can test this out if you have a script that requires text entries. Unicode only works in Linux, though.

I tested it out in the Shrek Text script.
Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Is there a way to have Multi-line text in script-fu
PostPosted: Thu Dec 01, 2011 2:03 am  (#6) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4826
Location: Bendigo Vic. Australia
'O' I found a good example of how to use in test sphere.scm and should work under any operating system.

instead of using

SF-STRING "Text" "Merry Xmas" to return Merry Xmas

use

SF-TEXT "Text" "Merry\nXmas" to return

Image

Only change made everything else is the same

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: Is there a way to have Multi-line text in script-fu
PostPosted: Thu Dec 01, 2011 2:15 am  (#7) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6946
Location: Somewhere in GIMP
Way cool! :bigthup Works for me. The Unicode is faster though. Don't have to remember that string of text and I seriously doubt if I'll ever be writing any scripts.

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Is there a way to have Multi-line text in script-fu
PostPosted: Thu Dec 01, 2011 2:39 am  (#8) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4826
Location: Bendigo Vic. Australia
Here is a 10 line test with nothing changed as before to check on bounding border and positioning.

Image

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: Is there a way to have Multi-line text in script-fu
PostPosted: Thu Dec 01, 2011 12:15 pm  (#9) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2011
Posts: 395
Location: Indianapolis, IN
JamesH wrote:
you could use SF-TEXT


Offtopic :
? Where do you find what these SF- mean? I'm attempting to learn scripting and I've ran across SF-ADJUSTMENT now I see SF-TEXT. Is there a list of these some where??

I looked in http://www.gimp.org/docs/scheme ... -fu-gimp.html and found this:

(script-fu-register "script-fu-simple-drop-shadow"
                    _"<Image>/Script-Fu/Shadow/Drop-Shadow (simple)..."
                    "Add a simple drop-shadow of the alpha-channel"
                    "Simon Budig <[email protected]>"  ; author
                    "Simon Budig"                ; copyright holder
                    "2002/2/3"                   ; date
                    "RGBA GRAYA"                 ; image types
                    SF-IMAGE "Image" 0
                    SF-DRAWABLE "Drawable" 0
                    SF-ADJUSTMENT _"Offset X" '(8 -4096 4096 1 10 0 1)
                    SF-ADJUSTMENT _"Offset Y" '(8 -4096 4096 1 10 0 1)
                    SF-COLOR      _"Color" '(0 0 0)
                    SF-ADJUSTMENT _"Opacity" '(75 0 100 1 10 0 0))


Below it says:

Quote:
You can specify SF-COLOR for colors, SF-TEXT for text and some other stuff.


Still can't find where all the SF-'s are! :(


Sorry this is off topic. :(

_________________
"That which does not kill us makes us stronger." ~ Friedrich Nietzsche


Top
 Post subject: Re: Is there a way to have Multi-line text in script-fu
PostPosted: Thu Dec 01, 2011 2:32 pm  (#10) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
MrBiggz wrote:
Still can't find where all the SF-'s are! :(


http://www.ve3syb.ca/wiki/doku.php?id=s ... block-args

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Is there a way to have Multi-line text in script-fu
PostPosted: Thu Dec 01, 2011 7:47 pm  (#11) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4826
Location: Bendigo Vic. Australia
Try reading these



<Menu>Filters/Script-Fu/Test/Sphere

Could not find specific info on SF-TEXT yet but if you read the Test sphere script it will give some info at the top. I'm still looking for better discription, Why it's been overlooked till now I don't know.

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group