Something a little easier to both understand and do...
You can use
surface.CreateFont to create two fonts. One normal one and one with some blur. Draw the text with the blur underneath and the one without the blur on top.
(UNTESTED, but it should work)
surface.CreateFont("MyFont", {size=24, blursize=0})
surface.CreateFont("MyFont_Blurred", {size=24, blursize=0.3})
function SomeDrawFunction()
surface.SetFontColor(0, 0, 255, 255)
surface.SetFont("MyFont_Blurred")
local w, h = surface.GetTextSize("THIS IS AN EXAMPLE")
surface.SetPos(ScrW()/2-w/2, ScrH()/2-h/2)
surface.DrawText("THIS IS AN EXAMPLE")
surface.SetFont("MyFont")
local w, h = surface.GetTextSize("THIS IS AN EXAMPLE")
surface.SetPos(ScrW()/2-w/2, ScrH()/2-h/2)
surface.DrawText("THIS IS AN EXAMPLE")
end
hook.Add("HUDPaint", "DrawGlowExample", SomeDrawFunction)
EDIT: Sorry, I had my code wrong, fixed it for you.
EDIT2: Some other functions you'll need...
player.GetAll()Entity:GetPos()Vector:ToScreen()Player:Nick()Player:GetUserGroup