Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ofn-bend-path
#1
  • Given a source path (in blue)
  • You provide an envelope path made of two strokes (in red)
  • The script produces the bent path (in green)
   
  • By design, the script only bends the path vertically (in the image above, you can observe that the vertical limits of the characters in the source and bent paths are aligned)
  • The bent path is produced between the two strokes of the envelope path.
  • The source path can be elsewhere,  it only needs to overlap vertically with the envelope strokes
Available at the usual place. Enjoy.
Reply
#2
OMG YES !

and the script is fast as lightning !!!!!!!!!!!!!!!!!!!!!!!!!

   



This doesnt work...strokes too close to each other ?

   
Reply
#3
I can not get that to work at all.

Does it matter how the envelope, two stroke, four node path is made? Can you make two paths then merge down?
Does it matter the order of the nodes? left-to-right, top-path then bottom-path
Is the text path created before the envelope path? Does it matter?

I created the envelope in the following in one go. (shift-click to start a new node) order of the nodes shown. With trace back

invalid top path position for x https://i.imgur.com/NBuLhAM.jpg

ambiguous position https://i.imgur.com/fNrXmTb.jpg
Reply
#4
(12-19-2017, 09:06 PM)Espermaschine Wrote: OMG YES !

and the script is fast as lightning !!!!!!!!!!!!!!!!!!!!!!!!!


This doesnt work...strokes too close to each other ?

What happens is that the left end of the top stroke is below the right end of the bottom one, so the script can't tell which is the top and which is the bottom. I'll try to improve the algorithm Smile

PS: Love the "Elastic" one.
Reply
#5
(12-20-2017, 09:50 AM)rich2005 Wrote: I can not get that to work at all.
  • Does it matter how the envelope, two stroke, four node path is made? No, what counts is the result
  • Can you make two paths then merge down? Yes
  • Does it matter the order of the nodes? left-to-right, top-path then bottom-path No, normally the script sorts that out, athough EsperMachine has found a case where is doesn't and should have
  • Is the text path created before the envelope path? Does it matter? Not at all

I created the envelope in the following in one go. (shift-click to start a new node) order of the nodes shown. With trace back

invalid top path position for x https://i.imgur.com/NBuLhAM.jpg: It could be that "GIMP" has a tangent handle beyond x=592. So if's outside of the X range ot the top path and the script can find how that maps. What is the font used? I can't see exactly the X coordinate for the right hand of the top path... I can confirm if you attach the XCF.

ambiguous position https://i.imgur.com/fNrXmTb.jpg I am ready to bet that the tangent control point from point 2 is above the one from point 3 (see below). So, theoretically the two curves could cross. This is a check I can relax a bit, I don't think the code would really crash if the curves intersect, you would just get strange results.

   

Please keep a version of these files so that we can check that the code updates fix the problems.
Reply
#6
(12-20-2017, 10:02 AM)Ofnuts Wrote: PS: Love the "Elastic" one.

It works surpisingly well with serif fonts ! Didnt expect that.

Used the newspaperprint filter for the line-gradient.

(12-20-2017, 09:50 AM)rich2005 Wrote: Does it matter the order of the nodes? left-to-right, top-path then bottom-path

I guess since paths have a direction (that Gimp doesnt display), you have to draw them so that one isnt going in another direction than the other.
Maybe ofnuts can confirm ?
Reply
#7
@Ofnuts

Got it: My stupidity. I had the envelope path active instead of the text path.

Might be best to add a line to that effect in the docs, it is there at the top. Underline or bold it perhaps. Maybe change colour on diagram to red for OFN-BEND-PATH and blue for the envelope. That would reflect what is seen on a canvas.
Reply
#8
(12-20-2017, 11:42 AM)rich2005 Wrote: Got it: My stupidity. I had the envelope path active instead of the text path.

Thanks Rich. That one got me too.
Reply
#9
   
Reply
#10
(12-20-2017, 11:42 AM)rich2005 Wrote: @Ofnuts

Got it: My stupidity. I had the envelope path active instead of the text path.

Might be best to add a line to that effect in the docs, it is there at the top. Underline or bold it perhaps. Maybe change colour on diagram to red for OFN-BEND-PATH and blue for the envelope. That would reflect what is seen on a canvas.

The parameter dialog says "Envelope path" Smile Agreed with the color switch though.
Reply


Forum Jump: