Jump to content

An Option for Mods to Add Custom Fonts


Recommended Posts

I've been doing kind of reverse engineering for modding. There I wanted to add some custom Korean fonts for Wormwood, then I found the method defined as AddFontAssets. I really wanted to use this method for custom font, but Lua didn't allow me, it just give global - nil value error. Is there any way to apply any custom fonts for DST? If not, I want such feature for modders.

Link to comment
Share on other sites

  • Developer
3 hours ago, AFS Co. said:

I've been doing kind of reverse engineering for modding. There I wanted to add some custom Korean fonts for Wormwood, then I found the method defined as AddFontAssets. I really wanted to use this method for custom font, but Lua didn't allow me, it just give global - nil value error. Is there any way to apply any custom fonts for DST? If not, I want such feature for modders.

taking a look, fonthelper.lua isn't even loaded... however all you should need to do is add

Asset( "FONT", fontpath)

to your mods asset table.

Link to comment
Share on other sites

16 hours ago, zarklord_klei said:

taking a look, fonthelper.lua isn't even loaded... however all you should need to do is add


Asset( "FONT", fontpath)

to your mods asset table.

I did it, and it seems working. But I have another question. Is there some method to set a fallback for those font?

 

Addition: I just tried to table.insert method into FONTS table, and it seems work very well. Now I just need a way to set the fallback font for it.

20201224191224_1.jpg

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...