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.
[03:20 am]
Symmetry -- Dang I'm up to 155 minerals gambling really pays off guys
[2026-10-11. : 6:02 am]
Donald -- Samase
[2026-10-09. : 2:53 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: I'll check it out this weekend!
Thanks
[2026-10-09. : 2:47 am]
Symmetry -- I'll check it out this weekend!
[2026-10-09. : 2:40 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: Another map maker? Damn we really ARE back
I invite you to try out the map I modified. I don't have the creativity to create maps from scratch, but I do have the know-how to modify existing ones; my project is to tweak community campaigns (specifically those with errors—to make them playable.
[2026-10-09. : 2:27 am]
Symmetry -- Another map maker? Damn we really ARE back
[2026-10-09. : 1:51 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Now that I wanted to change my avatar, the error image is showing up, haha.
[2026-10-09. : 1:34 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
I invite you to try out a mission I'm modifying from *StarCraft Reversed*; I'm trying to make it more playable and challenging.
[2026-10-09. : 1:33 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
Please log in to shout.


Members Online: Symmetry