View Full Version : bitmap font
I tried to make a bitmap font tonight. Am having problems of it looking correct. Although as it is now, it looks like a great alien language :)
I made a 256x256 bitmap. I went on a grid of 26x26, so I have 100 characters. Thanks in advance. I am guessing it is setting it up to parse on a grid of 26x26 that is the problem, the default must be another size.
Attached is the font and script I altered to open it.
Petr Schreiber
25-04-2007, 13:10
Hi kryton,
this looks interesting :)
Tbgl font should be ASCII coding compatible, going from code 0 to 255.
So it is matrix 16 x 16 letters, size doesn't matter ( as long as power of two ;) ).
If you want to convert normal font to BMP, there is a lot of choices.
I use one free czech program, which would probably be weird to you to undersatnd texts :)
so you could also try this solution (http://www.lmnopc.com/bitmapfontbuilder/).
Bye,
Petr
To do 256 characters by hand, no thanks. That is why I did 100. I guess a font builder it should be for whole ascii chart, thanks for the link.
Petr Schreiber
26-04-2007, 08:03
kryton,
you don't have to make them all, if you do not plan to use it, just leave there blank space :))
Bye,
Petr
I see, that makes sense Petr.
Another question, for now I decided to use buildfont... anyways, is there a way to calculate the screen position to print by using the screenwidth of the users screen.
I want to put the text off to the side, but what is good on my monitor might not be good on someone else's.
In DarkBasic, you get the width of the screen, then you use a funtion to get the width of pixels it would take output the text, then you subtract that from the width of the screen and you know where to start printing.
Anyways to simulate or do something similar now? Thanks in advance.
Petr Schreiber
26-04-2007, 15:01
kryton,
some stuff was mentioned here (http://community.thinbasic.com/index.php?topic=707.msg4090#msg4090).
Please let me know if it is suitable for you.
Positioning text at pixel coordinates is not very comfortable from my point of view, as you can decide for different resolution or resize window later and all is different.
Bye,
Petr
Thanks Petr, will try that tonight.