Jump to content
The Dark Mod Forums

Analysis of 2.12 TDM Fonts


Geep

Recommended Posts

I don't really know what this is about, but I will use the occasion to remind everybody that there is a surplus pixel at the lower left side of the capital W character. People speculated this might come from another character nearby in a font table but I don't see how V could have a pixel at that position....

Edited by wesp5
Link to comment
Share on other sites

On 4/7/2024 at 5:40 PM, wesp5 said:

I don't really know what this is about, but I will use the occasion to remind everybody that there is a surplus pixel at the lower left side of the capital W character. People speculated this might come from another character nearby in a font table but I don't see how V could have a pixel at that position....

I'm assuming we're talking about Stone 24pt font here, used in subscripts & elsewhere.

Images of letters are arranged into a bitmap by a process that doesn't have to conform to a tidy alphabetic grid. See Figure 2 of my new article https://wiki.thedarkmod.com/index.php?title=Font_Bitmaps_in_DDS_Files

In the figure, you can see there's an accented "a" to the left of the W, whose foot is presumably within W's bounding box. I think I looked at this earlier & concluded that I couldn't shrink W's bounding box enough in the DAT file. So probably the pixels of the W need to be moved to the right... I haven't tried such surgery yet.

Link to comment
Share on other sites

Because DDS is a lossy format, every direct edit of a DDS file may reduce its quality slightly. So that means either:

  • hunt down the corresponding TGA file with the same timestamp
  • otherwise, edit the DDS as few times as possible.

In the case of Stone, if the TGA can't be found and editing DDS is needed, I'd want to think about batching up all the bitmap edits needed for i18n... but that's a lot of work.

I might add, there a third possibility in the case of the readable fonts that are currently ASCII only. If they were sourced from TTF, and you find the TTF (easy in a few cases), then see if it covers Latin-1 or more. You can (with some complications RE the conversion software) regenerate an improved TDM font from that.

Link to comment
Share on other sites

I'm guessing there's a way to do that. Then back to DDS to distribute. That process would still cause an extra generation of quality loss, but at least you'd have a TGA in hand, for iterative editing without cumulative losses. But maybe first ask long-time TDMers to hunt for archived TGAs.

Link to comment
Share on other sites

9 minutes ago, Geep said:

I'm guessing there's a way to do that. Then back to DDS to distribute. That process would still cause an extra generation of quality loss, but at least you'd have a TGA in hand, for iterative editing without cumulative losses. But maybe first ask long-time TDMers to hunt for archived TGAs.

So, there is actually an SVN repo with these tga font images, they are 256x256. Is something like this what you are looking for:

 image.png.c7600041142a8807271e266eaba0aff3.png

  • Like 1
Link to comment
Share on other sites

Posted (edited)

I thought that might be the case. I don't believe I can access the SVN. Could you zip up all the font stuff you can easily find in that archive and send a link to me? TGA/DDS, even TTF for Stone, Mason, Carleton, etc., etc. No hurry. Thanks.

P.S. Try to preserve file timedates

Edited by Geep
Link to comment
Share on other sites

On 4/10/2024 at 2:25 PM, Amadeus said:

Yeah, sorry about that, that is when the archive was formed, I'm not really sure what I can do about that

That was just a "nice to have", not "must have". No worries.

On 4/11/2024 at 5:10 AM, datiswous said:

SVN is here? https://svn.thedarkmod.com/publicsvn/darkmod_src/ no idea where these files are

Nor I.

Link to comment
Share on other sites

  • 2 weeks later...

Just for the record to benefit readers here, the archived Stone .tga's turned out to be the original ASCII-only versions, not the versions that got extensive bitmap editing. Too bad.

Link to comment
Share on other sites

Also, related to font improvement, I've just released "ExportFontToDoom3All256", a reconstruction of an earlier but now lost tool variant. This is described and available in the wiki article ExportFontToDoom3

I tested that tool using one of the TDM FM fonts, Andrew Script, for which a TTF file is available. I generated a fresh set of bitmaps (newly including any available Latin-1 characters). I also mucked about with FontForge, to reconfigure that TTF to be ordered like the TDM custom codepage.

However, Andrew Script is missing a fair number of Latin-1 glyphs, so it would take some work to make it good (whether by editing in FontForge or post-export as bitmaps). I'm putting that aside for now, since the jury is out on whether Western language support in FMs and their fonts will become viable (see Western language support in 2024?).

Instead, I plan to turn my font-improvement-for-2.13 attention to Stone 24pt, which (because its used in HUD captions) is more clearly worthwhile to work on. Looks like I'll have to convert the Stone DDS to TGA as a prerequisite to bitmap editing.

Link to comment
Share on other sites

Some good news! Tels dug around further in his old computers and found some gold. Namely, a whole fonts directory that includes GIMP .xcf files. Tels says:

"The XCF files esp. are what I used to manually draw the new characters (like adding dots to an u to convert it to ü etc.) They contain many layers with different characters, that are layout exactly in the place where they need to be for the patcher script."

That is, for english stone 24 pt, one .xcf file contains two independent RGBA bitmap layers, that can be saved separately as two .dds files. A quick glance of that content appears to match the current distributed stone_0_24.dds and stone_1_24.dds. So I won't need to back-convert from DDS to TGA after all.

@Amadeus, I think a copy of this should be added to the TDM assets repository. Could you do that?
* http://bloodgate.com/mirrors/tdm/pub/scripts/tdm_font_source.7z

  • Like 4
Link to comment
Share on other sites

5 minutes ago, Geep said:

@Amadeus, I think a copy of this should be added to the TDM assets repository. Could you do that?

Yeah, I can do that. Shouldn't be a problem, unless anyone has a particular objection to it being uploaded to the repo

  • Thanks 1
Link to comment
Share on other sites

Also, I've built another console app, "datBounds", to visualize the bounding box around each bitmap character. Starting from your choice of .dat, .fnt, or .ref file, it generates a set of .tga files, e.g., stone_0_24_bounds.tga & stone_1_24_bounds.tga. You can optionally include a 2-hex-digit label on each bounding box. More about that in May.

I'm using the results of this to understand the current complex codepoint mapping of the Stone 24pt glyphs, and develop the workplan and grid layouts for upcoming work.

Link to comment
Share on other sites

Yep, moved on to greener pastures.

BTW, what I quoted above from him

Quote

[The .xcf bitmaps have layouts] exactly in the place where they need to be for the [font] patcher script.

will soon be untrue for Stone 24pt due to my upcoming bitmap surgery. Actually, the values in the current stone .dat file are already misaligned with what any archival font patcher script would produce, due to 2.12 tweaks with q3font & refont.

I'll add a note to the wiki about this (explaining it better than here).

Link to comment
Share on other sites

That may be where @Amadeus got the folder provided to me earlier.

Tels folder has -

- .xcf files, not found in earlier work

- for any given system font (stone, carleton, manon) and size(particularly 24 or 48), often more .tga/.dds files than earlier work (which originally had just ASCII characters). (You can open the files in GIMP to be even more definitive).

Link to comment
Share on other sites

 

2 minutes ago, Geep said:

That may be where @Amadeus got the folder provided to me earlier.

 

Well, I actually found that initial folder in the HiRes SVN repo. This is different from the TDM assets repo as it has a bunch of source files for textures, fonts, etc, but they aren't really game-ready assets. This is where I found the tga image files for the fonts I thought you were looking for.

I haven't uploaded Tels folder yet, but I was thinking of uploading them in the HiRes SVN repo, just for the sake of backing it up

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...