It is currently Tue Feb 21, 2017 3:28 am


Latest GIMP Scripts & Plug-ins

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 370 posts ]  Go to page 1, 2, 3, 4, 5 ... 37  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: 2566
Location: Tin from Victoria BC 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 146 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 147 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 141 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

_________________
T.
gimplearn.com - GIMP LEARN forum


Last edited by trandoductin on Sat Oct 29, 2016 11:54 am, edited 36 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
Global Moderator
User avatar

Joined: Aug 10, 2012
Posts: 8574
Location: Formerly From NYC, Now in Arizona
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 can learn 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: 2566
Location: Tin from Victoria BC 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.

_________________
T.
gimplearn.com - GIMP LEARN forum


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

Joined: Aug 10, 2012
Posts: 8574
Location: Formerly From NYC, Now in Arizona
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 can learn 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: 2566
Location: Tin from Victoria BC Canada
Polygon is one of my favorite things if you remember the polygon art thread(s).
Great can't wait to see some sample

_________________
T.
gimplearn.com - GIMP LEARN forum


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: 2566
Location: Tin from Victoria BC 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 ;)

_________________
T.
gimplearn.com - GIMP LEARN forum


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

Joined: Aug 10, 2012
Posts: 8574
Location: Formerly From NYC, Now in Arizona
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 can learn 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
GimpChat Member
User avatar

Joined: Oct 02, 2014
Posts: 1841
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

All life is reflected in glass but encased in wire


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: 1034
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 2689 times ]
Font-to-layers.zip [2.14 KiB]
Downloaded 109 times
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: 2566
Location: Tin from Victoria BC 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.

_________________
T.
gimplearn.com - GIMP LEARN forum


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

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

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Custom-Font-XCF-Files

327

No new posts Attachment(s) Photofont Start/PHF Photofont installer 2.0 (PSPPI-2.0)

60

No new posts Attachment(s) Batch Script for custom Script?

15

This topic is locked, you cannot edit posts or make further replies. Custom GIMP script request

2

No new posts Attachment(s) Dividing Scanned Images while retaining the filename, custom script

0



* Login  



Powered by phpBB3 © phpBB Group