SRL Archive - General

Making your own Font


The Prince of Randomness?

2010-01-07 21:31:46

I need to make my own font, for use in SCAR.
This isn't for RuneScape text, but text off another game, which is p2p.

I need the font to compatible with the text functions Uptext.. and most of the basic text functions.

Is making the font as simple as creating bitmaps of text with the text coloured with the monochrome format. (white on black)

Do I need a certain size of the file?

I realize I have to call the font using LoadChars, what are the specific requirements for this?

I assume I can copy the same setup as the runescape fonts, and it SHOULD work.

I don't believe I need to use SRL for what I need to use it for.

and no.. I won't be saying what game this is for, but FYI it sure as hell isn't Wow.

Cheers - The Prince of Randomness? (a lot more mature from the old days :P)

YoHoJo

2010-01-07 21:37:08

I just did this recently, here is a snippit of code
Function FindObjectID(Text:string;): Boolean;
var
tx, ty, S, MyChars,X,Y: Integer;
begin
Result := False;
MyChars:=LoadChars2('C:\Program Files\SCAR 3.21\Fonts\MyChars\')
S := CreateBitmapMaskFromText(Text, MyChars);
if FindBitmapMaskTolerance(S, tx, ty, MSX1, MSY1, MSX2, MSY2, 10, 30) then

And ill attach the characters in just a moment.

Just make a bitmap of each character you want, and name them the proper number. (If you look in scars font folder, each letter (capital and lowercase) have a certain number as their filename, yours must be the same).

Ex
$=36
A=65
B=66
C=67
a=97
b=98

bla bla bla

Just ask if you need any more help.

PS: The only problem I had was making the bitmaps, need to make sure you dont have to little/too much extra black space before/after the character, besides that, its quite straightforward.

The Prince of Randomness?

2010-01-07 22:05:21

Excellent YoHoJo, thanks for the reply, straightforward answer.

The replies are sure a hell of a lot quicker since wayyy back in the day of SRLs humble beginnings.

Did you find any specific amount of black space around each characters that is efficient?

I'll have a look at your characters.

cheers.

YoHoJo

2010-01-07 22:53:19

It all depends, different letters in different places have different spacing. I think mine was just 1 to 2 pixels after? I only had trouble with the number 1 and 0 i think, maybe I just got lucky :D. And no problem :D, yeah lots of more people are knowledgeable and helpful now, its great!

Bebe

2010-01-08 01:15:53

Hi :)

Sorry for the offtopic. I have nothing to contribute to this topic, I admit it. I just wanted to say Hi because I haven't seen The Prince of Randomness? since forever ago. Sorry. :p

Bobarkinator

2010-01-08 01:29:04

From: Bebe
Hi :)

Sorry for the offtopic. I have nothing to contribute to this topic, I admit it. I just wanted to say Hi because I haven't seen The Prince of Randomness? since forever ago. Sorry. :p


I almost did the same thing :)

The Prince of Randomness?

2010-01-08 01:53:09

I almost did the same thing :)

Oh wait, I guess you just did :O

Feel free to derail the topic. :P

Haha :] I remember you both !

More Bebe I have to say, from way back in Kaitnieks

Yeah, I have to admit I was was pretty silly on the boards back in the day, but i'm sure I hadn't done anything too outrageous.

good to hear I'm still recognized, totally didn't expect to see anyone I remembered except the admins or mods :D