Duke4.net Forums: Dimensions of highres fonts - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Dimensions of highres fonts

User is offline   NightFright 

  • The Truth is in here

#1

When replacing one of the 8-bit fonts from Duke3D with a highres replacement, do the highres chars need to have the exact same dimensions as the original art or is there a way to override it?

Asking because I am trying to use a font with different kerning than in the .art files, e.g. the "A" is wider, the lower part of "Q" sticks out at the bottom etc.
0

User is offline   NightFright 

  • The Truth is in here

#2

To answer my own question:
It works with orig_sizex/orig_sizey. By altering the dimensions of the original tile/character, you can have graphics replacements which have different sizes than the original. For example, in order to have a widescreen replacement for the Duke3D title screen (#2493), you would use orig_sizex 428 orig_sizey 200 (instead of the default orig_sizex 320 orig_sizey 200).
0

User is offline   Phredreeke 

#3

Oh, so technically you could use widescreen hi-res tiles without defining lo-res counterparts then?
0

User is offline   Danukem 

  • Duke Plus Developer

#4

I'm confused. Are we talking about a formula for replacing the original tiles, or are we talking about an undocumented "orig_size" DEF command?
0

User is offline   NightFright 

  • The Truth is in here

#5

@Phredreeke
Yes.

@Danukem
It's about using highres font replacements via "texture" definitions. With the parameters mentioned above, you can redefine the measures of the original tiles. However, you would have to do some calculations. E.g. new font char is 28x30 pixels, but original tile is 10x15. So you would have to calculate the downsized measures of the highres replacement, which would be 14x15 in this example. Those are the values you need to put as orig_sizex and orig_sizey. This way the game knows the replacement is wider than the original. Works like that for any image. Why this isn't documented in the wiki is beyond me, but it's cool.

I found out about it since they used this in the defs for the highres assets in Megaton. And that's how we can get widescreen support into the HRP after all. This isn't anything new and it would probably also work in other ways, e.g. via xscale/yscale, but for me this was something I hadn't known until recently.

This post has been edited by NightFright: 12 May 2021 - 02:50 PM

0

User is offline   NightFright 

  • The Truth is in here

#6

While we are talking about fonts here:
Is it possible to assign two different fonts depending on the purpose? In Megaton, the menu is using a yellow font while the usual redfont is only used in the level loading and ending screens. Normally the same font is used. I already realized they remapped the redfont to a higher tilerange (5xxx) for this, but can this be done via script or is it hardcoded?
0

User is offline   NightFright 

  • The Truth is in here

#7

Doublepost, ignore.

This post has been edited by NightFright: 16 May 2021 - 05:34 AM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options