Race Fonts (*.fnt files)

Race Fonts (*.fnt files); support/discussion/questions

Moderator: thunderchero

User avatar
Benman2785
Lieutenant-Commander
Lieutenant-Commander
Posts: 225
Joined: Fri Mar 20, 2009 2:00 am

Re: Race Fonts (*.fnt files)

Post by Benman2785 »

here is the correct tga with correct headers

working with UE 0.9.0dev3

EDIT: newer version available
Last edited by Benman2785 on Sun Apr 16, 2023 9:18 am, edited 2 times in total.
User avatar
Benman2785
Lieutenant-Commander
Lieutenant-Commander
Posts: 225
Joined: Fri Mar 20, 2009 2:00 am

Re: Race Fonts (*.fnt files)

Post by Benman2785 »

Feds have different ÄÖÜ - but all are working with preedited 1366x768 wdf (ship type on galaxy map)

OLD version
12px_fonts.jpg
12px_fonts.jpg (637.11 KiB) Viewed 1848 times
User avatar
Benman2785
Lieutenant-Commander
Lieutenant-Commander
Posts: 225
Joined: Fri Mar 20, 2009 2:00 am

Re: Race Fonts (*.fnt files)

Post by Benman2785 »

i fixed some issues with the 12px fonts :)

NEW VERSION - added % (for Intercept)



1. no more black bars (simply needed to edit 3px to be transparent)
this needs to be the upper right corner of tga
transparent.gif
transparent.gif (95 Bytes) Viewed 1821 times
2. added some often used chars like . , - %

3. fixed the A and ÄÖÜ (i prefer this style)

here the result:
12px_fonts_fixed.jpg
12px_fonts_fixed.jpg (699.05 KiB) Viewed 1821 times
Last edited by Benman2785 on Mon Jul 31, 2023 3:47 pm, edited 4 times in total.
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1962
Joined: Sun Apr 27, 2008 2:00 am

Re: Race Fonts (*.fnt files)

Post by Spocks-cuddly-tribble »

Looks nice and clean! :up:
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Benman2785
Lieutenant-Commander
Lieutenant-Commander
Posts: 225
Joined: Fri Mar 20, 2009 2:00 am

Re: Race Fonts (*.fnt files)

Post by Benman2785 »

here i edited the 12px and 9px fonts - now containing "ß" needed in german

**outdated**

in 9px i am not sure if "%" is placed correctly
hu9.gif
hu9.gif (1.17 KiB) Viewed 1499 times
hu12.gif
hu12.gif (909 Bytes) Viewed 1498 times
Last edited by Benman2785 on Sun Jul 30, 2023 4:16 pm, edited 1 time in total.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7967
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Race Fonts (*.fnt files)

Post by thunderchero »

Benman2785 wrote: Wed Jul 19, 2023 7:47 pm in 9px i am not sure if "%" is placed correctly
if it displays correctly it is placed correctly, the header info determines where it needs to be placed iirc.
User avatar
Benman2785
Lieutenant-Commander
Lieutenant-Commander
Posts: 225
Joined: Fri Mar 20, 2009 2:00 am

Re: Race Fonts (*.fnt files)

Post by Benman2785 »

now i finished modding 9px and 12px // *updated*
BotF_9px_12px_fonts_+_tga.zip
(23.63 KiB) Downloaded 54 times

here is the template i use for all (300% enlarged)
9px
hu9.gif
hu9.gif (5.56 KiB) Viewed 1438 times

12px
hu12.gif
hu12.gif (4.42 KiB) Viewed 1402 times
User avatar
Benman2785
Lieutenant-Commander
Lieutenant-Commander
Posts: 225
Joined: Fri Mar 20, 2009 2:00 am

Re: Race Fonts (*.fnt files)

Post by Benman2785 »

i forgot to mod generic9.fnt - now it can be used for german as it has "ß" (seen on Pakled next to Cardassian space)
generic9.fnt.zip
(2.48 KiB) Downloaded 48 times
generic9.jpg
generic9.jpg (1012.27 KiB) Viewed 1396 times
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7967
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Race Fonts (*.fnt files)

Post by thunderchero »

While testing font files I noticed;

{ (opening CURLY BRACKET) will cause CTD if in star name. other locations (lexicon, ect untested)
crash log

Code: Select all

File: textdef.c, Line: 156, ptr == NULL, this means there was no data in the embedded string
} (closing CURLY BRACKET) will not display but no CTD :???:

note; this is unrelated to Benman2785 files
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1962
Joined: Sun Apr 27, 2008 2:00 am

Re: Race Fonts (*.fnt files)

Post by Spocks-cuddly-tribble »

