Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / Text to Image Tool

Author
Message
waffle
18
Years of Service
User Offline
Joined: 9th Sep 2002
Location: Western USA
Posted: 21st May 2011 06:48 Edited at: 1st Jun 2011 02:11
Usefull for any language.
It has been some time since I last posted anything, been sorta busy. This is mostly to show I am still around

This tool is small and fun to use. The help is lacking, but hey,
the price is free and all the settings need to be played with.
If you are afraid to experiment, this app is not for you. Basically, you select a font, size, color ....
and then build. Straight forward, and most programmers have done
this in DBC. What I have added here though, is optional shadows
with colors, sizes. By adjusting the size and offsets between your
two character images, you can create some interesting effects.
Much easier to experiment with spinners, then by trial and error.
When done, just BUILD.

examine the finished image (width/height) to determine the size
of each "image part". It should be width/10. So if the total image is 360x360, each letter image would be 36x36. I do add 4 pixcels
to each image, so you may reduce this to 32x32 if you like.

Just added a Button Creator tool to go with this. It takes characters from the created image array, and creates a text image
from selected text. This you can easily import into Gimp, MSPaint
or whatever to draw lines around or other effects to make a nice caption image on a button.

Attachments

Login to view attachments
waffle
18
Years of Service
User Offline
Joined: 9th Sep 2002
Location: Western USA
Posted: 21st May 2011 06:51
Here is a sample created font...

Attachments

Login to view attachments
BatVink
Moderator
17
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 21st May 2011 11:30
Hi Waffle, looks good.

Can I make a suggestion? The standard for bitmap font maps is to start with space (so one character less than your "!"), and to have 10 rows.

With 10 rows you also get brackets, and you have 6 spare spaces where you can add your own custom characters later (for example a tick and cross for buttons).

I have my own code for doing exactly this but it's all done manually. I set the font, size and spacing in the code, then recompile every time I need a new font. So thank you, this is a great little tool to make it easier!

oh, a couple more ideas . If you use SET BITMAP FORMAT 21 and export to PNG then you have a font with no background. You might also want to include the spacing between the characters as a parameter, I always have to fiddle with this to get it just right for different fonts.

waffle
18
Years of Service
User Offline
Joined: 9th Sep 2002
Location: Western USA
Posted: 21st May 2011 19:23
OK, I added more chars,
now starts at (32) Space
and stops at 126 (~) to give a 10x10 grid

Also, here is a new example, showing other shadow effect

I did not add PNG support. I generally use DBC and so I am used
to BLACK as transparent. This is sorta a judgement call.
PNG would be more versitile to DBPro and others, maybe I will
add that later. Mostly I just wanted to keep the interface simple.

On Spacing...
I measure the font width and height of the "@" (64) as that
is the largest character (of normal fonts) and use the longest
distance as the "size" to reserve for each character. To this
I add and extra 4 just to be safe. With this in mind, its a rather
simple matter to "reverse engineer" a grid for using than to
also permit custom spacing. I would have to add a preview window,
some extra sliders or spinner... the tool could become overly
complex. Just a thought.

waffle.

Attachments

Login to view attachments
BatVink
Moderator
17
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 22nd May 2011 15:39 Edited at: 22nd May 2011 15:41
All valid points
Glad you started it at ASCII 32, that makes it so much more compatible.

I experiment with spacing because I put my fonts into a graphics app afterwards to add more effects. Glows tend to need much more space...



Attachments

Login to view attachments
waffle
18
Years of Service
User Offline
Joined: 9th Sep 2002
Location: Western USA
Posted: 29th May 2011 05:08
I added a button maker tool. Its in the zip above. This has your trim options and such, so you can save words as an image.
waffle
18
Years of Service
User Offline
Joined: 9th Sep 2002
Location: Western USA
Posted: 1st Jun 2011 02:17
Just added a button placement tool (source code only) with a sample project. Now you can your your mouse to place buttons for
a simple dialog setup. Even supports multi-state buttons.

Uses my mediaman.dba and dialogman.dba libs, included.
something to do. Mostly just converting my DBC Libs to DBPro
while learning to use the DBPro debugger. tricky bugger.

But then so was the DBC debugger. Sorta confusing that the
"Break" does not seem to "output" text like it should. Or maybe
it just gets lost in the backdrop since it does not output to
the CLI. And, it does not always stop at a break point.
But, the "slow program" mode is very cool.
Also, getting used to the variable watcher.
=PRoF=
17
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 1st Jun 2011 13:59
Nice

I've been working on something very similar for a while now, >link<

DVader
16
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 1st Jun 2011 18:15
This looks a great little tool. In the past it has taken me hours and hours creating bitmap fonts in a paint package. This sounds like it will cut out most of the tedious work involved and allow the easy and fast creation of bitmap fonts. Will certainly give this ago next time I need a bitmap font for a project! Nice work!

http://s6.bitefight.org/c.php?uid=103081
waffle
18
Years of Service
User Offline
Joined: 9th Sep 2002
Location: Western USA
Posted: 4th Jun 2011 05:49 Edited at: 4th Jun 2011 05:55
Here is another sample project. This example shows an InputBox function. I am sure new users may find this sorta kewl

source code only(with media)

The EditBox has these features:

Customizable images
Customizanle sounds
Variable offset from top of screen
Auto centers (left-right) on screen
Uses Image Fonts
Auto-Detect multiline messages (uses chr$(10) to mark next line)
Flashing Carret to mark text entry point
Supports backspace (to delete a char)
Pressing Enter same as Clicking OK
Permits fast or slow typing, repeat keys are OK

Attachments

Login to view attachments

Login to post a reply

Server time is: 2020-09-18 08:43:03
Your offset time is: 2020-09-18 08:43:03