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.
[12:30 am]
ClansAreForGays -- When you join a pub lobby because you see 7/8 players, but then realize host is bating you with computers. :flamer: :flamer:
[11:48 pm]
O)FaRTy1billion[MM] -- :wob:
[2024-10-30. : 6:24 pm]
Ultraviolet -- :wob:
[2024-10-29. : 4:33 pm]
Vrael -- :wob:
[2024-10-29. : 1:32 pm]
Zoan -- :wob:
[2024-10-28. : 5:21 pm]
Ultraviolet -- :wob:
[2024-10-27. : 4:34 pm]
jjf28 -- :wob:
[2024-10-27. : 9:01 am]
Zycorax -- :wob:
[2024-10-27. : 3:31 am]
RIVE -- :wob:
[2024-10-26. : 7:12 pm]
Ultraviolet -- :wob:
Please log in to shout.


Members Online: Andrea Rosa, Roy