SRL Archive - Classic

Making your own Font


Target

2010-06-07 02:39:37

I play on RSC private servers and I wanted to create my own font for the servers (they don't use the same font as RSC). I've searched a mountain of forums/posts/etc. and noone covers the process of creating your own font. Any help would be greatly appreciated. :duh:

YoHoJo

2010-06-07 03:13:36

I did this once, but it's late here. I'll post some information for you tomorrow!

Frement

2010-06-07 03:56:13

From: Target
I play on RSC private servers and I wanted to create my own font for the servers (they don't use the same font as RSC). I've searched a mountain of forums/posts/etc. and noone covers the process of creating your own font. Any help would be greatly appreciated. :duh:


Try using Simba, worked for me, Simbas OCR is just awesome!

YoHoJo

2010-06-07 04:05:03

Not sure if you understood him correctly, he wants to know how to make his own custom font for a Runescape Classic Private Server.

I'll help you with some basic info, but like I said, I'll post more tomorrow.
Start by making bitmap masks (look up tutorial if you don't know) of each character in the game.
Then, open a current font already in your scar/simba folder and name the proper numbers/letters (the bitmap masks you made) with the correct number
Ex: A is 65, a is 97, e is 101 etc
(Seen any folder in here: *\SCAR 3.23\Fonts\*

Do that to get you started, good luck.

Frement

2010-06-07 04:07:24

Yeah, I started by that also, but I was using SCAR at the time. When I swapped to Simba, its OCR worked almost 100%. So I suggested that he could try that first. The private server I was playing on was sabsabionline.

Target

2010-06-07 04:18:08

I'll start making the bitmap masks, ill also look into the simba OCR tool. :) Look forward to hearing more information from you YoHoJo. Thanks :)

Frement

2010-06-07 04:29:51

From: Target
I'll start making the bitmap masks, ill also look into the simba OCR tool. :) Look forward to hearing more information from you YoHoJo. Thanks :)


Just use Simba and the GetTextAtEx or GetUpText or something.

YoHoJo

2010-06-07 04:38:27

Frement, those only work using REGULAR runescape's uptext font…?

Frement

2010-06-07 04:57:56

From: YoHoJo
Frement, those only work using REGULAR runescape's uptext font…?


Oh god sorry, yes, sabsabi is RS2 private server. My bad :)

Target

2010-06-08 02:38:33

Alright, I've got the bitmaps made… now what? :P

YoHoJo

2010-06-08 02:57:22

Shove them in a folder.
Here is some example code that finds text using custom font:

Function MyAction(Text:string): Boolean;
var
tx, ty, S, MyChars: Integer;
begin
Result := False;
MyChars:=LoadChars2('C:\Program Files\SCAR 3.21\Fonts\MyChars\')
S := CreateBitmapMaskFromText(Text, MyChars);
if FindBitmapMaskTolerance(S, tx, ty, 62, 19, 76, 34, 10, 30) then
begin
Result := True;
end;
FreeBitmap(S);
end;

I think you would now just need to change the font path, and the boundaries on where to search for it, and tweak it any other way you wish.

You could now also look though some of the SRL text finding functions as examples for yourself.

One common problem I ran into was having too much/too little 'black space' before/after the font letters/numbers I made, sometimes you need to tweak it by a pixel or two.

:/ Very brief explanation, but hopefully someone else can help you from here onwards!

Target

2010-06-08 05:58:41

I've made a script that finds the coords from the numbers listed on the info tab in-game…. but its 600+ lines long rofl…. It's flawless though for the resolution. I'm going to mess around now with using the fonts. :) Thank you for all your help.