0 registered members (),
18,561
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
variable width bitmap font renderer - free (A6/A7)
#152374
09/07/07 10:34
09/07/07 10:34
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
 A6 and A7 supports TrueType fonts as well as the good old bitmap based fixed width fonts. Bitmap fonts are faster and more customizable (because they are actually editable bitmaps), but they are not as looking good as TrueType fonts. To overcome this, I have written a library of functions which renders strings on a basis of bitmap fonts, but with a variable width for each letter. text rendered with a fixed width bitmap font:  text rendered with a variable width bitmap font:  features: - Renders strings as bitmaps -> usable with panels, sprites and entity skins
- Multiline strings are supported (seperated with \n)
- Left, right and center alignment
- auto-allocation of bigger canvas bitmaps if a already existing bitmap canvas is too small to fit the new string rendering
- convenience functions for panel usage
- Memory is only consumpted for letters which have any alpha information in their letter region in the font file: if you put no alpha for a letter, it isn't allocated (memory friendly)
- Font creation is easier than making a native font definition!
- Usable under A6 and A7 if you use it in a C-Script project
and the best of all: it's free!You'll find the download on my page. The package contains a manual (as PDF file) with some examples and everything explained and a compiled demo with open source WDL, which explains very very easily how to integrate it and use it. Please visit: http://www.christian-behrenberg.deThank you very much and have fun! Cheers - Christian
|
|
|
Re: variable width bitmap font renderer - free (A6
[Re: sPlKe]
#152377
09/07/07 13:49
09/07/07 13:49
|
Anonymous
Unregistered
|
Anonymous
Unregistered
|
|
|
|
Re: variable width bitmap font renderer - free (A6
[Re: ]
#152378
09/07/07 15:36
09/07/07 15:36
|
Joined: Apr 2004
Posts: 516 USA
Trooper119
User
|
User
Joined: Apr 2004
Posts: 516
USA
|
Very cool, thanks bud. I'd suggest directly linking the file to this post: Text Minipulator
Last edited by Trooper119; 09/07/07 15:43.
A clever person solves a problem. A wise person avoids it. --Einstein
Currently Codeing: Free Lite-C
|
|
|
Re: variable width bitmap font renderer - free (A6
[Re: Fenriswolf]
#152380
09/08/07 11:10
09/08/07 11:10
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
Quote:
(...)useful for easily displaying a non pre-installed TrueType font on every system.
That was my intention thank you. Plus, your font is wrs enabled.
|
|
|
Re: variable width bitmap font renderer - free (A6
[Re: HeelX]
#152381
10/13/07 11:25
10/13/07 11:25
|
Joined: Mar 2006
Posts: 752 Portugal
demiGod
User
|
User
Joined: Mar 2006
Posts: 752
Portugal
|
hey Christian, very nice tool, thanks for the contribution, but i have two questions regarding fontRender, because i am trying to implement it in the xtreme paintball project: 1 - is there some problem with _align ? I have a panel and render the font this way: Code:
RF_setFontRenderSettings(RF_CONSTANTS_CENTER, 0); RF_pnlRenderString(infos, paintballFont, str_eliminatedPlayer);
but for some reason its not aligning correct in the panel center as you can see in the image below "slayer eliminated"; 2 - Isnt possible to use inkey() ? Thanks, Jorge
|
|
|
Re: variable width bitmap font renderer - free (A6
[Re: demiGod]
#152382
10/13/07 16:47
10/13/07 16:47
|
Joined: Mar 2006
Posts: 2,758 Antwerp,Belgium
frazzle
Expert
|
Expert
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
|
Always welcome such tools  Nice one HeelX !! Cheers Frazzle
Antec® Case Intel® X58 Chipset Intel® i7 975 Quad Core 8 GB RAM DDR3 SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB NVIDIA® GeForce GTX 295 Memory 1795GB
|
|
|
|