GIMP Chat
http://gimpchat.com/

Plugin UNICODE to shapes and paths.py
http://gimpchat.com/viewtopic.php?f=9&t=17235
Page 1 of 3

Author:  MareroQ [ Wed Feb 20, 2019 1:53 pm ]
Post subject:  Plugin UNICODE to shapes and paths.py

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.


Attachments:
Plugin Unicode.png
Plugin Unicode.png [ 158.17 KiB | Viewed 13320 times ]
Example.png
Example.png [ 139.72 KiB | Viewed 13320 times ]

Author:  nelo [ Wed Feb 20, 2019 2:22 pm ]
Post subject:  Re: Plugin UNICODE to shapes and paths.py

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

Author:  Nidhogg [ Wed Feb 20, 2019 2:47 pm ]
Post subject:  Re: Plugin UNICODE to shapes and paths.py

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

Author:  ofnuts [ Wed Feb 20, 2019 4:24 pm ]
Post subject:  Re: Plugin UNICODE to shapes and paths.py

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:
Attachment:
Gimp-Emoji.png
Gimp-Emoji.png [ 42.89 KiB | Viewed 13279 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):

Attachment:
T-A-P-Emojis.png
T-A-P-Emojis.png [ 73.82 KiB | Viewed 13279 times ]

Author:  Nidhogg [ Wed Feb 20, 2019 5:09 pm ]
Post subject:  Re: Plugin UNICODE to shapes and paths.py

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

Author:  MareroQ [ Thu Feb 21, 2019 3:23 pm ]
Post subject:  Re: Plugin UNICODE to shapes and paths.py

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.


Attachments:
Add new option-repeat  shape.jpg
Add new option-repeat shape.jpg [ 97.25 KiB | Viewed 13197 times ]

Author:  MareroQ [ Fri Feb 22, 2019 9:37 am ]
Post subject:  Re: Plugin UNICODE to shapes and paths.py

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.


Attachments:
Astrology.png
Astrology.png [ 733.23 KiB | Viewed 13152 times ]

Author:  Nidhogg [ Fri Feb 22, 2019 12:41 pm ]
Post subject:  Re: Plugin UNICODE to shapes and paths.py

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.

Author:  MareroQ [ Sun Feb 24, 2019 12:27 pm ]
Post subject:  Re: Plugin UNICODE to shapes and paths.py

Hi Nidhogg.

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

Attachments:
BabelMap.png
BabelMap.png [ 514.73 KiB | Viewed 13058 times ]

Author:  leopardo-40 [ Mon Feb 25, 2019 7:12 am ]
Post subject:  Re: Plugin UNICODE to shapes and paths.py

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

Author:  MareroQ [ Tue Feb 26, 2019 5:23 pm ]
Post subject:  Re: Plugin UNICODE to shapes and paths.py

@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.


Attachments:
BabeMap - create shape or text.png
BabeMap - create shape or text.png [ 514.73 KiB | Viewed 7003 times ]
BabelMap to Gimp - two posibility.png
BabelMap to Gimp - two posibility.png [ 784.38 KiB | Viewed 7003 times ]

Author:  MareroQ [ Wed Feb 27, 2019 12:43 pm ]
Post subject:  Re: Plugin UNICODE to shapes and paths.py

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

Attachments:
Alternative possibilities.png
Alternative possibilities.png [ 748.41 KiB | Viewed 6795 times ]
Unicode_to_shape V 0.4.ZIP [17.73 KiB]
Downloaded 259 times

Author:  Rod [ Fri Mar 01, 2019 8:21 am ]
Post subject:  Re: Plugin UNICODE to shapes and paths.py

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?

Author:  MareroQ [ Fri Mar 01, 2019 9:32 am ]
Post subject:  Re: Plugin UNICODE to shapes and paths.py

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

Author:  rich2005 [ Fri Mar 01, 2019 1:52 pm ]
Post subject:  Re: Plugin UNICODE to shapes and paths.py

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

Author:  Rod [ Mon Mar 04, 2019 6:41 am ]
Post subject:  Re: Plugin UNICODE to shapes and paths.py

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.

Author:  Rod [ Thu Mar 07, 2019 10:50 am ]
Post subject:  Re: Plugin UNICODE to shapes and paths.py

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

Author:  MareroQ [ Thu Mar 07, 2019 1:41 pm ]
Post subject:  Re: Plugin UNICODE to shapes and paths.py

@ 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).

Attachments:
Star & Asterisk.png
Star & Asterisk.png [ 117.84 KiB | Viewed 6654 times ]
Signs differents.png
Signs differents.png [ 87.69 KiB | Viewed 6654 times ]
Add Unicode_to_shape V 0.4.ZIP [5.52 KiB]
Downloaded 228 times

Author:  Rod [ Thu Mar 07, 2019 6:41 pm ]
Post subject:  Re: Plugin UNICODE to shapes and paths.py

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.

Author:  Nidhogg [ Fri Mar 08, 2019 11:55 am ]
Post subject:  Re: Plugin UNICODE to shapes and paths.py

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

Image

Page 1 of 3 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/