Page 1 of 3

Any way to change the font?

Posted: Wed Aug 01, 2018 12:27 am
by eternalsage
I know its old school, and that's fine, but is it possible to change out that horrid font for something else? Like is there a place to load one, etc? My biggest complaint right now is that pixelated font. I'm sure that classic could only use that type of font, use of a modern ttf would be fantastic. Thanks!

Re: Any way to change the font?

Posted: Wed Aug 01, 2018 7:44 am
by Al-Khwarizmi
I don't know the answer to your question, but apparently it was possible in the defunct DaggerXL:

https://www.moddb.com/mods/daggerxl/add ... eplacement

Re: Any way to change the font?

Posted: Wed Aug 01, 2018 9:23 am
by Interkarma
There is a tight relationship between Daggerfall's pixel-font dimensions and formatting layout encoded into books, quests, and popup text. Unfortunately, it's not a simple matter of just swapping out the font, as this would have the follow-on effect of breaking formatting across several text containers. There are also many places where text is baked into UI images, so a full replacement would also require graphical mods of most user interfaces. And there are multiple fonts to manage as well...

To get appreciation of how important all of this is, consider that I had to build a fully custom UI system (including custom font rendering) into Daggerfall Unity to reproduce Daggerfall's text and UIs in a pixel-perfect way. It's not using Unity's GUI system or anything else off the shelf.

With all that said, it's definitely possible to mod fonts to a higher resolution. But I would have to first build support into the game and anyone creating replacement font atlases would need to follow a few specific rules. If anyone is willing to take this on, let me know and I'll work with you to outline what's required. Just keep in mind that modding fonts is not a priority right now and your work might not make into the game until after core gameplay is completed.

Re: Any way to change the font?

Posted: Wed Aug 01, 2018 4:16 pm
by eternalsage
Holy crap. Very well then. Ignore my complaints and you keep on with the important stuff. This sounds like a horrible mess that ultimately needs a complete reimplementation which is well beyond the scope of your work. Thanks for the information though!

Re: Any way to change the font?

Posted: Wed Aug 01, 2018 10:04 pm
by Interkarma
Yeah, it's all bit of a mess. :) I would like to add support for a higher quality fonts one day, and just need to navigate around a few constraints so it can work in a drop-in kind of way. It's definitely something I want to look at later, and offer remains open if someone is willing to help with this by creating pixel font atlases to my spec.

Re: Any way to change the font?

Posted: Fri Aug 03, 2018 11:40 am
by King of Worms
Hi Interkarma, and what about the cursor? Im quite sure Ive not seen it anywhere in a game files...

Re: Any way to change the font?

Posted: Sat Aug 04, 2018 8:15 am
by Interkarma
The mouse cursor is found in Arena2/ARROW.RAW. It's just a 10x10 raw image file with no header or anything.

I'm using a hardware cursor in Daggerfall Unity, as I prefer the mouse sampling to be decoupled from screen resolution and refresh. The cursor image I'm using is in Resources/Cursor2.png (a 32x32 upscaled version so it looks nicely point filtered at most resolutions). I'm sure we can make this modable someday. :)

Re: Any way to change the font?

Posted: Thu Aug 23, 2018 8:33 am
by Interkarma
I've been somewhat obsessed by fonts after this thread. In one of my creative moments, I hit upon the idea of adding a custom signed distance field font renderer to DagUI and simply rendering custom glyphs directly inside the screen space of the classic glyph. Provided there is enough pixel density (1080p and up look best), the characters will occupy the exact same physical area in the game but have more pixels and look much smoother.

Here are some examples:

sdf1.png
sdf1.png (346.01 KiB) Viewed 5649 times
sdf2.png
sdf2.png (911.25 KiB) Viewed 5649 times
sdf3.png
sdf3.png (1.51 MiB) Viewed 5649 times

The downside is that characters appear a little stretched or squished as the replacement glyphs can never have consistently the same aspect ratio as the source glyphs.

But it still looks good, fits within the UI constraints, and it's fast too! I'm going to add this as an option in a future build of Daggerfall Unity and keep refining it over time.

Please just keep in mind its not done yet, and far from being ready for general play. Right now it's just some interesting tech I'm building into the game.

Re: Any way to change the font?

Posted: Thu Aug 23, 2018 9:44 am
by eternalsage
Holey rusted metal, Batman! That's beautiful! It's amazing! I love it. So what, its not perfect. You just spent your precious time on a silly request by me (and I'm sure 1000s of others, but it's my thread, so :p). Thank you. In case you don't get told enough, you rock!

Re: Any way to change the font?

Posted: Thu Aug 23, 2018 11:04 am
by Interkarma
Thank you for the encouragement eternalsage. :)