It is currently Sat Apr 20, 2024 7:41 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Python plug-in du jour: unclose-path
PostPosted: Sat Apr 09, 2011 10:54 am  (#1) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4736
I've been playing with "engraving fonts" aka "stroke fonts", that are not "outline fonts" like most fonts. Unfortunately Gimp doesn't handle them too well, the paths it creates from them ("Path from text" in the Text tool) automatically closes the strokes... So I wrote a quick script to reopen them. It's available there:

https://sourceforge.net/projects/gimp-path-tools/

as unclose-path-0.0.py. It adds an "unclose...." item to the right-click menu in the Paths dialog.

The mandatory before/after picture:
Attachment:
UnclosedPath.png
UnclosedPath.png [ 48.63 KiB | Viewed 4483 times ]


...fresh from the editor, the bytes are barely dry... bug reports gladly accepted (it may unclose too many things). OK, it's sunny outside, and I have a new lens to try. See you later.

_________________
Image


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: Python plug-in du jour: unclose-path
PostPosted: Sat Apr 09, 2011 11:36 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
OK; did an online search and found the Aspire font. It is suppose to be a stroke font but it's still ttf. Not sure if ttf is the issue but attached is my result using your script ofnuts. It would be cool to just find the center of the font and do a single direction path but I'm not sure how hard that would be.

As a side note, do you have a list of fonts in particular that might be friendly to your vision of your pluging? :)


Attachments:
test.png
test.png [ 13.27 KiB | Viewed 4457 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 Post subject: Re: Python plug-in du jour: unclose-path
PostPosted: Sat Apr 09, 2011 11:40 am  (#3) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I don't know where to find an engrave font. Tried it on a regular font and came up with just a few lines scattered hither and yon.

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


Top
 Post subject: Re: Python plug-in du jour: unclose-path
PostPosted: Sat Apr 09, 2011 12:51 pm  (#4) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4736
Engraving fonts are fonts where the character is defined with single strokes without width. For instance, a 'T' in such a font is defined by two dashes. Some free engraving fonts:

http://featurecam.com/general/support/engrave_fonts.asp

_________________
Image


Top
 Post subject: Re: Python plug-in du jour: unclose-path
PostPosted: Sat Apr 09, 2011 1:07 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
Thanks for the font link ofnuts; your script is cool. Now I can stroke all kinds of things in a single direction. :)


Attachments:
Thanks.png
Thanks.png [ 250.44 KiB | Viewed 4437 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 Post subject: Re: Python plug-in du jour: unclose-path
PostPosted: Sat Apr 09, 2011 1:33 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Sweet now that i have Python running in portable ill try it in there. :)
Which ones the path ofnuts the top or bottom area of your image?
I notice the top one is darker.

By the way thanks for the font link too.

PS i miss raindancing

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Python plug-in du jour: unclose-path
PostPosted: Sat Apr 09, 2011 1:38 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
Used Machine Tool San Serif Rod. I did download all 5 available fonts. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Python plug-in du jour: unclose-path
PostPosted: Sat Apr 09, 2011 2:24 pm  (#8) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
:tyspin ofnuts.

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


Top
 Post subject: Re: Python plug-in du jour: unclose-path
PostPosted: Sat Apr 09, 2011 2:57 pm  (#9) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4736
Rod wrote:
Sweet now that i have Python running in portable ill try it in there. :)
Which ones the path ofnuts the top or bottom area of your image?
The top has the extra closure segment on each character, the bottom has the closure segment removed.
Rod wrote:
PS i miss raindancing
Just don't :)

_________________
Image


Top
 Post subject: Re: Python plug-in du jour: unclose-path
PostPosted: Sat Apr 09, 2011 3:23 pm  (#10) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4736
lylejk wrote:
Thanks for the font link ofnuts; your script is cool. Now I can stroke all kinds of things in a single direction. :)
Rather cool for neon signs:
Attachment:
Shop.png
Shop.png [ 177.61 KiB | Viewed 4416 times ]

_________________
Image


Top
 Post subject: Re: Python plug-in du jour: unclose-path
PostPosted: Sat Apr 09, 2011 3:37 pm  (#11) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
This is so cool. This is Machine Tool Grenadier both upper and lower cases - the lower case is just a bit smaller.

Image

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


Top
 Post subject: Re: Python plug-in du jour: unclose-path
PostPosted: Sat Apr 09, 2011 3:53 pm  (#12) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
ofnuts wrote:
lylejk wrote:
Thanks for the font link ofnuts; your script is cool. Now I can stroke all kinds of things in a single direction. :)
Rather cool for neon signs:
Attachment:
Shop.png


Wow; you got that right. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Python plug-in du jour: unclose-path
PostPosted: Sat Apr 09, 2011 6:39 pm  (#13) 
Offline
GimpChat Member

Joined: Mar 07, 2011
Posts: 206
how do i do all that?


Top
 Post subject: Re: Python plug-in du jour: unclose-path
PostPosted: Sat Apr 09, 2011 7:30 pm  (#14) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4045
I see you're up for another Wilber, Ofnuts. The GIMP Academy of Graphic Arts (aka GAGA) has taken note of your contribution. Your effort to make GIMP'in more artistically creative is commendable (which loosely translated means, "THANKS A BUNCH, Ofnuts!")

:)

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Python plug-in du jour: unclose-path
PostPosted: Sat Apr 09, 2011 7:40 pm  (#15) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4045
On a sidenote, you can open paths to font in Inkscape. I have never actually exported opened paths from Inkscape to GIMP that have remained open mainly because I think I am missing a key step in that process. I'll try to find more information on that later.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Python plug-in du jour: unclose-path
PostPosted: Sat Apr 09, 2011 8:16 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
I refuse to recognize GAGA :lol How about GAS? (Graphic Art Scripters)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Python plug-in du jour: unclose-path
PostPosted: Sat Apr 09, 2011 8:17 pm  (#17) 
Offline
GimpChat Member
User avatar

Joined: Mar 02, 2011
Posts: 1850
Location: Michigan
GIMP's Academy of Users

GAU or GAOU
I'll get something I am sure of it

_________________
Image
I'm back I think


Top
 Post subject: Re: Python plug-in du jour: unclose-path
PostPosted: Sat Apr 09, 2011 8:24 pm  (#18) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4045
Quote:
How about GAS? (Graphic Art Scripters)


Like that is any better? LOL.

I originally had chosen GAA (GIMP Art Association)...

GLAD (GIMPers Love Artistic Developers) it shall be... (pounds gavel)

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Python plug-in du jour: unclose-path
PostPosted: Sat Apr 09, 2011 8:30 pm  (#19) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
GLAD i like :lol :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Python plug-in du jour: unclose-path
PostPosted: Sat Apr 09, 2011 9:00 pm  (#20) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4045
To be totally honest, I initially thought to call it GUARD (GIMP Users Association of Rain Dancers) but felt it might intimidate the coders, lol.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts use in python of plug-in lighting

4

No new posts Attachment(s) GIMP Python-Fu Plug-in template

4

No new posts Attachment(s) Path Wobble 3D AKA Hand-scribbling plug-in

19

No new posts GIMP 2.10 doesn't install my python plug-ins

1

No new posts Plug-in crashes after OS upgrade: python version mismatch? maybe?

4


cron

* Login  



Powered by phpBB3 © phpBB Group