Jump to content

Recommended Posts

Assets = {
    Asset("FONT", "fonts/talkingfont_wormwood_custom.zip")
}

TALKINGFONT_WORMWOOD_CUSTOM = "talkingfont_wormwood_custom"

AddPrefabPostInit("wormwood", function(inst)
    inst.components.talker.fontsize = 40
    inst.components.talker.font = TALKINGFONT_WORMWOOD_CUSTOM
end)

This is my code for applying new Wormwood font. It seems to have no problem to load the mod and join in server, but the game crashes as my Wormwood say anything, leaving no noticeable error traceback or something. Could anyone give me some helping hand?

Edited by AFS Co.

Status update: I just tried to insert it directly into FONTS table:

local TALKINGFONT_WORMWOOD_KR = "talkingfont_wormwood_custom"

table.insert(GLOBAL.FONTS, {filename = MODROOT.."fonts/talkingfont_wormwood_custom.zip", alias = TALKINGFONT_WORMWOOD_CUSTOM, fallback = fallback_wormwood})

--fallback_wormwood is well-defined as well

and this worked. I set the fallback for the custom font to TALKINGFONT_WORMWOOD. But some Unicode glyphs doesn't show, so I want to set secondary fallback or something. Any good method?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...