RE: [Gimp-user] text that follows a path

2002-12-12 Thread Rory Grant
On Fri, 2002-12-13 at 06:57, Walker, Sam wrote:
You might try the curve bend plugin.
->Filters->Distorts->CurveBend 
It works on any type of image, so you'd have to create an image with the
text then "bend" it to the path you want.

I've used this in the past.  It does OK, but it shers the image to bend
it, therefore you cannot bend you letters anywhere near 90 degrees &
maintain readability

Thanks though,

RoryG

___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user



RE: [Gimp-user] text that follows a path

2002-12-12 Thread Walker, Sam
You might try the curve bend plugin.
->Filters->Distorts->CurveBend 
It works on any type of image, so you'd have to create an image with the
text then "bend" it to the path you want.


Hope this helps,
Sam


-Original Message-
From: Rory Grant [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 9:22 PM
To: [EMAIL PROTECTED]
Subject: [Gimp-user] text that follows a path


How can I make a string of text follow a path?  Is there a plugin to do
this, or can I use some render filter or what? 

Basically I've got a string of text & I want it to follow a wiggly line.
The closest I've seen is the text-circle plugin 

Cheers, 

RoryG 
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user



Re: [Gimp-user] text that follows a path

2002-12-12 Thread Rory Grant
On Fri, 2002-12-13 at 08:14, Jeff Trefftzs wrote:
Hi Rory -

There is a text along path script (actually, there are to of 'em).  
Unfortunately, I don't remember just where I got them, so they are included 
here as two attachments.  Just drop them into your .gimp-1.2/scripts directory 
and take it from there.  Better read them first, though, to find out the 
instructions.

Thanks Jeff, just what I was after



___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user



Re: [Gimp-user] text that follows a path

2002-12-12 Thread Jeff Trefftzs
Hi Rory -

There is a text along path script (actually, there are to of 'em).  
Unfortunately, I don't remember just where I got them, so they are included 
here as two attachments.  Just drop them into your .gimp-1.2/scripts directory 
and take it from there.  Better read them first, though, to find out the 
instructions.


-- 
--Jeff

Jeff Trefftzs <[EMAIL PROTECTED]>
http://www.tcsn.net/trefftzsHome Page
http://gug.sunsite.dk/gallery.php?artist=68 Gimp Gallery
http://trefftzs.topcities.com/  Photo Gallery 



;;;Script written by Guillaume de Sercey
;;;[EMAIL PROTECTED]

;;;What it does: writes a text following a path
;;;How does it do it:
;;;-creates an empty text layer
;;;-prints the text a letter at a time in a new layer (with the freetype plug-in)
;;;-gets a point along a path with its gradient (gimp-path-get-point-at-dist)
;;;-transform the gradient in a angle (script-fu-path-get-point-at-dist does this 
together with the previous step)
;;;-rotate the character layer by the angle (rotation around the top-left corner)
;;;-move the character layer at the position of the point on the path
;;;-merge the character layer with the text layer
;;;-repeat until a characters ahave been printed

;;;I use the freetype plug-in because it is the only text function that always align 
letters
;;;The *catch function is here in case the text is longer than the path
;;;It avoids getting an error from gimp-path-get-point-at-dist
;;;However it will also ignore any other error in the *catch form
;;;In particular, errors caused by an invalid fontname for freetype
;;;I've worked around that by using freetype to create the base text layer (a space 
character), before the catch

;;;Note: it is best to modify the argument of SF-FILENAME to match a valid font on 
your system
;;;Or at least a valid directory
;;;Saves a lot of browsing

;;;  Changelog.  20011120 Jeff changed it to use SF-FONT vice SF-FILE for
;;;  Font Selection

(define (script-fu-path-get-point-at-dist img position);a variation on 
gimp-path-get-point-at-dist where the last argument is the angle not the gradient
  (let*
  (
   (delta .1)
   (deltastart .2)
   (point (gimp-path-get-point-at-dist img position))
   (angle (atan (caddr point)));this return an angle between [-pi,+pi] and 
needs to be adjusted
   (point1 (butlast (gimp-path-get-point-at-dist img (- position deltastart
   (point2 (butlast (gimp-path-get-point-at-dist img (+ position deltastart
   
   ); end declare
(while (equal? point1 point2)
   (set! deltastart (+ deltastart delta))
   (set! point1 (butlast (gimp-path-get-point-at-dist img (- position 
deltastart
   (set! point2 (butlast (gimp-path-get-point-at-dist img (+ position 
deltastart   
   )
(if (= (car point1) (car point2));if x coords are equal
(if (< angle 0)   ;and angle negative
(if (< (cadr point1) (cadr point2));then if point1 is below point2
(set! angle (+ *pi* angle));add pi to the angle otherwise do 
nothing
) ;end true of angle negative
(if (> (cadr point 1) (cadr point2));angle is positive. if point1 is 
above point2
(set! angle (+ *pi* angle));add pi to the angle otherwise do 
nothing
) ;end false of angle negative
) ;end if angle, end true of x coords equal
(if (< (car point2) (car point1))
(set! angle (+ *pi* angle))
) ;end if point, end false of x coords equal
) ;end if x coords equal
(list (car point) (cadr point) angle)
)
  )

;;;  Here's the actual script

(define (script-fu-text-to-path2 img drw text font 
 fontsize spacing 
 antialiasing no-upsidedown)
  (if (= 0 (car (gimp-path-list img)))
  (gimp-message "This script needs a path!") 
  (begin;there is a path let's go
(let*
(
 (path (car (gimp-path-get-current img)))
 (textlen (length text))
 (typea (car (gimp-drawable-type-with-alpha drw)))

;(text-layer (car (plug-in-freetype RUN-NONINTERACTIVE img 0 fontfile 
fontsize PIXELS 1 0 0 1 FALSE FALSE FALSE FALSE 0 " ")))

 (text-layer 
  (car 
   (gimp-layer-new img
   (car (gimp-image-width img))
   (car (gimp-image-height img))
   typea
   "Text Layer"
   100
   NORMAL-MODE)))

 <@  (char-layer)   ; what's this???
 (charac "!");a 1 character-long string
 (position 0)
 (charcount 0)
 (charwidth)
 );end variable declaration
  (if (= text-