Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Interpret text code as image or custom symbol
#1
Hello everyone. I am using GIMP for a project of mine and I need to facilitate the implementation of small pictures/icons when using them in the middle of a text, like you can find in card games.

Let's say I write a text as "This is a [heart] wow", could GIMP interpret [heart] as a symbol/picture and automatically replace it as follow : "This is a Heart wow" ?


Is there a way for GIMP to "translate" a custom text code into an image ? Is there an option or plugin you guys know ? Thank you for your help and sorry for the weird question, google hasn't helped me.
Reply
#2
Please give your Operating System, it does help when giving suggestions.

You can input a unicode using shift-crtl-u which gives a underlined u character followed by a code.
For card characters see: https://en.wikipedia.org/wiki/Playing_cards_in_Unicode

For Windows users first set the input mode to 'simple' 

   

Then it is shift-ctrl-u then the code then enter.  Depending on the font set the colour by selecting the character with the on canvas text tool.

   

Linux users, no need to set an input mode, same as above: 20 second animation https://i.imgur.com/X7icqr3.mp4
Reply
#3
Thank you for answering but that is not what I want to do.
You are explaining how to insert basic pre existing unicode symbols.

I would like to add custom symbols/pictures summoned by custom text code.
Reply
#4
(01-14-2024, 03:23 AM)Piq Wrote: Thank you for answering but that is not what I want to do.
You are explaining how to insert basic pre existing unicode symbols.

I would like to add custom symbols/pictures summoned by custom text code.


It isn't very hard to make some Python code to do the replacement. This can also be solved by a macro in any decent text editor.

However the painful part is to come up with a dictionary mapping names to characters. Unicode characters have standard names but heart is a bit ambiguous so the real names are probably too long for human consumption:

   
Reply
#5
(01-14-2024, 01:51 PM)Ofnuts Wrote: It isn't very hard to make some Python code to do the replacement. This can also be solved by a macro in any decent text editor.

Lol. What are you talking about ?!
Reply
#6
(01-14-2024, 02:27 PM)Piq Wrote:
(01-14-2024, 01:51 PM)Ofnuts Wrote: It isn't very hard to make some Python code to do the replacement. This can also be solved by a macro in any decent text editor.

Lol. What are you talking about ?!

UltraEdit, Notepad++, Kate, Emacs, VIM...
Reply


Forum Jump: