Smallfont help from PNG?
Moderators: GZDoom Developers, Raze Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
-
- Posts: 38
- Joined: Tue Jan 02, 2018 9:04 pm
Smallfont help from PNG?
Hi, been planning a mod that uses the in-game font style from the Sega CD version of The Terminator that I've extracted,but the only thing is which program should I use to turn this image into a lmp that can be use as either a BIGFONT or SMALLFONT?
Looking through the DoomCrap bundle and looked at the font generator and batch image tool but not sure of these are the right programs to do so. If anyone would like to help me out, it would be a pleasure.
Looking through the DoomCrap bundle and looked at the font generator and batch image tool but not sure of these are the right programs to do so. If anyone would like to help me out, it would be a pleasure.
Last edited by SuperAble on Mon Mar 02, 2020 11:47 pm, edited 1 time in total.
-
- Lead GZDoom+Raze Developer
- Posts: 48870
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Smallfont help from PNG?
With the new font setup you do not really need to convert it to a binary font file. Just create a directory fonts/SmallFont inside the PK3 and put each character in there with a 4 digit name matching each character's ASCII value in Hex.
If you only need to use it with a fixed pitch like in your image it will become even easier because you can use that image as-is with a little added setup.
If you only need to use it with a fixed pitch like in your image it will become even easier because you can use that image as-is with a little added setup.
-
- Posts: 38
- Joined: Tue Jan 02, 2018 9:04 pm
Re: Smallfont help from PNG?
So, make a folder named Fonts, then make a subfolder named SMALLFONT, then import each character with the file names corresponding to a letter/number/symbol i.e. a png of "A" should be A.png, etc...?Graf Zahl wrote:With the new font setup you do not really need to convert it to a binary font file. Just create a directory fonts/SmallFont inside the PK3 and put each character in there with a 4 digit name matching each character's ASCII value in Hex.
If you only need to use it with a fixed pitch like in your image it will become even easier because you can use that image as-is with a little added setup.
-
- Lead GZDoom+Raze Developer
- Posts: 48870
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Smallfont help from PNG?
No. You need the numeric code for each character in hexadecimal. A is 0041.png, for example, Z is 005A.png. You'll find the numbers when googling for "ASCII".
-
- Posts: 38
- Joined: Tue Jan 02, 2018 9:04 pm
Re: Smallfont help from PNG?
Now what about spacing?Graf Zahl wrote:No. You need the numeric code for each character in hexadecimal. A is 0041.png, for example, Z is 005A.png. You'll find the numbers when googling for "ASCII".
-
-
- Posts: 369
- Joined: Mon Jun 27, 2016 7:26 pm
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia with Vulkan support
Re: Smallfont help from PNG?
If you make a file named "font.inf" in the same folder where your font character PNGs are, you can specify spacing, kerning, etc in that file.
To make spaces 4 pixels wide, put this in your font.inf:
Other directives you can add to this file include:
To make spaces 4 pixels wide, put this in your font.inf:
Code: Select all
SpaceWidth 4
Code: Select all
Kerning <int> // Space between each character
Scale <decimal>[, <decimal>] // Scale (size factor) for each font character
FontHeight <int> // How tall should lines be
CellSize <int>, <int> // Width and Height for each character. MONOSPACE FONTS ONLY!
TranslationType console // I have no idea what exactly this directive does
OR
TranslationType standard // default
-
- Posts: 38
- Joined: Tue Jan 02, 2018 9:04 pm
Re: Smallfont help from PNG?
I'm more into wanting to know on how to make a font lmp similar to ones seen in the PSXDoom TC where it's like a row of letter/character graphics:
You do not have the required permissions to view the files attached to this post.
-
-
- Posts: 26476
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: Smallfont help from PNG?
Originally they were done with imagetool.
-
- Posts: 38
- Joined: Tue Jan 02, 2018 9:04 pm
Re: Smallfont help from PNG?
Is there a certain character layout I have to use?Enjay wrote:Originally they were done with imagetool.
-
-
- Posts: 26476
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: Smallfont help from PNG?
The text file inside the zip explains the layout. The only thing that (from memory) that it is silent about is the fact that a double-width line between characters means "the glyph is blank" and a blank character is inserted at that point. So watch for double width frames around some of the characters.
I think, for example, there is a double line after the ? in bigfont.pcx meaning that the space for the next character (I think it's @) is accounted for even though there is no graphic for it.
[edit] There's another one between % and ' and the missing character in this case is &. [/edit]
I think, for example, there is a double line after the ? in bigfont.pcx meaning that the space for the next character (I think it's @) is accounted for even though there is no graphic for it.
[edit] There's another one between % and ' and the missing character in this case is &. [/edit]
-
- Posts: 38
- Joined: Tue Jan 02, 2018 9:04 pm
Re: Smallfont help from PNG?
problem solved.
Last edited by SuperAble on Mon Mar 02, 2020 11:48 pm, edited 1 time in total.
-
-
- Posts: 4101
- Joined: Thu Jul 17, 2003 12:19 am
- Location: British Columbia, Canada
Re: Smallfont help from PNG?
If you want to use BHS's font generator, then maybe this tutorial will help. 

-
- Posts: 38
- Joined: Tue Jan 02, 2018 9:04 pm
Re: Smallfont help from PNG?
Followed their steps, yet I'm not getting the .lmp file. Just only a brief second of the cmd prompt popping up and closes twice with no finalized product whatsoever.Kappes Buur wrote:If you want to use BHS's font generator, then maybe this tutorial will help.
-
-
- Posts: 4101
- Joined: Thu Jul 17, 2003 12:19 am
- Location: British Columbia, Canada
Re: Smallfont help from PNG?
I couldn't make the font work from your image file either, so I downloaded a font, Gamer.ttf, which is pretty close, and ran it through BHS's FG, following the above tutorial,
Spoiler: