News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

Stunts font editor

Started by Cas, March 27, 2021, 10:06:13 PM

Previous topic - Next topic

Daniel3D

O, off course... Stressed uses different mapping.
As I said before.
CAS is working on a tool to directly edit the Res files.
So all characters can be used.
(Maybe it can be included in stressed at one point)
So the U, u, O and o with double acute accents have to be added later.

Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Cas

GTAMan, the way you replaced it works well. The thing is Stunts only supports 256 character code points, so we can't use Unicode. The original character table coming with DOS systems was CP437, which does not include many of the characters we need for multi-language support. Most languages used by the Stunts community are supported by Latin-1, a 256 character set that's part of the Unicode standard, but Hungarian uses Latin-2, which is different. The characters O and U with double acute accent are in Latin-2 at locations that collide with Latin-1 characters used in Portuguese, so I decided we could use Latin-1 for most characters and for those four (O and U with double-acute in upper and lower case) use a non-standard position. It's the only way. Any other thing would require more characters to be moved. Daniel noted that the positions starting at 144 (originally an É in CP437) were available in Latin-1, so these characters have been placed there. If you are able to do the switch, it's going to work well. Later on, I can make a translator for easily adapting these characters.
Earth is my country. Science is my religion.

GTAManRCR

#17
ALT codes work actually, with Latin-1 characters.  This means, I have to replace ô with the o double acute accented variant, and so on, or else every questionmark will show up as this letter, even the u with the variant above
Hejj bicska, bicska, bicska csantavéri kisbicska!

Daniel3D

Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

GTAManRCR

#19
ALT+147 (ô) triggers the 244th character actually, so if I write ô in stressed without modifying the question mark, it's fine, so question marks can be separated. For this reason, I replaced the 244th (ô) character with o double acute accent Latin-2 character. I think this is the right order. Tomorrow I'll upload the FONTDEF.FNT which is just edited
Hejj bicska, bicska, bicska csantavéri kisbicska!

Cas

Quote from: GTAMan18ALT codes work actually, with Latin-1 characters.
If I remember well, Alt + Keypad in Windows works in two different ways: if the code starts with a zero, it gives you the Unicode/Latin-1 character of that number. But, if the first key is not a zero, it emulates old DOS behaviour by following CP437 codes. Therefore, if you do ALT+144, the system will send Stressed one character and if it is ALT+0144, another entirely. How Stressed translates this into an 8-bit font depends on the libraries it was compiled with. The thing is: not necessarily the number you're entering represents the actual position in the font!!  I'd recommend you to test first :)
Earth is my country. Science is my religion.

GTAManRCR

#21
Edited ô and û in FONTDEF.FNT and FONTN.FNT files
Hejj bicska, bicska, bicska csantavéri kisbicska!

Daniel3D

Quote from: Cas on March 30, 2021, 05:39:47 AM
Quote from: GTAMan18ALT codes work actually, with Latin-1 characters.
If I remember well, Alt + Keypad in Windows works in two different ways: if the code starts with a zero, it gives you the Unicode/Latin-1 character of that number. But, if the first key is not a zero, it emulates old DOS behavior by following CP437 codes. Therefore, if you do ALT+144, the system will send Stressed one character and if it is ALT+0144, another entirely. How Stressed translates this into an 8-bit font depends on the libraries it was compiled with. The thing is: not necessarily the number you're entering represents the actual position in the font!!  I'd recommend you to test first :)
I'll try this tonight. Maybe I can figure it out.

It would be nice if we can access the extra characters and wouldn't need to alter the standard latin-1 layout.
That way we could make support for languages based on the Latin alphabet.
QuoteSince the font now contains the whole latin-1 set plus missing or duplicated characters I dubbed the new font for Stunts "Latin-1+"
This for clarity, for conversation in relation to the alternate properties of the new Stunts font.

A translation tool that translates text made in latin-2 to latin-1+ text is something to consider.
But if the codes work then it may not be necessary.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

GTAManRCR

Not a necessary thing, because just replacing circumflex letters with the desired ones it works. But because the letters which the circumflex trigger are now acute accented, the game will show it as described, not circumflexed
Hejj bicska, bicska, bicska csantavéri kisbicska!

Daniel3D

Quote from: GTAMan18 on March 30, 2021, 02:41:19 PM
Not a necessary thing, because just replacing circumflex letters with the desired ones it works. But because the letters which the circumflex trigger are now acute accented, the game will show it as described, not circumflexed
true,
but there is no longer support for the letters you have replaced. Not a big problem, but also not the goal of this project.
So I would like to look at a solution that has both,

But it works, and that is most important.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

GTAManRCR

Amazing work! Special thanks to Cas for creating this piece of software. Duplode has to upload this on SCR Stunts
Hejj bicska, bicska, bicska csantavéri kisbicska!

Daniel3D

It really is. I tried many bitmap font editors to see if we could make them compatible with the Stunts font. But this one is a lot more powerful than any of those.

When we were doing size testing it seemed to work at first so I started to add the extra characters.
Then CAS discovered that the track selection is limited to 8 high.
I could change, reposition and alter the hight of about 80 characters in 10 minutes.

That is not possible with any font editor..
;D
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

GTAManRCR

#27
And you can edit letters freely, so can make symbols with these limits show up in game
Here is an example of Bluetooth symbol
Hejj bicska, bicska, bicska csantavéri kisbicska!

Daniel3D

Quote from: GTAMan18 on March 30, 2021, 08:47:43 PM
And you can edit letters freely,
I know, all characters not based on a existing one I had to draw pixel by pixel..
Of course there are a maximum of 72 pixels in the current configuration. Most are 20 to 30 pixels I guess.

But still,  8)
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Cas

My idea, when I proposed hybridising the character table, which Daniël has appropriately dubbed Latin-1+, was that the new font would be both compatible with the original text in Stunts and with translations into any language used in the community. This way, we wouldn't need to ship a separate set of FNT files with the translated RES files. If you modify the characters at the Latin-2 positions for the Hungarian double-acute, you won't need to convert those characters, but you're going to need a separate set of fonts for Hungarian that will not work with other languages (Portuguese and French).

This is not optimal, but isn't a serious problem either, because it seems to me that most people will at the very most want to switch between English and their own language and not between two non-English languages, so mostly everybody will be OK with just one FNT file set anyway.

Maybe other DSI games use this FNT file format as well. In that case, we might be able to import and export fronts between games. And in general, I figure I could build a library to display these fonts, as it's a nice format for variable width fonts to use.
Earth is my country. Science is my religion.