SRL Archive - Discussions and Debates

How do you develop fonts?


Camaro'

2010-09-21 16:28:05

Such as NPC Chars, or StatChars..

Thanks.

Shuttleu

2010-09-21 16:48:40

basically and simply, first of all you need the chars, then you color the part you want in white and the rest in black, i think i posted a tutorial

~shut

Wanted

2010-09-21 16:50:38

Before you start, determine how big of a change it is. Obviously if you're starting from scratch you can't just add one or two pixels (like when they added the line through 0) and didn't change anything else. If it's a big change, then you'll probably have to start from scratch.

It's easiest if you have adobe photo shop, the previous working char set, and a way to manipulate what you're using to get the characters you need (such as making an account name, modding the client code, or just typing them in a box if you can)

The first thing you have to do is determine the height of the char set, this is usually flexible and won't cause your fonts not work at all. I think it's the bottom of g and the top of / or something, but you can usually just find out from looking at all the chars and finding a comfortable range to fit all the different chars in the same height (all your chars in your char set will be the same pixel height (I think)) usually you can just use the previous char set's height.

The second thing you have to do is make bitmaps for every single character (RGB/8 32 bit .bmp) and name the file based on their ASCII codes. This is usually pretty hard because all the characters have to fit together perfectly like pieces of a puzzle and not have any extra spaces between characters, the placement on the black canvas of the white bitmapmask has to be exact from side to side. This is tricky because you have to look at the surrounding characters and guess what the space around the chars is. Then once you guess that you have to go around and check to see if you got the space right so that 'o' will fit in different words, this requires a lot of patience to get the first couple characters (I suggest starting with vowels since they are common) once you have some chars bitmap for sure exact, then you can start sandwiching other chars between them examples:


Just remember you have to have every character the exact perfect width and placement within that width (this includes the space char (32)) so that nothing overlaps or leaves spaces. Also, some chars requires an outline-shadow thingy like in Upchars, to make it easy just use the eyedropper in paint/photoshop to get the color correct.

Then you should be able to test whole words and even multiple sentences and they should work with OCR/bitmapmask functions in scar.

Wizzup?

2010-09-21 16:55:18

Why are there two spaces on the left side of the S? AFAIK, one should do fine.

Wanted

2010-09-21 16:58:08

From: Wizzup?
Why are there two spaces on the left side of the S? AFAIK, one should do fine.


No, you need that to be exactly as you see it. With less there will be a gap.

Camaro'

2010-09-21 17:28:22

From: IceFire908
No, you need that to be exactly as you see it. With less there will be a gap.


Excellent explanation IceFire!

Wizzup?

2010-09-21 18:07:14

From: IceFire908
No, you need that to be exactly as you see it. With less there will be a gap.


Obviously there will be a gap. But that's isn't a problem since you have the MinSpacing and MaxSpacing. In other cases I'm not so sure if there will always be two spaces for the 'S'. Something like "CARS" may not work. It didn't work in the past, so I assume it doesn't work now either; but I could be wrong.

Wanted

2010-09-21 18:08:31

From: Wizzup?
Obviously there will be a gap. But that's isn't a problem since you have the MinSpacing and MaxSpacing. In other cases I'm not so sure if there will always be two spaces for the 'S'. Something like "CARS" may not work. It didn't work in the past, so I assume it doesn't work now either; but I could be wrong.


I tested it thoroughly, unless the S is at the front of a word and there is nothing before it then you need that spacing exact in order for bitmapmask to work.

Wizzup?

2010-09-21 18:13:56

From: IceFire908
I tested it thoroughly, unless the S is at the front of a word and there is nothing before it then you need that spacing exact in order for bitmapmask to work.


Perhaps. But since we're talking about how to develop fonts I thought it would be a good thing to point out.

It's (IIRC) how all Kaitnieks' fonts worked.
The character + 1 spacing on either side. Not sure how well it applies to NPCChars as they are a rather strange font.

And yeah, the spacing is especially important for the bitmap masks. But if this works for the masks, then keep it this way.

Narcle

2010-09-21 18:24:23

One spacing is fine, in fact when I was using the Total XP to do a glitch I had to have the 1 with just one spacing and increase the max spacing to 5 to work correctly. As long as you have the spacing set correctly it works (just as Wizzup mentioned).

Wanted

2010-09-21 18:32:10

That's odd because that one missing space causes a lot of things that I tested not to work, such as the bitmap 'y' I just updated needed another space to the left in order to work.

NCDS

2010-09-21 18:40:37

Would it not be dependent on what char it is next to?

Wanted

2010-09-21 18:42:50

From: NCDS
Would it not be dependent on what char it is next to?


Nope, that's the tricky part getting exactly right.

Wizzup?

2010-09-22 05:06:42

Icefire, remember that the Runescape "UpChars" in the uptext (not in the speaking-text) are the same font; but the uptext spacing differs. Sometimes the 'rt' have no spacing at all, sometimes there is about two to three spaces between a few chars. They do this on purpose. That may explain an 'y' with more or less spacing. :)

Gu3st...

2010-09-22 09:53:59

The easiest way (imo) is to download GLIntercept and run runescape in OpenGL mode.

GLIntercept will intercept OpenGL and save all images used in runescape inside a folder that you specify.

EDIT:
Here's one font:
E3: I downloaded GLIntercept, started runescape, got that font and uploaded the picture in about 7 minutes total… That's how easy it is to use.

EDIT2: Just to show the power of GLIntercept…

weequ

2010-09-22 10:11:00

I thought before that min and max spacing means how many spaces can letters have between them..


I personally made a script to save a perfect font for me.
1) Make it type a letter.
2) Find the max width of the letter using like findcolors.
3) Use CopyClientToBitmap(BMB, x1, y1, x2(2nd step) , y1+width);
4) use FastReplaceColor(BMB, color, 0); to set make the bacround back. You can add multiple of these if you have many colors in the backround. I don't know how to make all BUT one color black for non static backrounds.
5) SaveBitmap(BMB, 'Path.bmp');
6) FreeBitmap(BMB);
7) Press backspace = KeyDown(Chr(8)); KeyUp(Chr(8));
8) Repeat;

First I tried making a fon't without this script but found it pretty hard.


Edit: I think combination of these would do step 4:
procedure SetTransparentColor(bitmap, color: Integer);//Color=FontColor
FastDrawClear(bitmap: Integer; Color: TColor); //Color=0

Wizzup?

2010-09-22 10:11:16

Zyt3x, cool!

Gu3st...

2010-09-22 10:24:41

From: Wizzup?
Zyt3x, cool!
I though you'd like it :garfield:

Shuttleu

2010-09-22 10:58:09

From: Zyt3x
The easiest way (imo) is to download GLIntercept and run runescape in OpenGL mode.

GLIntercept will intercept OpenGL and save all images used in runescape inside a folder that you specify.

EDIT:
Here's one font:
E3: I downloaded GLIntercept, started runescape, got that font and uploaded the picture in about 7 minutes total… That's how easy it is to use.

EDIT2: Just to show the power of GLIntercept…


i got GLIntercept but i cant find out how to use it

~shut

Gu3st...

2010-09-22 11:01:26

From: Shuttleu
i got GLIntercept but i cant find out how to use it

~shut


You see a glConfig.ini in the folder? Copy that and the OpenGl32.dll to Java/bin/ and start runescape

Shuttleu

2010-09-22 11:03:53

From: Zyt3x
You see a glConfig.ini in the folder? Copy that and the OpenGl32.dll to Java/bin/ and start runescape


i got that, but i mean how did you get the images?

~shut

Gu3st...

2010-09-22 11:41:54

From: Shuttleu
i got that, but i mean how did you get the images?

~shut
Look in Java/bin/Images :)

Wanted

2010-09-22 18:59:35

From: antti mies
I thought before that min and max spacing means how many spaces can letters have between them..


I personally made a script to save a perfect font for me.
1) Make it type a letter.
2) Find the max width of the letter using like findcolors.
3) Use CopyClientToBitmap(BMB, x1, y1, x2(2nd step) , y1+width);
4) use FastReplaceColor(BMB, color, 0); to set make the bacround back. You can add multiple of these if you have many colors in the backround. I don't know how to make all BUT one color black for non static backrounds.
5) SaveBitmap(BMB, 'Path.bmp');
6) FreeBitmap(BMB);
7) Press backspace = KeyDown(Chr(8)); KeyUp(Chr(8));
8) Repeat;

