Page 1 of 1

Font question for Exult

Posted: Tue Mar 25, 2003 6:02 am
by artaxerxes
First of all, please look at the following screenshot, taken from low.sf.net:

http://low.sourceforge.net/ss7.png

You may have noticed that the font is NOT of fixed width. Compare the 'w' with the 'i' for instance. However, for some reason, the font rendering engine is capable of overlapping letters. Look at the word "Lord". The bottom part of the L reaches under the 'o'.

I was wondering if the exult text rendering can be capable of just a feat. I guess there must be a table indicating how wide a letter should be treated as, so that the next letter can be mapped a bit over the preceding one.

For instance:
If the real width of 'L' is 15, but the table says 10, then when you put the string Lord, the L will be put and 10 pixel further the o will be put instead of 15.

Does that make sense? Is it doable?
The reason why I'm asking, is that I am working on a alternate font for century and it would look REAL neat if it was possible to make it happen.

thx
Artaxerxes

Re: Font question for Exult

Posted: Tue Mar 25, 2003 6:04 am
by artaxerxes
it gets even worst when you look at the "f" in the text. They overlap the PRECEDING character. :-/

Artaxerxes

Re: Font question for Exult

Posted: Tue Mar 25, 2003 8:58 am
by nadir
It's called kerning. U7 fonts are just shapes, which can have x and y offsets, so I guess you're set.

Re: Font question for Exult

Posted: Tue Mar 25, 2003 9:22 am
by artaxerxes
what would be the steps to set the x and y offset of the font shapes?

Artaxerxes

Re: Font question for Exult

Posted: Tue Mar 25, 2003 10:22 am
by drcode
I think ExultStudio lets you set these when you edit the font shapes. To make the character shift one pixel to the left, you should increment the horizontal offset one pixel to the right.
If this doesn't work, let me know, as there used to be a bug here.

Re: Font question for Exult

Posted: Tue Mar 25, 2003 11:06 am
by artaxerxes
will look and tell

thx
Artaxerxes

Re: Font question for Exult

Posted: Tue Mar 25, 2003 12:47 pm
by artaxerxes
would it be possible to have a reload->fonts.vga option ?

Artaxerxes

Re: Font question for Exult

Posted: Tue Mar 25, 2003 10:38 pm
by drcode
Done. When you do a save in the 'fonts.vga' viewer, or a 'Save all', Exult should reload from the updated file. Be sure to get the latest Exult as well as Exult-Studio, or you'll see a crash.

Re: Font question for Exult

Posted: Wed Mar 26, 2003 4:28 am
by artaxerxes
Merveilleux!

thx
Artaxerxes

Re: Font question for Exult

Posted: Wed Mar 26, 2003 4:48 am
by Karlos
Was this implemented for any of the other viewers as well? My personal interest is the chunk viewer.


-Karl

Re: Font question for Exult

Posted: Wed Mar 26, 2003 5:48 am
by artaxerxes
it works and it is fantastic! I save SO much time this way (instead of terminating exult and sprouting it again to reload the fonts).

EXCELLENT!

I'm also getting a solid grasp on how the offset works, so expect a new Century font out sometimes!

And the best part too: this whole thing gave me an idea on how to make better si-french patches.

Thanks again!

Artaxerxes

Re: Font question for Exult

Posted: Wed Mar 26, 2003 6:02 am
by artaxerxes
here is a (very) quick test I've done to see how the overlapping could looks like.

http://si-french.sourceforge.net/font_test.png

You might want to zoom up the picture 'cause it's not high res.

Artaxerxes

Re: Font question for Exult

Posted: Wed Mar 26, 2003 6:03 am
by Karlos
A new font would be great; can't wait to see it. I don't think too many people like the standard ugly yellow font uncluded with BG and SI. It's also hard to read at high resolutions.

What color are you making yours? Maybe white with a black border would look nice?

Btw, how close are you to finishing your SI-French translation?


-Karl

Re: Font question for Exult

Posted: Wed Mar 26, 2003 6:19 am
by artaxerxes
3 books file (2 in progress)
2 conversations (also in progress)

Artaxerxes

Re: Font question for Exult

Posted: Wed Mar 26, 2003 4:35 pm
by artaxerxes
Just for testing:

http://si-french.sf.net/new_font1.png

http://si-french.sf.net/new_font2.png

Obviously it is not finished. Some minor adjustements need to be done (some overlapping) and the ponctuation and the uppercase letters need to be done. It provides an idea of what you can get though.

Artaxerxes

Re: Font question for Exult

Posted: Thu Mar 27, 2003 1:05 am
by SB-X
And the background highlight box is way too big.

That is easy to read.

Re: Font question for Exult

Posted: Thu Mar 27, 2003 3:29 am
by Karlos
Looks great! Did you use the Gimp or something else to edit the letters?


-Karl

Re: Font question for Exult

Posted: Thu Mar 27, 2003 4:22 am
by artaxerxes
Went on the net for free fonts, previewed them and copied them in frames using the gimp/exult-studio.

I think today I am going to invert the colours, so that the outline is black and the inside is some colour (white for now I guess).

Any opinion?

As for the box, it is not something I can control.

Artaxerxes

Re: Font question for Exult

Posted: Thu Mar 27, 2003 6:41 am
by gruck
I'm actually not that big of a fan... Maybe it would look better without the coloured background box, (I really can't stand that thing in Exult)

Re: Font question for Exult

Posted: Thu Mar 27, 2003 6:42 am
by artaxerxes
Ok, here are the new fonts du jour.

It's basically the same as last time's, with those differences:
* almost no more adjustments to do
* white colour with black outline
* no need of background color anymore

I think they are pretty readable and they are a tad bit bigger than the original fonts (but not too much) so that it's still ok at 320x240 and perfectly acceptable at 400x300

Tell me what you think:

http://si-french.sf.net/font_white1.png
http://si-french.sf.net/font_white2.png

Artaxerxes

Re: Font question for Exult

Posted: Thu Mar 27, 2003 8:10 am
by drcode
Verrry nice.

Re: Font question for Exult

Posted: Thu Mar 27, 2003 11:18 am
by Karlos
I can't wait to try this out for myself ... it looks much better to me than the originals. I assume you just haven't gotten around to redoing the capital letters yet, and weren't planning on keeping those the same, right?

Are you also redoing the other fonts in fonts.vga, or just the main one? I ask because I'm not sure how you will be able to redistribute this font legally unless you seperate it from the other shapes in fonts.vga or redo the others as well.


-Karl

Re: Font question for Exult

Posted: Thu Mar 27, 2003 12:49 pm
by artaxerxes
Hi

Actually I just finished the upper case letters. I am doing the ponctuation now.

It looks very different. I'm pretty proud. Don't expect some Gothic look at all.
I've also well advanced in the kerning. Most letters are now perfect.

As for distributing, it is a non-issue. All I have to distribute is a shape (holding the alphabetic frames) in the patch directory.

The font I used is freeware and it even says you can use it freely in commercial products. No pb on this side then.

I would like to know if the other developers could confirm the following:
if you have in your patch directory a flex holding only one shape, with a filename identical to one in the static dir, would the only one shape replace the one in static and leave the other ones alone?

Ex: patch/fonts.vga = 1 shapes (0.shp)
static/fonts.vga = 15 shapes (0.shp - 14.shp)
-> static's 0.shp is replaced by patch's 0.shp ????

Finally, when I am finished, I'll put this shape on a public server so you can d/l it and give it a try. I will possibly be the default shape for Century if the feedback is good.

thx
Artaxerxes

Re: Font question for Exult

Posted: Thu Mar 27, 2003 12:54 pm
by artaxerxes
(slightly) updated graph on:
http://si-french.sf.net/font_white3.png

