Post Reply 

Bitmap font generator script

Feb 4, 2012, 14:50
Post: #1
Bitmap font generator script
I have searched this forum but cannot find something related to my problem.

I found some Python script plugin witch generates "Bitmap font texture".
Here is a script.

The problem is when i generate it adds some offset on Y axis and its not starting from X=0, Y=0:
Plugin options:
[Image: pluginoptions.jpg]
Texture generated:
[Image: fontgenerated.jpg]

Text is cut off. By browsing this script i didn't find nothing that could add this offset except Gimp it self.
I need precise placement of each char/glyph. Any solutions?
Find all posts by this user
Quote this message in a reply
Feb 4, 2012, 17:54
Post: #2
RE: Bitmap font generator script
Thanks for answering.

Can you clear something to me please:
When i choose 16 as font "size", is that value in pixel units?
Is it precisely 16 when asked or it depends on font and chooses by it self the nearest size it have to 16?
If largest height of glyph is 16 pixels there should not be cutoff like in my image above 1520 x 16?
Can you tell me how can i obtain width of some glyph? Does "font" variable has some attrribute for "widest" glyph width?
I want each cell/box for a glyph to be:
Code:
char_begin = 32
char_end = 127
...
cell.w = widest_glyph.width
cell.h = largest_glyph.height
...
image_w = (char_end - char_begin) * cell.w
image_h = cell.h

Thanks for your time.
Find all posts by this user
Quote this message in a reply
Feb 7, 2012, 15:39
Post: #3
RE: Bitmap font generator script
This is one and only which I was looking for, Same problem I were facing. So its my pleasure to have this thread. Thanks for sharing...
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Request for script chlebna 1 234 Sep 13, 2017 09:35
Last Post: ythgilb
  Request for script - Guillotine + Watermark sunslick 1 294 Sep 4, 2017 08:51
Last Post: ythgilb
  Script-fu: How to create new, addressable layer using gimp-floating-sel-to-layer Bertholom√§us 1 332 Aug 31, 2017 14:32
Last Post: Bertholomäus
  How to modify this script-fu? Zakary81 1 258 Aug 23, 2017 12:48
Last Post: paynekj
  Need help in running a gui script-fu via command line eyalzek 2 416 Oct 4, 2014 14:05
Last Post: eyalzek

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS