• Welcome to Dark Bit Factory & Gravity.
 

A tool to create those "binaries" fonts?

Started by .:] Druid [:., November 22, 2006

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

.:] Druid [:.

Hello,
Sorry if it's dumb or been asked several times (I did not find any..) but I'm just wondering if there is an other way to create those:

data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,0,1,0,0,0,0

other than editing via notepad etc?

Thanks for your help!
[sheep]: im sure he wants to goto prison.. they didnt get him last time.. he was promised a big cock up his arse.. and no doubt looking forward to it.. lets hope he gets his wish this year.

Jim

Most people only use data statements if they want to avoid using external files.  Ideally you'd load your font from a bitmap - there are lots of tools for creating bitmaps from Windows fonts, for instance.

Jim
Challenge Trophies Won:

benny!

@Druid-tro:

Do you mean a tool for "drawing" fonts that outputs the final font in this data-structure
or do you mean a tool for converting e.g. system fonts to this way ?
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

.:] Druid [:.

Benny,

Any of those.  If it cant be converted but can be drawn, I'll survive :)
[sheep]: im sure he wants to goto prison.. they didnt get him last time.. he was promised a big cock up his arse.. and no doubt looking forward to it.. lets hope he gets his wish this year.

Shockwave

I make mine the hard way :( The good thing is that if your font is say 8 pixels wide you can make each line fit into a byte if you can be arsed to do it which makes it really tiny in the exe :)
Shockwave ^ Codigos
Challenge Trophies Won:

.:] Druid [:.

Thanks for your answers...now, i'll add another question then :)

do you have some tuts about using drawed fonts?  also, i'd like to have the fonts included in the exe (bin2bas maybe?) , any hint is welcome

Many thanks in advance!
[sheep]: im sure he wants to goto prison.. they didnt get him last time.. he was promised a big cock up his arse.. and no doubt looking forward to it.. lets hope he gets his wish this year.

Shockwave

That wouldn't be too difficult to do. Have you managed to load a bitmap picture yourself yet?
Shockwave ^ Codigos
Challenge Trophies Won:

.:] Druid [:.

that's waht i'm working on lately to be honnest :)  It drives me crazy ... but it did not yell for help yet :)  Oki, I'll do that first then once it's done, i'll come back with those fotns questions ;)
[sheep]: im sure he wants to goto prison.. they didnt get him last time.. he was promised a big cock up his arse.. and no doubt looking forward to it.. lets hope he gets his wish this year.

Rbz

@Druid: to load a 256 color bitmap, there's an example source included with bmp2raw, any problem, let me know!


Challenge Trophies Won:

rdc

For FreeBasic .17 there is a DrawFont command which is what I am using for some of my demos. You can get the info on the FB wiki. Jofers also wrote a little utility to convert TTF fonts to drawfont format. You can find a link on that on the FB forums. I have used it and it works quite well.


.:] Druid [:.

@rbraz: thanks a LOT it works just like a charm !!! :)

@rdc: i'll give it a try, thanks mate!
[sheep]: im sure he wants to goto prison.. they didnt get him last time.. he was promised a big cock up his arse.. and no doubt looking forward to it.. lets hope he gets his wish this year.

Shockwave

Glad that you've got a picture loaded mate :)
Shockwave ^ Codigos
Challenge Trophies Won:

.:] Druid [:.

Sorry to bring that old post....but I finally managed to use bmp fonts! i'm coding an intro to use those new functions i'm writing.

If anyone is interrested I can put the code explaining how to import and use those fonts...just let me know in this post
[sheep]: im sure he wants to goto prison.. they didnt get him last time.. he was promised a big cock up his arse.. and no doubt looking forward to it.. lets hope he gets his wish this year.

Shockwave

:) That would earn you some Karma I am sure.

Here's a tip when you are using bitmap fonts.. Make sure that you set them out in ASCII order, for example;


!"#$%'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ


And you can then do the calculation;


ASC(MID(STRING,OFFSET,1))-31


To find your letter.. It's the fastest and most elegant way of coding it :)
Shockwave ^ Codigos
Challenge Trophies Won:

Jim

Here's the one I use (src+exe) to generate the bmp fonts for my engine.
http://members.iinet.net.au/~jimshaw/Yabasic/makefont.zip
You have to watch the bmps it spits out though, they're 24bit uncompressed.
The font I generated for the Blocks demo was 3.9Mb until I loaded it into another package and turned it into 8bit RLE BMP and then it came down to 90Kb.

Jim
Challenge Trophies Won:

.:] Druid [:.

really interresting tool Jim!  Thanks for sharing it!

Shockwave: thanks for the tip and it's how I managed to make it work...but I received some fonts, coming from intros, demos...and most of the time, it's not working as is...so, i use "ASC(MID(STRING,OFFSET,1))" without the -31 and by using a select  I make a ch-n ... working...
The good point of this: if the char is not supported, instead of putting a wrong char, you can select yourself the one you prefer to use...hmm..;by rereading i'm not sure i'm clear in the explanation :s  if it's the case, let me know ;)
[sheep]: im sure he wants to goto prison.. they didnt get him last time.. he was promised a big cock up his arse.. and no doubt looking forward to it.. lets hope he gets his wish this year.

Jim

Pixel Outlaw requested a version that does all the extra DOS characters, 128-255.  Here it is
http://members.iinet.net.au/~jimshaw/makefont256.zip

Jim
Challenge Trophies Won:

Pixel_Outlaw

#17
It is a great update!


I'll probably use this more in the future!

EDIT

I just got the font I needed working. This is a great tool Jim.
Challenge Trophies Won:

Shockwave

Shockwave ^ Codigos
Challenge Trophies Won:

Jim

It needs another screen up-front before I release it.  Right now if I want a variable width font on a blue background I just go into the source and change it.
3 things need selecting:
1) Fixed or Variable spacing
2) Background Colour
3) Width/Height of texture.  Right now, 256 wide by any height.  To allow gfx to be packed together vertically ;)  And the variable width code writes out the uv's in format known only to myself...

Jim
Challenge Trophies Won: