Pages: [1]
  Print  
Author Topic: [Hak] fontsize.lmp  (Read 8225 times)
fromhell
Administrator
GET A LIFE!
**********

Cakes 35
Posts: 14520



WWW
« on: October 06, 2008, 12:08:46 PM »

Can anyone analyze this specialized lump from Hexen 2?
Without it properly, I can't have the menu text aligned properly
« Last Edit: March 18, 2011, 06:07:00 AM by fromhell » Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
andrewj
Member


Cakes 24
Posts: 584



« Reply #1 on: October 06, 2008, 09:33:52 PM »

Looking at the source code, if you remove the fontsize.lmp from the PAK the engine will create one for you.

The format is 27x27 matrix of bytes.
There is one row and one column for each letter A-Z and the '/' character.
It is really a kerning table, for each pair of letters it gives the first letter's width.
Spaces are hard-coded to 32 pixels wide.
Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 35
Posts: 14520



WWW
« Reply #2 on: October 06, 2008, 10:23:31 PM »

Looking at the source code, if you remove the fontsize.lmp from the PAK the engine will create one for you.
Well of course, it's kinda hard to run the game when there is a checksum check in the engine (including Hammer of Thyrion). I am unable to compile and find out.

EDIT: 0 bytes on it recreates it


well, it looks more correct now but still odd Sad
« Last Edit: October 06, 2008, 11:28:35 PM by leilol » Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
andrewj
Member


Cakes 24
Posts: 584



« Reply #3 on: October 20, 2008, 11:04:23 PM »

Try moving all the characters left as far as possible in their 20x20 box,
i.e. their first pixel has an X coordinate which is 0,20,40,etc....

I'll add support for this to qpakman soon, it will unpack fontsize.lmp as a
text file (fontsize.txt), and reconverted when packed, so at least it can be
manually adjusted.
Logged
Pages: [1]
  Print  
 
Jump to: