Custom fonts make gmod 13 crash

So I made a custom font for a hud and whenever I take out a weapon that uses the custom font for ammo my fps goes down 50% and gmod 13 crashes after a while. Anyone know why it is crashing?



 surface.CreateFont("hudfont",
                    {
                    font = "hudfont", 
                    size = 48, 
                    weight = 500
                    })


Let me guess, you create the font every frame?

Yep probably it XD thx I did not nodice where I was making the font.

Why make the table on a different line… Just do it like this:

surface.CreateFont(“hudfont”{font = “hudfont”, size = 28, weight = 500})

much cleaner.

It’s about reading it easier, your example is not only annoying to read but also wrong :v