text on a path 
Author Message
 text on a path

Hi.

Has anyone seen a simple app or code that can arch and bulge text.
Basically I want to make text follow a path but I don't want to pay
hundreds of dollars (or even tens of dollars) for this one feature.  I
really have no other reasons to upgrade my existing software set.

I'm guessing one would use graphic object and "map" the user entered text
in whatever font to an invisible circle and change the size/shape of the
circle then redraw it???  But I'm not a mathemetician, so maybe there's an
easier way to do this?  What is the approach to doing something like this
in code?

Has anyone made such a thing using RB?  If I consider myself a well
practiced beginner with using RB to make simple little apps do you think
this would be a difficult thing for me to do?

TIA,
Greg

p.s. my appologies if this has been discussed already, I was unable to
find a discussion about it via the archives at google...

--
Greg
in Buffalo, WY
ghaas at izzaboo smallcircle com



Wed, 26 Oct 2005 04:21:13 GMT  
 text on a path
That's a very difficult problem.  I don't have any solutions to suggest
that wouldn't either cost you a fair amount of money, or require an
experienced programmer several weeks of hard work.

Cheers,
- Joe

,------------------------------------------------------------------.
|    Joseph J. Strout         Check out the Mac Web Directory:     |

`------------------------------------------------------------------'



Wed, 26 Oct 2005 05:06:29 GMT  
 text on a path


Quote:
> Has anyone seen a simple app or code that can arch and bulge text.
> Basically I want to make text follow a path but I don't want to pay
> hundreds of dollars (or even tens of dollars) for this one feature.  I
> really have no other reasons to upgrade my existing software set.

Do you mean like in illustrator how you can put text on a spline?

Quote:
> I'm guessing one would use graphic object and "map" the user entered text
> in whatever font to an invisible circle and change the size/shape of the
> circle then redraw it???  But I'm not a mathemetician, so maybe there's an
> easier way to do this?  What is the approach to doing something like this
> in code?

Or do you mean putting text just around a circle or oval; or do you want
to bend the actual characters?

For bending the actual characters would be tough, nothing comes to mind
and would depend on how you want to manipulate it. For placing text on a
circle would be fairly easy depending. Finding the points and tangents
for a circle is simple and only a little bit more complicated for an
ellipse.

For something like illustrators text on a spline is definitly do-able,
if you're comfortable with graphics and basic geometry math.
For the basic 4 control point spline all you need are the xy coordinates
of the 4 points: x0,y0,...,x3,y3. RB has built in splines that will draw
the curve for you from the 4 points you supply, but you'll need to do
the actual calculations to find the points on the spline and the
tangent. That equation looks like this
   X = ax*t^3 + bx*t^2 + cx*t + x0
similar for the Y coordinate of the curve. t ranges from 0 to 1.
Iterating through values of t, calculating the X Y then plotting draws
the curve. ax, bx, cx are coefficients and calculated from the
coordinates of the 4 control points
   cx = 3 * ( x1 - x0 )
   bx = 3 * ( x2 - x1 ) - cx
   ax = x3 - x0 - cx - bx

To align text you'd need to calculate the point a certain distance along
the curve (requires a simple loop to narrow into the proper value of t),
find the tangent of the curve at that point (just use a point a little
bit away) to know how much to rotate the character, make a stringshape
object of the character, rotate it and position it.

It's not trivial, but like I said, if you're experienced with graphics
and not too daunted with the above math then you won't have to pay
someone else.

-laz



Thu, 27 Oct 2005 00:25:22 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. text along a path - algorithm?

2. REPOST: Re: import path, script path (was Re: module path)

3. C4 PATH() returns WRONG PATH in Win95!

4. Making file path control only select directory paths not file names

5. how do I set path or add path

6. how to translate a virtual path to a physical path in a CGI script

7. module path and $PATH interaction?

8. os.path.split() with DOS path names

9. Convert between Windows style paths and POSIX style paths

10. parser API style - methods take path or file vs sep methods for path and file

11. adding new paths to sys.path

12. os.path and Windows UNC paths

 

 
Powered by phpBB® Forum Software