It is currently 22 Feb 2018, 22:17

GIMP Python Fu ScriptsCustom Font on Path Script for GIMP. (Showcase | Slideshow)

Share your Python Fu scripts for GIMP here
Post Reply
User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 13/44
Posts: 2180
Joined: 26 Sep 2016, 00:16
Cash on hand: 8,191.32 GLP
Bank: 53,924.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1215
x 261
Contact:
Canada

Custom Font on Path Script for GIMP.

Post#1 by tim » 23 Feb 2017, 06:01


Request by Pat625.
This works using defined Custom fonts.
Warning: I will not look for 'space.png' layer in .xcf but it'll only try to look at ' .png' (that's a space then .png). So you might have to rename the 'space.png' to ' .png' in your custom font files.
:download:
custom_font_on_path.zip #
Zipped .py file (unzip, put in your GIMP's /plug-ins/ folder)
(2.69 KiB) Downloaded 50 times
custom_font_on_path (2).zip #
version 2. checks for 'space.png' or ' .png'. Tries uppercase if lowercase not defined and vice versa.
(2.86 KiB) Downloaded 56 times
custom_font_on_path (3).zip #
version 3. fixed bugs for when vectors are defined for character's width and/or kerning vectors.
(3.16 KiB) Downloaded 75 times
custom_font_on_path (4).zip #
version 4. Uses better code from ofnuts. Uses math.atan2() function.
(3.35 KiB) Downloaded 34 times
Script location: Python-Fu/Custom Font on Path...
Instructions:
1. Have an active path selected.
2. Run script.
3. Select your .xcf custom font file. Enter Text you want to fit on path. Choose text positioning ("Above Path, On Path or Below Path"), Choose letter spacing (number of pixels for spacing before scaling down to fit on path).
4. Text will will be generated and scaled to fit on whole path.

Sample outputs of different positions and different fonts.
Custom_Font_On_Path_samples.png
Custom_Font_On_Path_samples.png # (138.94 KiB) Viewed 1046 times (Watermarked | Thumbnail)
Custom_Font_On_Path_samples_2.png
Custom_Font_On_Path_samples_2.png # (106.74 KiB) Viewed 1008 times (Watermarked | Thumbnail)
Video to show you script is used:


Get more custom fonts:
1) http://gimplearn.net/viewtopic.php/Cust ... GIMP?t=301
2) http://gimpchat.com/viewtopic.php?f=9&t=14696
3) http://gimpchat.com/viewtopic.php?f=9&t=14045
4) viewtopic.php/Custom-Font-Composition-F ... 676#p11676
0 x



aka Tin
Image gimplearn.net                                              

Registered members enjoy ads-free content
User avatar
Issabella
Script Tester
View: Showcase | Slideshow
Topic Posts: 11/44
Posts: 1962
Joined: 19 Jan 2017, 11:42
Cash on hand: 17,162.78 GLP
Gender: Gal
Operating System: Windows
x 231
x 505
Spain

Post#2 by Issabella » 23 Feb 2017, 14:36


Tin, You got it!!!! That is great! Thank you so much. I have to test it . :gimp_clap: :yay_yay_purple:
0 x



Issabella

User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 13/44
Posts: 2180
Joined: 26 Sep 2016, 00:16
Cash on hand: 8,191.32 GLP
Bank: 53,924.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1215
x 261
Contact:
Canada

Post#3 by tim » 23 Feb 2017, 15:15


Thanks for testing Issabella!
0 x



aka Tin
Image gimplearn.net                                              

User avatar
Pat625
Script Tester
View: Showcase | Slideshow
Topic Posts: 10/44
Posts: 2238
Joined: 28 Sep 2016, 03:35
Cash on hand: 13,329.14 GLP
Gender: Gal
Location: USA
Operating System: Windows
GIMP Version: 2.8.22
x 8
x 470
United States of America

Post#4 by Pat625 » 23 Feb 2017, 15:48


Custom font on Path.gif
Custom font on Path.gif # (2.08 MiB) Viewed 921 times (Watermarked | Thumbnail)
2 x




User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 13/44
Posts: 2180
Joined: 26 Sep 2016, 00:16
Cash on hand: 8,191.32 GLP
Bank: 53,924.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1215
x 261
Contact:
Canada

Post#5 by tim » 23 Feb 2017, 16:21


Pat625 wrote:
23 Feb 2017, 15:48
Custom font on Path.gif
Nothing is impossible, especially if i copy angle calculation code from ofnuts.
0 x



aka Tin
Image gimplearn.net                                              

User avatar
Issabella
Script Tester
View: Showcase | Slideshow
Topic Posts: 11/44
Posts: 1962
Joined: 19 Jan 2017, 11:42
Cash on hand: 17,162.78 GLP
Gender: Gal
Operating System: Windows
x 231
x 505
Spain

Post#6 by Issabella » 23 Feb 2017, 16:28


Tin, the script works great! Thank you so much. :happy_purple:
Attachments
CustomFont_On Path.jpg
CustomFont_On Path.jpg # (1.67 MiB) Viewed 906 times (Watermarked | Thumbnail)
2 x



Issabella

User avatar
Pat625
Script Tester
View: Showcase | Slideshow
Topic Posts: 10/44
Posts: 2238
Joined: 28 Sep 2016, 03:35
Cash on hand: 13,329.14 GLP
Gender: Gal
Location: USA
Operating System: Windows
GIMP Version: 2.8.22
x 8
x 470
United States of America

Post#7 by Pat625 » 24 Feb 2017, 01:39


The Thinker.jpg
The Thinker.jpg # (548.02 KiB) Viewed 872 times (Watermarked | Thumbnail)
2 x




Post Reply

Last 20 Members Who Visited This Topic

User avatar Wallace (1), User avatar Issabella (30), User avatar PhotoMaster (1), User avatar tim (68), steeno (1), User avatar gnerd (45), User avatar Pat625 (27), User avatar RJKD (23), User avatar Conbagui (5), User avatar Pegleg44 (2), User avatar oldmangrumpy (1), User avatar dinasset (1)

  • Similar Topics
    Replies
    Views
    Last post
• Featuring Members' Works (Image Attachments Only) •
1: Issabella
2: leopardo-40
3: Pat625
4: dinasset
5: oldmangrumpy
6: Issabella
7: trandoductin

Who is online

Users browsing this forum: No registered users and 1 guest