thunderchero wrote: Fri Aug 04, 2023 12:41 pm{ (opening CURLY BRACKET) will cause CTD
sub_51EEB0 checks hex code for { 0x7B (only, other switches use jnb), might be a bug. But do we use/need fonts for this?

Code: Select all

0051EEBF           cmp   byte ptr [eax], 7Bh  // hex code for { opening CURLY BRACKET
0051EEC2           jz    short loc_51EECE
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7967
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Race Fonts (*.fnt files)

Post by thunderchero »

Spocks-cuddly-tribble wrote: Fri Aug 04, 2023 2:23 pm
thunderchero wrote: Fri Aug 04, 2023 12:41 pm{ (opening CURLY BRACKET) will cause CTD
sub_51EEB0 checks hex code for { 0x7B (only, other switches use jnb), might be a bug. But do we use/need fonts for this?

Code: Select all

0051EEBF           cmp   byte ptr [eax], 7Bh  // hex code for { opening CURLY BRACKET
0051EEC2           jz    short loc_51EECE
UE could prevent symbol from being added and prevent CTD :wink:
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1962
Joined: Sun Apr 27, 2008 2:00 am

Re: Race Fonts (*.fnt files)

Post by Spocks-cuddly-tribble »

thunderchero wrote: Fri Aug 04, 2023 3:05 pmUE could prevent symbol from being added and prevent CTD :wink:
I'd first try (might even display CURLY BRACKETs?):

Code: Select all

0051EEB0           push  ecx   // -> retn   // disable sub_51EEB0
Or nop the jz above (no crash, but no display either?).
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7967
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Race Fonts (*.fnt files)

Post by thunderchero »

After more testing code dose not like any type of brackets, no other crashes but displayed no transparences or text stopped displaying after bracket. :shock:

repost of new header info
0x000 height of font +1
0x001 1 (all others) or 0 (9 fnt)
0x002 - 0x003 260 start of tga file
0x004 - 0x005 10 (unknow/unchanged)
0x006 - 0x007 120 total blocks
0x008 - 0x009 width of tga
0x00a - 0x00b height of tga
0x00c - 0x00F 47354 tga sile size in bytes
0x010 - 0x011 1536 (unknow/unchanged)
0x012 - 0x013 86 (unknow/unchanged)
0x014 - start of row 1 (10 entries) 1 - 0
0x028 - start of row 2 (26 entries) A - Z
0x05c - start of row 3 (26 entries) a - z
0x090 - start of row 4 (32 entries) symbols
0x0d0 - start of row 5 (26 entries) German and specials symbols

note; first entry of each row is font area width only, all others entries in that row are font area width +1
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7967
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Race Fonts (*.fnt files)

Post by thunderchero »

here is more odd info on fnt files

here is text of all numbers, letters and symbols as in fnt files

Code: Select all

1234567890
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
`-=\[];',./~!@#$%^&*()_+{}|:"<>?
äâàêèéïîöôüñÇçÄÖÜß®©™…–¿¡•
here is an example of new 12 fnt Benman2785 and I have been working on
fnt.jpg
fnt.jpg (87.4 KiB) Viewed 1321 times

% does not display/ignored anything before or after displays with no space when used in lexicon
… UE changes hex 85 -> 3F (?), if hex edit file anything before this symbol displays, anything after this symbol does not display
– UE changes hex 96 -> 3F (?), if hex edit file anything before this symbol displays, anything after this symbol does not display
• UE changes hex 95 -> 3F (?), if hex edit file anything before this symbol displays, anything after this symbol does not display
™ UE changes hex 99 -> 3F (?), if hex edit file anything before this symbol displays, anything after this symbol does not display
® symbol does not display, anything before this symbol displays, anything after this symbol does not display
© symbol does not display, anything before this symbol displays, anything after this symbol does not display

Important; when adding font to tga file the top left of tga and each font area is the transparency color.
topleft.jpg
topleft.jpg (103.42 KiB) Viewed 1314 times
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3258
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Race Fonts (*.fnt files)

Post by Flocke »

late response, but...
thunderchero wrote: Sun Aug 06, 2023 1:42 pm % does not display/ignored anything before or after displays with no space when used in lexicon
'%' is an escape character used for text placeholders like %s (string), %c (character), %d (decimal), %f (flloat). To actually print a '%' symbol, it must be doubled "%%".
thunderchero wrote: Sun Aug 06, 2023 1:42 pm … UE changes hex 85 -> 3F (?), if hex edit file anything before this symbol displays, anything after this symbol does not display
– UE changes hex 96 -> 3F (?), if hex edit file anything before this symbol displays, anything after this symbol does not display
• UE changes hex 95 -> 3F (?), if hex edit file anything before this symbol displays, anything after this symbol does not display
™ UE changes hex 99 -> 3F (?), if hex edit file anything before this symbol displays, anything after this symbol does not display
By documentation of java.nio.charset.Charset "The native character encoding of the Java programming language is UTF-16."
BOTF however does not support unicode, but uses some variant of ISO 8859-1. DCER therefore opted to apply the lava.lang.string.getByte conversion with java.nio.charset.StandardCharsets.ISO_8859_1 encoding, the only standard charsets ISO_8859_1 variant listed.

The characters above however are not covered by ISO 8859-1, which is why they are auto-replaced with 3F = "?" by lava.lang.string.getBytes.
Most likely BOTF actually uses the Windows-1252 character encoding:
https://de.wikipedia.org/wiki/Windows-1252
But maybe it is just the .fnt files using it, which would explain why BOTF fails to display these characters.

Since Windows-1252 is an extension to ISO 8859-1 and there is no use in replacing these special characters with '?', I fixed UE to now use Windows-1252 for text encoding.
thunderchero wrote: Sun Aug 06, 2023 1:42 pm ® symbol does not display, anything before this symbol displays, anything after this symbol does not display
© symbol does not display, anything before this symbol displays, anything after this symbol does not display
These are part of both ISO 8859-1 and Windows-1252. UE converts them to:
® = 0xAE
© = 0xA9
They should be working, unless BOTF uses some weird character encoding variant.
Post Reply

Return to “Race Fonts (*.fnt files)”