Staredit Network > Forums > Modding Assistance > Topic: PyFNT won't open SC1 fonts (Error Message)
PyFNT won't open SC1 fonts (Error Message)
Oct 10 2023, 10:25 am
By: Netbek  

Oct 10 2023, 10:25 am Netbek Post #1



I wanted to edit the menu fonts.
So I extracted the .fnt files from StarDat.mpq, using PyMPQ.
I then tried opening the .fnt files in PyFNT.
But it gives me an error message saying "Load Error: Invalid FNT file [...] (invalid header)"

These images show everything I did in great detail, step by step. For the exact error message, see 'STEP 3'.
STEP 1
STEP 2
STEP 3

Alternatively, you can help me by uploading one of the .fnt files (e.g. 'font16x.fnt') extracted into BMP format.
I need the .fnt files extracted as BMP as a basis to work on. I tried creating my own font 'blindly', but it resulted in palette weirdness.

Post has been edited 2 time(s), last time on Oct 10 2023, 11:54 am by Netbek.




Oct 10 2023, 4:05 pm DarkenedFantasies Post #2

Roy's Secret Service

You want the .fnt files from StarCraft.mpq\files\font\. Those in StarDat.mpq are a different file format and I don't know what their use is.




Oct 10 2023, 7:53 pm Corbo Post #3

ALL PRAISE YOUR SUPREME LORD CORBO

Just adding to that Starcraft.mpq is a MPQ found inside the Starcraft.exe, just open the sc exe with any MPQ editing tool you want and it will be there.



fuck you all

Oct 17 2023, 6:19 pm Netbek Post #4



You want the .fnt files from StarCraft.mpq\files\font\.
Thanks it worked. One thing to note is that when adding my own custom font into my mod, I actually had to give it the path of the faulty font files. (e.g. font\font16x.fnt, instead of files\font\font16x.fnt)

For future searchers: This is what I did step-by-step:
1) extract SC1 fonts from "Starcraft.mpq", using PyMPQ (not from "StarDat.mpq")
  • The paths go like this:
  • files\font\font8.fnt
  • files\font\font16x.fnt
  • etc.

2) open the extracted .fnt in PyFNT, use extract button to extract as .BMP
3) look at the .BMP and create own font with same logic:
  • letters etc. centered left
  • letters light blue, background a certain green tone
  • it is only one long row of signs, there is no "line breaks"

4) save the palette of one of the .BMPs from step 2, using whatever image editing program you use (I used PSP9)
5) load this palette on your newly created .BMP from step 3
6) use PyFNT, open one of the SC .fnt files from step 1, click button to load a BMP and select your newly created BMP --> letters and signs should properly display now and be aligned left if all went well --> use PyFNT to save as .fnt
7) using PyMPQ, I then opened my mod's firegraft-based .exe and imported the new .fnt. ATTENTION: I had to give it a path like this:
  • font\font8.fnt
  • font\font16x.fnt
Note how the "files\" from step 1 is missing!





Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:19 pm]
Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
[2024-5-02. : 1:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[2024-5-01. : 1:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
[2024-4-30. : 7:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[2024-4-29. : 11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
Please log in to shout.


Members Online: Roy