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.

Code Snippets / Loading and displaying bitmap fonts

Author
Message
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 4th Nov 2002 18:37
Here is a collection of routines that allow the loading, displaying of, and putting into bitmaps of bitmapped fonts (ie fonts that are stored in a bitmap)



Here is a small test program



Any other versions will be on my web site.
Yes, I really am THAT good...
Puffy
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 5th Nov 2002 03:38
THX YOU SAVED ME THE TROUBLE OF MAKING A POINTER.DLL AND NOW A FONT FUNCTION... i think im in love

AMD Athlon XP 2100+ OC to 3Ghz/1.5gigs ram/128mb ti4200/120gigs hd/19" monitor/Sound Blaster Audigy Platinum EX/2.5mbs Sat Con... I joined in!
Puffy
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 5th Nov 2002 04:30
your function doesnt work... something with the _ things... i dunno ive never used those before... what do they do

AMD Athlon XP 2100+ OC to 3Ghz/1.5gigs ram/128mb ti4200/120gigs hd/19" monitor/Sound Blaster Audigy Platinum EX/2.5mbs Sat Con... I joined in!
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 5th Nov 2002 12:09
Ah - thats the concatenation symbol - I use _ - you might need to change either yours to _ or change mine to ...

Thats if you've updated the editor...
If you haven't then now would be a good time!

Yes, I really am THAT good...
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 5th Nov 2002 20:41
By the way, I think you've spelt your e-mail address incorrectly.

Yes, I really am THAT good...
Puffy
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 6th Nov 2002 05:00
EEEEEEEK your right.... =\ damn typo... ok i fixed that error... (first thing i tried...) but whats bothering me is that it says it cannot load the image... i used the same image as you =\...

AMD Athlon XP 2100+ OC to 3Ghz/1.5gigs ram/128mb ti4200/120gigs hd/19" monitor/Sound Blaster Audigy Platinum EX/2.5mbs Sat Con... I joined in!
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 6th Nov 2002 10:24
Change the "e:\users.." to point to your bitmaped fonts. I'll also describe the parameters later.

Yes, I really am THAT good...
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 6th Nov 2002 11:17
Right, the parameters that need to be passed to createFont are :

width - Width in characters
height - Height in characters
charXWidth - Width of each character
charYWidth - Height of each character
charXOffset - Offset within each step value to start grabbing the characer
charYOffset - Offset within each step value to start grabbing the character
charXStep - Horizontal step value charYStep - Vertical step value
filename - Filename of bitmap to load
chars - Characters contained within the bitmap from left to right and top to bottom.

Yes, I really am THAT good...
Puffy
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 7th Nov 2002 03:34
-_- i mean i used your same bmp i changed the path to where it was... BUT... it says it cannot load at line 41 with your text... k =)... oh and your str"" and string$"" need = on my comp... do they on yours?

AMD Athlon XP 2100+ OC to 3Ghz/1.5gigs ram/128mb ti4200/120gigs hd/19" monitor/Sound Blaster Audigy Platinum EX/2.5mbs Sat Con... I joined in!
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 7th Nov 2002 10:33
Ah - Its gone an mucked it up...

I'll send you the correct ones again via e-mail

Yes, I really am THAT good...

Login to post a reply

Server time is: 2024-04-19 14:30:39
Your offset time is: 2024-04-19 14:30:39