Switch to full style
Post all Gimp scripts and script writing questions here
Post a reply

Plugin UNICODE to shapes and paths.py

Wed Feb 20, 2019 1:53 pm

Wikipedia:
"Unicode is an industry standard computer that provides consistent coding, representation and handling of text expressed in most writing systems in the world.
The standard is maintained by the Unicode consortium, and from June 2018. The latest version, Unicode 11.0, contains a repertoire of 137439 characters including 146 modern and historical scripts, as well as many sets of symbols and emoji."


Inspired by Rich2005 in the post on Gimp-Forum.net:
https://www.gimp-forum.net/Thread-Polygonal-designs-and-intersections?pid=12402#pid12402

I tried to write a Python plugin that makes working with GIMP easier.
Because there are many ready-made shapes, we can use those we want (adding your own chosen shapes is not difficult).
In the GIMP menu: Filters -> Path -> Unicode to shape ...
Tested only for Windows, GIMP 2.10.5.
I invite You to test (and concrete changes proposals in the code ...)

Edit 2019-02-27: removed the old version of the plugin.
The current version in the # 12 post.

Re: Plugin UNICODE to shapes and paths.py

Wed Feb 20, 2019 2:22 pm

Thank you MareroQ.
Works fine on my Linux Mint 18.3/ GIMP 2.10.8 flatpak.

Re: Plugin UNICODE to shapes and paths.py

Wed Feb 20, 2019 2:47 pm

That's nice, thanks for the plugin. Tried on 2.10.8 Win7 64, works okay.
Proposals?
How about automatic alignment to center of canvas?
Would be nice also if the list was in alphabetic order.
Or maybe even better if it was ordered alphabetically by the groups, but I guess it's easy to customize and create own list.

This is must:
https://en.wikipedia.org/wiki/Emoji#Unicode_blocks

Re: Plugin UNICODE to shapes and paths.py

Wed Feb 20, 2019 4:24 pm

Nidhogg wrote:That's nice, thanks for the plugin. Tried on 2.10.8 Win7 64, works okay.
Proposals?
How about automatic alignment to center of canvas?
Would be nice also if the list was in alphabetic order.
Or maybe even better if it was ordered alphabetically by the groups, but I guess it's easy to customize and create own list.

This is must:
https://en.wikipedia.org/wiki/Emoji#Unicode_blocks


If you have the unicode blocks opened in your browser, you can just copy/paste the character in a Text layer:
Gimp-Emoji.png
Gimp-Emoji.png (42.89 KiB) Viewed 13265 times


... and then use text-to-path. You can even use them directly in my ofn-text-along-path script (here using the "Repeated" option):

T-A-P-Emojis.png
T-A-P-Emojis.png (73.82 KiB) Viewed 13265 times

Re: Plugin UNICODE to shapes and paths.py

Wed Feb 20, 2019 5:09 pm

Thanks for the tip Ofnuts, that's nifty. :bigthup

Re: Plugin UNICODE to shapes and paths.py

Thu Feb 21, 2019 3:23 pm

Thank you all for testing.

@Nidhogg
One plugin for one group of characters is probably a good idea. :roll:

For the trial I added only one option - repeating the character in a row (Horizontally) or column (Vertical).
New shapes: Signs of Zodiac.

On the GIMP menu: Filters -> Path -> Unicode to shape -> Signs of Zodiac...

Edit 2019-02-27: removed the old version of the plugin.
The current version in the # 12 post.

Re: Plugin UNICODE to shapes and paths.py

Fri Feb 22, 2019 9:37 am

In the Unicode to shape V.03 (Final Release :geek ) added options " justification":

- Add "border" x = y (adds a margin from the top +X=0 and side edges +Y=0 of the image),
- Offset x (px),
- Offset y (px),
- Horizontal Spacing ("letter spacing") when repeating the shape,
- Vertical Spacing ("line spacing") when repeating the shape.

New shapes: Planets and I-CHING

On the GIMP menu:
Filters -> Path -> Unicode to shape -> Arrow,Card,Chess,Greek...
Filters -> Path -> Unicode to shape -> Planet and I-CHING..
Filters -> Path -> Unicode to shape -> Signs of Zodiac...

ps. Now a break in learning coding - I need to get to know the basics of Python better...

Edit 2019-02-27: removed the old version of the plugin.
The current version in the # 12 post.

Re: Plugin UNICODE to shapes and paths.py

Fri Feb 22, 2019 12:41 pm

Thank you for the update. Good way to create some basic shapes and symbols fast without having to load a dingbat.
Especially with a favorites list, which I didn't manage to do yet.
But I stumbled upon a useful program called BabelMap.

Re: Plugin UNICODE to shapes and paths.py