Screen resolution is 400x300x2, which seems fairly popular. It is still alright at 320x200

Artaxerxes

Re: Font question for Exult

Posted: Thu Mar 27, 2003 1:41 pm
by Dominus
Artaxerxes, what you are saying is the same I tried to say on the ML in the discussion about the SF-island patch and is what I plan to do with the penguin statue shape. So, yes the /patch/fonts.vga 0.shp will only "override" the 0.shp of /static/fonts.vga.
If only Jeff could do this for single frames as well :-)
And I do like the refreshing look of this font

Re: Font question for Exult

Posted: Thu Mar 27, 2003 3:55 pm
by artaxerxes
Finished with all english characters.

The final result is found there:
http://si-french.sf.net/font_white4.png

It actually looks much nicer in 400x300.

Also, you'll find the font at:
http://si-french.sf.net/0.shp

Enjoy

Artaxerxes

Re: Font question for Exult

Posted: Fri Mar 28, 2003 4:42 am
by Karlos
Could you explain that overriding bit one more time, Dominus? :-) If I put 0.shp in my blackgate patch directory and name it fonts.vga, it uses the new font for all fonts, not just dialog. I also tried "fonts.vga 0.shp" (with the space) and fonts.vga.0.shp, but neither worked.

The font does look great, though; it just doesn't work for configuration settings and the like.


-Karl

Re: Font question for Exult

Posted: Fri Mar 28, 2003 5:05 am
by artaxerxes
it's fairly easy to do:

copy the 0.shp you want to use to a patch directory (also make sure it is set in the .exult.cfg file!).
run expack to create a flex, by the following command:
$ pwd
/path/to/patch_dir
$ /usr/local/bin/expack -c fonts.vga 0.shp

This should create a fonts.vga in the patch dir.

Your .exult.cfg should have something like that:





/path/to/patch_dir



Obviously, it also works on blackgate.

Artaxerxes

Re: Font question for Exult

Posted: Fri Mar 28, 2003 5:55 am
by Dominus
or use ipack (an example script for putting a shape into a flex file is in /content/data/shapes)
"manual" for ipack: http://exult.info/ipack.txt

ipack is the one to use if you want to replace other files than the 0 one...

Edit: ipack is for image flex' only (the ones with vga) but as it only handles shp and png files that is kind of obvious :-)

Re: Font question for Exult

Posted: Fri Mar 28, 2003 6:12 am
by artaxerxes
I never knew the power of such a tool. It is simply amazing!

congratz to Jeff for the hard work there!

Artaxerxes

Re: Font question for Exult

Posted: Fri Mar 28, 2003 6:29 am
by Dominus
he he, there you see what we already have documented but gets lost in the tons of documentation we have. Robert Bihlmeyer helped with lots of the tools docs.

As mentioned before, it would be great if ipack could replace frames as well (meaning I could do a patch shapes.vga and add just frames to an existing shape without having to distribute the whole shape.)

Re: Font question for Exult

Posted: Fri Mar 28, 2003 6:42 am
by Darke
*blink* So what you're saying is that we need documentation on our documentation? *blinkblink*

*paws away slowly*

Umm... great idea!

Darke
(Fleeing quickly!)

Re: Font question for Exult

Posted: Fri Mar 28, 2003 9:32 am
by drcode
And I believe Ryan should get credit for the ability to override parts of the .vga files.

Re: Font question for Exult

Posted: Fri Mar 28, 2003 10:24 am
by artaxerxes
This post is dedicated to give credit to Ryan for the ability to override parts of the .vga files.

Yay Ryan!

Artaxerxes

ps: Friday's burnout. Sorry! :-)

Re: Font question for Exult

Posted: Fri Mar 28, 2003 10:29 am
by Karlos
Okay, thanks for the explaination and the font. That's one less thing on my to-do list for my new game. Now, be sure to let me know when you've redone all the graphics in shapes.vga. Hehe. :-)


-Karl