-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathfont.lua
More file actions
21 lines (16 loc) · 724 Bytes
/
font.lua
File metadata and controls
21 lines (16 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--[[ Font Module ]]--
local _, BCM = ...
BCM.modules[#BCM.modules+1] = function()
if bcmDB.BCM_Font then bcmDB.fontname, bcmDB.fontsize, bcmDB.fontflag = nil, nil, nil return end
BCM.chatFuncsPerFrame[#BCM.chatFuncsPerFrame+1] = function(cF, n)
local cFE = _G[n.."EditBox"]
local name, size = cF:GetFont()
if n == "ChatFrame1" then
--remove defaults
if name == bcmDB.fontname then bcmDB.fontname = nil end
if bcmDB.fontsize and (tostring(size)):find(bcmDB.fontsize..".", nil, true) then bcmDB.fontsize = nil end
end
cF:SetFont(bcmDB.fontname or name, bcmDB.fontsize or size, bcmDB.fontflag or "")
cFE:SetFont(bcmDB.fontname or name, bcmDB.fontsize or size, bcmDB.fontflag or "")
end
end