Sun Feb 24, 2019 12:27 pm

Hi Nidhogg.

Thanks for showing BabelMap.
It contains all the information you need - without having to use a web browser.

Re: Plugin UNICODE to shapes and paths.py

Mon Feb 25, 2019 7:12 am

Excellent Plug-in.. :clap
Can I change or add new shapes?
It is like ?

Re: Plugin UNICODE to shapes and paths.py

Tue Feb 26, 2019 5:23 pm

@Leopardo-40

To add a new shape you need to edit the plugin (you need to know the appropriate symbol record in UNICODE and paste in the right places).
.................................................................................................................
I have a new solution (without editing the plugin code) using BabelMap (Windows only) or text from the selected font (but you need to know which font and keys to use).

Download BabelMap: http://www.babelstone.co.uk/Software/BabelMap.html

The new version (0.4 :hehe ) is ready for trial.
Explanation of use on discharges.

On the GIMP menu:
Filters -> Path -> Unicode to shape -> BabelMap (text) to GIMP ...


Edit 2019-02-27: removed the old version of the plugin.
The current version in the # 12 post.

Re: Plugin UNICODE to shapes and paths.py

Wed Feb 27, 2019 12:43 pm

To the set added:
- script-fu "Symbol Display Rel 0.04" created by Graechan,
- a shortcut to call BabelMap.

Re: Plugin UNICODE to shapes and paths.py

Fri Mar 01, 2019 8:21 am

Hey I see you have scrolling ability in your scm files. Is that gimp 2 10 you are using? And if so can you attach the scriptfu.exe file?

Re: Plugin UNICODE to shapes and paths.py

Fri Mar 01, 2019 9:32 am

Hi Rod.

I am currently using GIMP 2.10.5 on a 32 bit system (Windows Vista)..
Still (without any problems) I use the files: gimpfu.py and script-fu.exe made available here:
http://gimpchat.com/viewtopic.php?f=7&t=16090&start=10#p223540

Re: Plugin UNICODE to shapes and paths.py

Fri Mar 01, 2019 1:52 pm

For Windows 10 64 bit and Gimp 2.10.8 the modified script-fu.exe from viewtopic.php?p=146955#p146955 works.

file size should be 177,152 B

Gimp 2.10.8 now keeps the plugins in folders (political correctness) so move C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins\script-fu folder somewhere safe and replace with just the single script-fu.exe file.

I tried this a week or so ago in my Win10 VM and for some reason there were permissions issues - not able to move that folder out and had to mess with the security permissions. Just tried again without problems, so just something to look out for.

Working as of a few minutes ago before posting.

Image

Re: Plugin UNICODE to shapes and paths.py

Mon Mar 04, 2019 6:41 am

rich2005 wrote:For Windows 10 64 bit and Gimp 2.10.8 the modified script-fu.exe from viewtopic.php?p=146955#p146955 works.

file size should be 177,152 B

Gimp 2.10.8 now keeps the plugins in folders (political correctness) so move C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins\script-fu folder somewhere safe and replace with just the single script-fu.exe file.

I tried this a week or so ago in my Win10 VM and for some reason there were permissions issues - not able to move that folder out and had to mess with the security permissions. Just tried again without problems, so just something to look out for.

Working as of a few minutes ago before posting.

[ Image ]

Thanks Rich. I'll give this version a try. I believe it's the same one I have already. So I'll move it where you say and try again.

Re: Plugin UNICODE to shapes and paths.py

Thu Mar 07, 2019 10:50 am

Hah! I found that if i create a folder named script-fu and place the new executable in there and move it to my user/rod/appdata/roaming/gimp/gimp-2.10/plug-ins folder it works. Same with ml bevel reflect. You just have to name the folder the exact name as the executable without the exe extension.

Gimp seems to see this new folder/s when you restart. No need to remove anything at all from the programs plugins folder.

Image

Image

Re: Plugin UNICODE to shapes and paths.py

Thu Mar 07, 2019 1:41 pm

@ Hi Rod.
I am happy about Your success - but which version works?
...........................................................
By the way some new shapes (but unfortunately not all can be displayed graphically in the menu - and I do not know why).

Re: Plugin UNICODE to shapes and paths.py

Thu Mar 07, 2019 6:41 pm

MareroQ wrote:@ Hi Rod.
I am happy about Your success - but which version works?
...........................................................
By the way some new shapes (but unfortunately not all can be displayed graphically in the menu - and I do not know why).

I used the 64 bit version rich posted a link to.

Re: Plugin UNICODE to shapes and paths.py

Fri Mar 08, 2019 11:55 am

:tyspin MareroQ.
I modified the Run BabelMap & BabelMap to Gimp plugins for Linux Gucharmap.

Image
Post a reply