Post all Gimp scripts and script writing questions here
Post a reply

Python plug-in du jour: unclose-path

Sat Apr 09, 2011 10:54 am

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:
UnclosedPath.png
UnclosedPath.png (48.63 KiB) Viewed 4714 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.

Re: Python plug-in du jour: unclose-path

Sat Apr 09, 2011 11:36 am

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? :)

Re: Python plug-in du jour: unclose-path

Sat Apr 09, 2011 11:40 am

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.

Re: Python plug-in du jour: unclose-path

Sat Apr 09, 2011 12:51 pm

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

Re: Python plug-in du jour: unclose-path

Sat Apr 09, 2011 1:07 pm

Thanks for the font link ofnuts; your script is cool. Now I can stroke all kinds of things in a single direction. :)

Re: Python plug-in du jour: unclose-path

Sat Apr 09, 2011 1:33 pm

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

Re: Python plug-in du jour: unclose-path

Sat Apr 09, 2011 1:38 pm

Used Machine Tool San Serif Rod. I did download all 5 available fonts. :)

Re: Python plug-in du jour: unclose-path

Sat Apr 09, 2011 2:24 pm

:tyspin ofnuts.

Re: Python plug-in du jour: unclose-path

Sat Apr 09, 2011 2:57 pm

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 :)

Re: Python plug-in du jour: unclose-path

Sat Apr 09, 2011 3:23 pm

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:
Shop.png
Shop.png (177.61 KiB) Viewed 4647 times

Re: Python plug-in du jour: unclose-path

Sat Apr 09, 2011 3:37 pm

This is so cool. This is Machine Tool Grenadier both upper and lower cases - the lower case is just a bit smaller.

Image

Re: Python plug-in du jour: unclose-path

Sat Apr 09, 2011 3:53 pm

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:
Shop.png


Wow; you got that right. :)

Re: Python plug-in du jour: unclose-path

Sat Apr 09, 2011 6:39 pm

how do i do all that?

Re: Python plug-in du jour: unclose-path

Sat Apr 09, 2011 7:30 pm

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!")

:)

Re: Python plug-in du jour: unclose-path

Sat Apr 09, 2011 7:40 pm

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.

Re: Python plug-in du jour: unclose-path

Sat Apr 09, 2011 8:16 pm

I refuse to recognize GAGA :lol How about GAS? (Graphic Art Scripters)

Re: Python plug-in du jour: unclose-path

Sat Apr 09, 2011 8:17 pm

GIMP's Academy of Users

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

Re: Python plug-in du jour: unclose-path

Sat Apr 09, 2011 8:24 pm

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)

Re: Python plug-in du jour: unclose-path

Sat Apr 09, 2011 8:30 pm

GLAD i like :lol :)

Re: Python plug-in du jour: unclose-path

Sat Apr 09, 2011 9:00 pm

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.
Post a reply