First I tried making a fon't without this script but found it pretty hard.


Edit: I think combination of these would do step 4:
procedure SetTransparentColor(bitmap, color: Integer);//Color=FontColor
FastDrawClear(bitmap: Integer; Color: TColor); //Color=0


Interesting, only problem is you can't easily obtain all the char sets like others because you can't simply type them in chatbox etc.

From: Wizzup?
Icefire, remember that the Runescape "UpChars" in the uptext (not in the speaking-text) are the same font; but the uptext spacing differs. Sometimes the 'rt' have no spacing at all, sometimes there is about two to three spaces between a few chars. They do this on purpose. That may explain an 'y' with more or less spacing. :)


Hmm idk, maybe the algorithm for rs_GetUpText is different than what some other text functions use, I'm not just making things up :-P the space makes a different and will cause some things not to work properly Test it ;)

From: Zyt3x
The easiest way (imo) is to download GLIntercept and run runescape in OpenGL mode.

GLIntercept will intercept OpenGL and save all images used in runescape inside a folder that you specify.

EDIT:
Here's one font:
E3: I downloaded GLIntercept, started runescape, got that font and uploaded the picture in about 7 minutes total… That's how easy it is to use.

EDIT2: Just to show the power of GLIntercept…


That's simply F#$9ing amazing, does that really work with runescape? I'm really interested in this, would make life a hell of a lot more easier, manually updating fonts is like pulling teeth.

Wizzup?

2010-09-23 02:58:06

From: IceFire908
Hmm idk, maybe the algorithm for rs_GetUpText is different than what some other text functions use, I'm not just making things up :-P the space makes a different and will cause some things not to work properly Test it ;)


I believe you. I didn't think much about the masks before. Just about the actual identifying. :)
Also, yeah. rs_GetUpText in Simba cares less about spacing.

Shuttleu

2010-09-23 04:20:30

From: IceFire908


That's simply F#$9ing amazing, does that really work with runescape? I'm really interested in this, would make life a hell of a lot more easier, manually updating fonts is like pulling teeth.


yes it does work :)
it will make font making a hell of a lot easier

~shut

Runescape Pro

2010-09-23 08:55:39

The thing about glintercept is insane! It grabs every texture? Like, would it be able to grab a tree texture? And with that tree texture, couldn't someone make an amazing Tree chopper? Just wondering. Seems plausible to me.

Gu3st...

2010-09-23 10:38:14

From: Runescape Pro
The thing about glintercept is insane! It grabs every texture? Like, would it be able to grab a tree texture? And with that tree texture, couldn't someone make an amazing Tree chopper? Just wondering. Seems plausible to me.
Yep.

You don't really need to grab the texture either, you can make GLIntercept return x and y positions of objects on-screen

silentwolf made a plugin which did this (It probably still works) but the plugin is in really early ages, has a lot of bugs, and silentwolf left us some time ago..

Runescape Pro

2010-09-23 10:47:27

I remember that! SilentWolf came out of no where with this revolutionary new way to find models in runescape. It intercepted the models being sent to your graphics card for rendering and showed you where they were with an id. I loved it and it was upsetting to me that never went anywhere. What made it so interesting to me was that it didn't just work with smart or like how rs bot injects the client or w/e. I remember playing on my main in SK and it worked lol. I was like "wtfh4x?". AFAIK it didn't have any bugs that i noticed. Can you remember one? Great times…

Gu3st...

2010-09-23 14:49:04

From: Runescape Pro
AFAIK it didn't have any bugs that i noticed. Can you remember one? Great times…
It didn't work for me unless I had PaintOnRunescape turned on, making it pretty obvious that I was botting :P (If JaGeX takes pictures that is… :P

Gu3st...

2010-09-26 05:31:09

Sorry for double-post but how do I fix this problem?
Error: Exception: Font [UpChars_s] not found.
I've tried to update my font, both via Simba and SVN, and I still get the same problem