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.
[09:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[07:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[06:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[03:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
Please log in to shout.


Members Online: Roy