Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert GZDoom BIGFONT to the new system #552

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Convert GZDoom BIGFONT to the new system #552

wants to merge 1 commit into from

Conversation

K0stov
Copy link

@K0stov K0stov commented Feb 24, 2019

With this pull request, I want to raise awareness about a new BIGFONT system that’s set to appear in GZDoom (it already has appeared, but so far only in devbuilds). To make this a bit clearer: BIGFONT is the text format used by header texts in GZDoom’s various menus, as shown in the screenshot below. Until now, it was primarily based on the FON2 format (there’s a lump named DBIGFONT in the Freedoom IWADs that is based on this format).

BIGFONT

Graf Zahl, the author of the source port, has overhauled the BIGFONT system; while it used to rely on the old FON2 binary format, it now depends on individual lumps that are based on Unicode. What I’ve done here is extracted the BIGFONT from freedoom2.wad and turned all characters into individual sprites that are named after their code points in Unicode.

I’m not entirely familiar with the folder structure of this repository and how the scripts in the text folder work (which is where I’ve put these sprites), but for future builds, it should at least provide a base of some sort.

I’ve marked this PR as [Do not merge]. First, we should discuss whether there’s a better way to do this, considering the current GZDoom BIGFONT files included in the Freedoom wads are limited compared to what’s in the repository: I’ve noticed that these characters are already cut up into separate lumps, complete with uppercase and lowercase variants, as well as various other characters that could be useful, since GZDoom is undergoing major advancements in localization and translation. Maybe it’s better to use those characters instead, and rename them based on Unicode.

Then, of course, we wait until the new BIGFONT system makes it into an official GZDoom version.

@NickZ
Copy link

NickZ commented Jul 23, 2019

@Nemrtvi what's the status on this? I think GZDoom introduced this in 4.0?

@K0stov
Copy link
Author

K0stov commented Jul 23, 2019

@Nemrtvi what's the status on this? I think GZDoom introduced this in 4.0?

Yes, it did.

@axredneck
Copy link

Is it a fix for issue #553 ?

@mc776
Copy link
Contributor

mc776 commented Sep 17, 2019

Has anyone posted about this on the ZDoom forums? Might be good to get the GZDoom devs to take a look. (I'd post but I'm pretty clueless as to how all this stuff works so I wouldn't even know how to describe it except link and "any thoughts?")

@K0stov
Copy link
Author

K0stov commented Sep 17, 2019

Has anyone posted about this on the ZDoom forums? Might be good to get the GZDoom devs to take a look. (I'd post but I'm pretty clueless as to how all this stuff works so I wouldn't even know how to describe it except link and "any thoughts?")

I did, when I first made this PR:
https://forum.zdoom.org/viewtopic.php?p=1092851#p1092851

Graf says it's preferable for Freedoom itself to include these fonts. I've provided the means for it with the PR, but someone else might want to expand it to a complete font set that I've seen somewhere among Freedoom's files.

@chungy
Copy link
Member

chungy commented Sep 17, 2019

It would make most sense to generate any necessary lumps directly from the PNG files (we should do it for DBIGFONT too, or can this sort of system be a replacement?).

I'm not seeing any kind of documentation on the ZDoom Wiki nor in GZDoom itself about the formats or expectations. Is there a place I should look?

@K0stov
Copy link
Author

K0stov commented Sep 17, 2019

It would make most sense to generate any necessary lumps directly from the PNG files (we should do it for DBIGFONT too, or can this sort of system be a replacement?).

I'm not seeing any kind of documentation on the ZDoom Wiki nor in GZDoom itself about the formats or expectations. Is there a place I should look?

Don't know about any documentation, so it's high time we start writing something. In the meantime, if you have any questions, I recommend leaving a post in this topic:
https://forum.zdoom.org/viewtopic.php?f=4&t=63664

To add a symbol using this system, you need to name a lump after its Unicode symbol number (on the site below, it is shown by the "Unicode number" when you click any symbol - for example, the capital letter A needs to be named 0041.lmp)
https://unicode-table.com/

@Ferk
Copy link
Contributor

Ferk commented Oct 8, 2019

I was trying to find documentation on this, but my impression is that this new system is designed for the pk3 format, since it appears it depends on having a specific placement within the pk3 folder structure (ie. /fonts/bigfont/), I do not know what WAD namespace that would correspond to. If it cannot be used in wads then it won't be possible to add it to Freedoom.
But if there's a way to add it as a wad (maybe using a BIGFONT section?), it'd be great to have it.

@mc776 mc776 added the fonts label Jul 9, 2023
@mc776 mc776 linked an issue Jul 9, 2023 that may be closed by this pull request
@mc776 mc776 removed a link to an issue Jul 19, 2023
@selliott512 selliott512 marked this pull request as draft November 5, 2023 20:47
@selliott512 selliott512 changed the title [Do not merge] Convert GZDoom BIGFONT to the new system Convert GZDoom BIGFONT to the new system Nov 5, 2023
@selliott512
Copy link
Contributor

I took the liberty of converting this to a draft instead of the "[Do not merge]" prefix. It makes it easier to search for PRs by state.

@mc776
Copy link
Contributor

mc776 commented Dec 11, 2023

What exactly are these lumps? Are they just PNGs named "lmp", or Doom graphic lumps, or something else entirely? What do you even open and edit them with?

@K0stov
Copy link
Author

K0stov commented Dec 12, 2023

What exactly are these lumps?

They're Doom graphic lumps, if I remember correctly.

@mc776
Copy link
Contributor

mc776 commented Dec 12, 2023

I wonder if there's some way to have these start out and PNGs and then let Deutex convert them to graphic lumps during the build process - it would make reviewing FD's "source" a lot easier.

EDIT: I just realized these lumps are all inside the graphics folder anyway. Yes let's do PNGs, subject to my comments below.

@mc776
Copy link
Contributor

mc776 commented Dec 13, 2023

All these lumps represent characters that are already represented by graphics in FD, right? Would it make more sense, instead of having separate files this way, to add them to the buildcfg using = to point to the graphics?

Or maybe we can somehow convert everything to this system... like just reorganize the entire contents of the fontchars directory and all the text graphic creation scripts? Is there any technical reason why we can't unify everything like this? (EDIT: or practical reason why we shouldn't? Just thinking about in the future if there might be more translation work that ends up touching on level names or something... or heck, even a level name with a heavy metal umlaut...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants