2 Attachment(s)
Text blitter using the Surface Object
This widget uses Looki's Surface object (currently still in beta, use with caution!) to draw a custom bitmap font to the screen. Just like Text Blitter, except with variable width font and alpha channel support.
Surface Object: http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=189477#Post1894 77
Re: Text blitter using the Surface Object
Wow really cool! Thanks for this!
Can we get some instructions for creating the characters image? I'm probably just stupid, but I can't seem to get it to work :(
2 Attachment(s)
Re: Text blitter using the Surface Object
I made a new version. In this version you don't have to keep the alpha channel image in a seperate image. The widget will split the alpha channel automatically instead of you have to doing it manually.
Quote:
Can we get some instructions for creating the characters image? I'm probably just stupid, but I can't seem to get it to work
Well you just have to create letters and place them in a grid. If you want to generate a bitmap font from an existing font, I suggest you use the Text Blitter object.
If you want to use variable width font, you'll also have to take some time writing down the widths of every letter.
Re: Text blitter using the Surface Object
This is fantastic! I would no doubt use it were I starting a project!
Re: Text blitter using the Surface Object
Re: Text blitter using the Surface Object
Nice use of the Surface Object. :)
Re: Text blitter using the Surface Object
Re: Text blitter using the Surface Object
Complex but powerful, big thanks for that!
2 Attachment(s)
Re: Text blitter using the Surface Object
Sorry for bumping this. But since I'm uploading some files anyway, I'd like to update this widget while I'm at it. Why can't we just edit our first posts :(
Anyway, the reason for me updating is that the widget used the old version of Looki's Surface object, before you could blit alpha channels. So I was using a workaround by adding an extra image in the surface object. I just couldn't sleep knowing that the widget was wasting such useful resources ;P
Re: Text blitter using the Surface Object
I'm super impressed, this is incredibly well done! Nice for the sake of clarity that you stick to alterable values and avoid unnamed variables (flags that is).
I can't help but notice you consistently avoid space bars. The frame name is TextBlitter, the alterable values are named CharGridX, etc. I prefer just writing out what everything is without abbreviations including space bars when supported (simply Character Grid X). It's probably just a matter of taste though :)