Font Spacing
Moderator: GZDoom 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.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
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.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
-
- Posts: 1783
- Joined: Wed Jul 23, 2003 9:22 pm
Font Spacing
Is there a way to change how far apart each character is from each other? I don't mean SPACEWIDTH. I mean the spacing between normal letters and numbers.
-
- Posts: 6634
- Joined: Mon Jul 26, 2004 12:59 pm
- Location: Growing from mycelium near you.
Re: Font Spacing
Add some blank space on the font sprites themselves? Not sure if that works.
-
- Posts: 1783
- Joined: Wed Jul 23, 2003 9:22 pm
Re: Font Spacing
That would work, but I actually want to decrease the spacing. For instance, here is a screenshot from Chocolate Hexen:
and here is a screenshot from GZDoom:
I was hoping to get the font shown in the second picture to be like it's shown in the first one.
and here is a screenshot from GZDoom:
I was hoping to get the font shown in the second picture to be like it's shown in the first one.
-
-
- Posts: 667
- Joined: Wed Aug 02, 2017 12:31 am
- Location: In between the Moon and you, between the buried and me.
Re: Font Spacing
It looks like GZDoom is in a wider aspect ratio to me?
-
- Posts: 21706
- Joined: Tue Jul 15, 2003 7:33 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): A lot of them
- Graphics Processor: Not Listed
Re: Font Spacing
As possible as that is, I've noticed it as well; Raven handles its font with a -1 spacing so that the fonts' borders overlap. When they're merely positioned right next to each other, you get 2 pixels of border right next to each other, making text thicker than it should be. I think vanilla Doom does that too but I haven't checked in a while.
-
-
- Posts: 4724
- Joined: Mon Apr 10, 2006 1:49 pm
- Preferred Pronouns: He/Him
Re: Font Spacing
The only way I've found you can do this is by making the font into a FON2 lump with ImageTool and hex-editing three of its bytes.
Xaser explained to me some time ago:
Xaser explained to me some time ago:
Code: Select all
(3:01:13)PM <Jimmy_> (Hey this is a bit off-topic, but can you talk me through hex-editing kerning into a FON2?)
(3:04:12)PM <Jimmy_> I have xvi32, and I'm looking at the hex grid of the lump, but don't know what to edit where >_<
(3:06:45)PM <Xaser> oh! yes
(3:07:12)PM <Xaser> okay, so... 0x000B is the "flags" field, and currently the only "flag" is "use kerning"
(3:07:40)PM <Xaser> set it to 01 first, then insert two (totally new!) bytes immediately after it.
(3:08:20)PM <Xaser> now a funny hex editing / computery thing: negative numbers in the computing world are usually stored as really large values, counting backwards. (Apologies if you know this)
(3:08:37)PM <Xaser> generally, for Doom fonts, you want to make the kerning -1
(3:08:45)PM <Xaser> this translates, in two bytes, to "FF FF"
(3:08:57)PM <Xaser> hex editing is weird ;P
(3:12:01)PM <Jimmy_> oshit it works :OOOO
(3:12:16)PM <Jimmy_> thanks a ton, you're a lifesaver, dude :D
(3:13:18)PM <Jimmy_> and for the record, I am a complete noob at this sort of thing, so... :P
(3:13:35)PM <Xaser> any time sir :P
(3:13:40)PM <Xaser> glad that actually made sense O: