Any way to change the font?

Talk about the mods you'd like to see in Daggerfall Unity. Give mod creators some ideas!
User avatar
eternalsage
Posts: 7
Joined: Thu Jul 19, 2018 4:42 am

Any way to change the font?

Post 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!
"Dagoth Ur is dead. I hope we will no longer be troubled by his dreams. But I wonder, too, what the ghost of a god would be. And can a dead god dream?"

- Hassour Zainsubani

Al-Khwarizmi
Posts: 177
Joined: Sun Mar 22, 2015 9:52 am

Re: Any way to change the font?

Post 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

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Any way to change the font?

Post 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.

User avatar
eternalsage
Posts: 7
Joined: Thu Jul 19, 2018 4:42 am

Re: Any way to change the font?

Post 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!
"Dagoth Ur is dead. I hope we will no longer be troubled by his dreams. But I wonder, too, what the ghost of a god would be. And can a dead god dream?"

- Hassour Zainsubani

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Any way to change the font?

Post 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.

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Any way to change the font?

Post by King of Worms »

Hi Interkarma, and what about the cursor? Im quite sure Ive not seen it anywhere in a game files...

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Any way to change the font?

Post 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. :)

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Any way to change the font?

Post 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 5639 times
sdf2.png
sdf2.png (911.25 KiB) Viewed 5639 times
sdf3.png
sdf3.png (1.51 MiB) Viewed 5639 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.

User avatar
eternalsage
Posts: 7
Joined: Thu Jul 19, 2018 4:42 am

Re: Any way to change the font?

Post 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!
"Dagoth Ur is dead. I hope we will no longer be troubled by his dreams. But I wonder, too, what the ghost of a god would be. And can a dead god dream?"

- Hassour Zainsubani

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Any way to change the font?

Post by Interkarma »

Thank you for the encouragement eternalsage. :)

Post Reply