It is currently Sat Apr 20, 2024 1:09 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 408 posts ]  Go to page 1, 2, 3, 4, 5 ... 21  Next
Author Message
 Post subject: Custom Font script (spawned from Wallace's PhotoFont topic).
PostPosted: Fri May 06, 2016 10:07 pm  (#1) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
this topic/script is spawned from this topic -> Need Help with PhotoFont Plugin

Click --> Detailed instructions on how to use these already created fonts on gimplearn forum

here's he idea, you create png files that are named like A.png, B.png, C.png...
a.png, b.png, c.png... and cover all the alphabet and numbers and symbols (i might have to add custom symbols since some symbols can not be used as filenames, this would be very easy to add but i'll add them as we discover them)

(Note: version 10 and onward you don't open the .xcf file but you select it as part of the script options when running script)
Then open a gimp file and open all these created files as layers so the layers are named the same "A.png" "B.png" "C.png" .... and maybe save this file as an .xcf file, and consider it your custom font file kind'a idea.
While having this .xcf file active with many layers indicating your font ... run the below script
Attachment:
custom_font.scm [3.58 KiB]
Downloaded 635 times
(It'll be available under Script-Fu/Create New/Custom Font...)

Note: Version 10 and later, you don't have the .xcf opened but you select the .xcf as a script option when prompted.

version 2 of script
(Justify, Letter and Line spacing added)

version 3 of script
("FILLED" Justify added)

version 4 of script
(named layers properly if merge layers is not selected, if merge layers is selected it'll autocrop image)

version 5 of script
(use lowercase letters if uppercase isn't defined,
use uppercase letters if lowercase isn't defined,
use 'space.png' if ' .png' isn't defined)

version 6 of script
(does not report warning when finding newline character ('\n'))

version 7 of script
(use paths/vectors of the same name to define where actual character is located and character's width...if no vectors aren't found, it assumes that center of layer is where character is located and width of layer is width of character)
more details on this

version 8 of script
(fixed a bug, use image width to calculate offsets when vectors/paths are defined for characters because paths are relative to image coordinates and not layer coordinates.)

version 9 of script
(fixed a bug, use layer's width and layer's offsets and path's position relative to layer's offsets to calculate offset to move by).

version 10 of script
prompts for .xcf font file name instead of having to have .xcf font file opened.

version 11 of script
Added border space around text, and cleaned up debug messages (by Graechan).

version 12 of script
Put back a debug code to message user that a certain layer cannot be found when it's not defined.

version 13 of script
Specify font size (in pixels) (by Graechan).

version 14 of script
Set final-height based on new-image's aspect ratio to keep aspect ratio of the create text

version 15 of script
With optional kerning vectors for example AT.png, AW.png, WA.png...which define how wide the character should take place before the 2nd letter starts.

version 16 of script
If character(s) not found, just message user but continue with script so that we always get a result even if it meant ignoring not found characters.


And enter a text string, make sure all your characters in your text are defined in the above .xcf, otherwise you'll get some error complaining that some layers aren't found when it looks for the specific characters.

Here's a sample folder of my files defined for characters/letters found in "Gimp Chat" (including a space named as "space.png")
Attachment:
test.zip [9.46 KiB]
Downloaded 526 times

Here's a sample .xcf file that opened the above .png files in the sample zip above as layers (script is to be ran while this file is opened and active)
Attachment:
GimpChatTest.xcf [24.22 KiB]
Downloaded 551 times


here's a sample of what it generated when i created characters for the string Gimp Chat
Image

-------------------- FONT CONTRIBUTIONS --------------------
Image
animistic_alphabet.7z (composed into .xcf by lylejk source: http://windnstorm.deviantart.com/art/Animistic-Alphabet-330661610)
Image

purple polygon font.xcf (by Wallace)
Image

googlemapfont.xcf (composed into .xcf by Tin source: http://www.telegraph.co.uk/technology/picture-galleries/5757548/The-Google-Maps-alphabet-UK-an-A-to-Z-of-the-British-Isles.html)
Image
googlemapfont.xcf (composed into .xcf by lylejk source: http://nelde.deviantart.com/art/Google-Earth-Alphabet-120408103)
Image
cherub-alphabet.xcf.gz (by rich2005)
Image
stitch_font.xcf (by lylejk)
Image
RGBSpheres.xcf (by Tin with the help of script found here called custom_font_composition.scm)
Image
pipedream.xcf -> Free for personal use. Please link to here -> http://illustratorg.deviantart.com/art/Steampunk-FONT-V3-298587681
Image
rodsSteamPunk.xcf (composed into .xcf by Tin source: (by Rod I think) http://gimpchat.com/viewtopic.php?f=22&t=11158&p=150105&hilit=steampunk+font#p150001)
Image
Blue Metallic Font.xcf (by Wallace)
Image
tiles.xcf (by Tin)
Image
Chiseled Stone Block with Vines Lowercase, "W" changed(by Wallace)
Image
cut_gimpchatbanners.xcf to be used with custom_cut_font.scm (more details on custom cut font)

Image

Old Lashed Wood Font (By Wallace)

Image
Bone Chocolate Chip Cookie Font Download

Image
Mahvins Christmas Lights Font Download

Image
M&M's zipped .xcf font file


------------------------- TOOL TO FACILITATE YOU IN DESIGNING YOUR OWN FONT -------------------------
by MareroQ
this tool will generate all (well not all, the default is missing w,W and some other characters use the below string instead)
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-=`[];'\,./~!@#$%^&*()_+{}:"|<>?

the letters and other characters in their layers with proper layer names
Font-to-layers.zip
Image

_________________
TinT


Last edited by trandoductin on Wed Jun 27, 2018 5:13 pm, edited 37 times in total.

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: Custom Font script (spawned from Wallace's PhotoFont topic).
PostPosted: Fri May 06, 2016 10:19 pm  (#2) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13011
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
trandoductin wrote:
this topic/script is spawned from this topic -> Need Help with PhotoFont Plugin

Okay so here's he idea, you create png files that are named like A.png, B.png, C.png...
a.png, b.png, c.png... and cover all the alphabet and numbers and symbols (i might have to add custom symbols since some symbols can not be used as filenames, this would be very easy to add but i'll add them as we discover them)

Then open a gimp file and open all these created files as layers so the layers are named the same "A.png" "B.png" "C.png" .... and maybe save this file as an .xcf file, and consider it your custom font file kind'a idea.
While having this .xcf file active with many layers indicating your font ... run the below script
Attachment:
custom_font.scm
(It'll be available under Script-Fu/Create New/Custom Font...)
And enter a text string, make sure all your characters in your text are defined in the above .xcf, otherwise you'll get some error complaining that some layers aren't found when it looks for the specific characters.

Here's a sample folder of my files defined for characters/letters found in "Gimp Chat" (including a space named as "space.png")
Attachment:
test.zip

Here's a sample .xcf file that opened the above .png files in the sample zip above as layers (script is to be ran while this file is opened and active)
Attachment:
GimpChatTest.xcf


here's a sample of what it generated when i created characters for the string Gimp Chat
[ Image ]

I have some images in mind for this.
It'll take a little time to create all the letters, but should be able to test it soon.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Custom Font script (spawned from Wallace's PhotoFont topic).
PostPosted: Fri May 06, 2016 10:22 pm  (#3) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
cool :bigthup
right now i only have one special character defined ..and that's the space.png so if you type space it'll look for space.png layer.
As you run into other characters where you can't name them as .png let me know and we'll create special names for them and i can add it to the script (it's really easy to add i just add an if check and set a layer-name to look for) let me know.

_________________
TinT


Top
 Post subject: Re: Custom Font script (spawned from Wallace's PhotoFont topic).
PostPosted: Fri May 06, 2016 11:49 pm  (#4) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13011
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
trandoductin wrote:
cool :bigthup
right now i only have one special character defined ..and that's the space.png so if you type space it'll look for space.png layer.
As you run into other characters where you can't name them as .png let me know and we'll create special names for them and i can add it to the script (it's really easy to add i just add an if check and set a layer-name to look for) let me know.

This is what I'm working on.
I named it Purple Polygon Font.
Image
Image

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Custom Font script (spawned from Wallace's PhotoFont topic).
PostPosted: Sat May 07, 2016 12:22 am  (#5) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
Polygon is one of my favorite things if you remember the polygon art thread(s).
Great can't wait to see some sample

_________________
TinT


Top
 Post subject: Re: Custom Font script (spawned from Wallace's PhotoFont topic).
PostPosted: Sat May 07, 2016 12:25 am  (#6) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
if you create the .xcf that has all your letters opened you should share it so that other people can help popularize this Purple Polygon Font of yours ;)

_________________
TinT


Top
 Post subject: Re: Custom Font script (spawned from Wallace's PhotoFont topic).
PostPosted: Sat May 07, 2016 12:41 am  (#7) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13011
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
trandoductin wrote:
if you create the .xcf that has all your letters opened you should share it so that other people can help popularize this Purple Polygon Font of yours ;)

In my opinion, it still need quite a bit of work, but I'll try to finish it.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Custom Font script (spawned from Wallace's PhotoFont topic).
PostPosted: Sat May 07, 2016 5:22 am  (#8) 
Offline
Global Moderator
User avatar

Joined: Oct 02, 2014
Posts: 4414
Location: Sydney Australia
Just had a quick test before going to sleep :roll:

Only done ABC so far but this script looks like fun Trandoductin :tyspin

Image

... in glass of course.

_________________
Image

Respect should be offered freely but hard earned


Top
 Post subject: Re: Custom Font script (spawned from Wallace's PhotoFont topic).
PostPosted: Sat May 07, 2016 11:10 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2241
Location: Poland
Hi Tin Tran.

Your idea is better than PhotoFont. :yes

To facilitate the design: of small plugin (Filters-> Text-> Font to layers ...)


Attachments:
Starter for custom font.png
Starter for custom font.png [ 54.33 KiB | Viewed 19484 times ]
Font-to-layers.zip [2.14 KiB]
Downloaded 419 times

_________________
Image

Slava
Ukraini!
Top
 Post subject: Re: Custom Font script (spawned from Wallace's PhotoFont topic).
PostPosted: Sat May 07, 2016 11:29 am  (#10) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
MareroQ wrote:
Hi Tin Tran.

Your idea is better than PhotoFont. :yes

To facilitate the design: of small plugin (Filters-> Text-> Font to layers ...)


The idea is however spawned from PhotoFont :hehe
Great job on facilitating the design. :hi5

but i just tried it and i don't know why i am getting this when i try to run it on a new image
GIMP Error
Calling error for procedure 'gimp-floating-sel-anchor':
Procedure 'gimp-floating-sel-anchor' has been called with an invalid ID for argument 'floating-sel'. Most likely a plug-in is trying to work on a layer that doesn't exist any longer.


Your tool looks great because then i don't have define custom symbols at all, it'll just work because I tried naming my layer as "?.png" and it lets me so if we use your tool we won't be restricted by external filenames
i might have to delete my if check that looks for "space.png" when it finds a space in my script because with your tool it'll just look for " .png" which should work just fine.

_________________
TinT


Last edited by trandoductin on Sat May 07, 2016 11:52 am, edited 1 time in total.

Top
 Post subject: Re: Custom Font script (spawned from Wallace's PhotoFont topic).
PostPosted: Sat May 07, 2016 11:36 am  (#11) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
oldmangrumpy wrote:
Just had a quick test before going to sleep :roll:

Only done ABC so far but this script looks like fun Trandoductin :tyspin

[ Image ]

... in glass of course.

nice.
I am glad we don't have to pay hundreds of dollars now to create something that is similar/reusable like PhotoFont

_________________
TinT


Top
 Post subject: Re: Custom Font script (spawned from Wallace's PhotoFont topic).
PostPosted: Sat May 07, 2016 12:46 pm  (#12) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
So i had a chat with my cousin about this and she thinks she can use something like this since she might want to design fonts for her future clients and it's reusable so she thinks it's a great idea.

She also thought I should market this idea... :hehe
I told her nah, for free, for free. Plus i wouldn't know how to market this idea since it's so simple and anyone can just use it.

However, i told her that she can try and market her created font, if it took her a lot of time and that she should be compensated for.

So that's the idea. Some people can try selling their amazing created fonts using this idea/platform or share it for free to the world.

Personally ..i think the designing the font part is the hardest part and most time consuming and if you spent a lot of time on it, you should get something for it if people wanted to use your fonts.

Maybe like a site of downloadable fonts (as .xcf files) where people can donate...

_________________
TinT


Top
 Post subject: Re: Custom Font script (spawned from Wallace's PhotoFont topic).
PostPosted: Sat May 07, 2016 1:03 pm  (#13) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
Not really a font guy (and am too lazy to make my own), but looks like some wonderful work, Tran. You may have even made PhotoFont obsolete. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Custom Font script (spawned from Wallace's PhotoFont topic).
PostPosted: Sat May 07, 2016 1:10 pm  (#14) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
lylejk wrote:
Not really a font guy (and am too lazy to make my own), but looks like some wonderful work, Tran. You may have even made PhotoFont obsolete. :)

hehehe, then maybe i'll turn them into custom font creators instead :hehe

_________________
TinT


Top
 Post subject: Re: Custom Font script (spawned from Wallace's PhotoFont topic).
PostPosted: Sat May 07, 2016 1:27 pm  (#15) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2241
Location: Poland
Trandoductin wrote:
Your tool looks great because then i don't have define custom symbols at all, it'll just work because I tried naming my layer as "?.png" and it lets me so if we use your tool we won't be restricted by external filenames
i might have to delete my if check that looks for "space.png" when it finds a space in my script because with your tool it'll just look for " .png" which should work just fine.


You're a very good programmer - do it.
I'm learning only on examples (my method: think - copy - paste).
Maybe option:
"Justify", "Letter Spacing", "Line Spacing"?

_________________
Image

Slava
Ukraini!


Top
 Post subject: Re: Custom Font script (spawned from Wallace's PhotoFont topic).
PostPosted: Sat May 07, 2016 1:41 pm  (#16) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
MareroQ wrote:
Trandoductin wrote:
Your tool looks great because then i don't have define custom symbols at all, it'll just work because I tried naming my layer as "?.png" and it lets me so if we use your tool we won't be restricted by external filenames
i might have to delete my if check that looks for "space.png" when it finds a space in my script because with your tool it'll just look for " .png" which should work just fine.


You're a very good programmer - do it.
I'm learning only on examples (my method: think - copy - paste).
Maybe option:
"Justify", "Letter Spacing", "Line Spacing"?


:hehe your method is the same as mine
Right now i don't know how to enter multiple lines of text so line spacing and justify are not in scope right now. I guess Letter spacing could be an option. I was hoping to see more custom fonts designed before i do anything more with it ;)

_________________
TinT


Top
 Post subject: Re: Custom Font script (spawned from Wallace's PhotoFont topic).
PostPosted: Sat May 07, 2016 1:59 pm  (#17) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2419
I can see great fun with this one. There are one or two 'bespoke' alphabets around that can be relatively easily utilised.

Attachment:
gc.jpg
gc.jpg [ 106.01 KiB | Viewed 2642 times ]


and the alphabet attached


Attachments:
cherub-alphabet.xcf.gz [297.43 KiB]
Downloaded 412 times

_________________
Image
Top
 Post subject: Re: Custom Font script (spawned from Wallace's PhotoFont topic).
PostPosted: Sat May 07, 2016 2:45 pm  (#18) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2241
Location: Poland
Not as nice as Rich- but fast (with GMIC).


Attachments:
Example1.png
Example1.png [ 545.16 KiB | Viewed 2629 times ]
Example2.png
Example2.png [ 268.31 KiB | Viewed 2629 times ]

_________________
Image

Slava
Ukraini!
Top
 Post subject: Re: Custom Font script (spawned from Wallace's PhotoFont topic).
PostPosted: Sat May 07, 2016 2:48 pm  (#19) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
that's a fun font.
Image

_________________
TinT


Top
 Post subject: Re: Custom Font script (spawned from Wallace's PhotoFont topic).
PostPosted: Sat May 07, 2016 5:01 pm  (#20) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
Okay so i figured how to do multi-line text.
So the Justification, Letter spacing and Line spacing is now in scope
Image


Attachment:
custom_font.scm [6.03 KiB]
Downloaded 380 times

Available under Script-Fu/Create New/Custom Font...

some samples
Image
Image

_________________
TinT


Top
Post new topic Reply to topic  [ 408 posts ]  Go to page 1, 2, 3, 4, 5 ... 21  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) New Custom Font Tool - Custom Font Lighting Effects GT Style Filter

3

No new posts Attachment(s) custom font

8

No new posts Can this be used for Custom Font?

5

No new posts Attachment(s) Custom Font Tools Release 13

1

No new posts Attachment(s) Custom Font WordWall v.001 for Gimp 2.10

4



* Login  



Powered by phpBB3 © phpBB Group