Thread Tools Display Modes
12-02-10, 07:06 PM   #1
Ulostthegame
A Theradrim Guardian
AddOn Compiler - Click to view compilations
Join Date: Jan 2010
Posts: 62
Recount causing WoW to not respond

Recount causes my World of Warcaft to stop responding if I go to change profiles.
I've isolated that this is caused by a modification I made to the Fonts.lua to add monochrome outlines to the Main Window as well as remove text shadowing, but don't know how it affects profile switching.
I'd also like someone more experienced with lua to suggest how to fix this, maybe I'm just doing it wrong.

Code:
local Recount = _G.Recount
local FontStrings={}
local FontFile
local SM = LibStub:GetLibrary("LibSharedMedia-3.0")

--First thing first need to add fonts
--SM:Register("font", "Vera",		[[Interface\AddOns\Recount\Fonts\Vera.ttf]])
-- removed ABF.ttf by request from Curse (Arrowmaster)
-- tried DejaVu, crashes client if resized too big
-- tried Bitstream Vera, crashes client if resized too big
-- Hence reverting to Arial Narrow as default font, sorry.

function Recount:AddFontString(string)
	local Font, Height, Flags

	FontStrings[#FontStrings+1]=string

	if not FontFile and Recount.db.profile.Font then
		FontFile=SM:Fetch("font",Recount.db.profile.Font)
	end

	if FontFile then
		Font, Height, Flags = string:GetFont()
		if Font~=FontFile then
			string:SetFont(FontFile, Height, Flags)
		end
	end
end

function Recount:SetFont(fontname)
	local Height, Flags

	Recount.db.profile.Font=fontname
	FontFile=SM:Fetch("font",fontname)

	for _, v in pairs(FontStrings) do
		_, Height, Flags = v:GetFont()
		v:SetFont(FontFile, Height, "OUTLINE, MONOCHROME")
		v:SetShadowColor(0, 0, 0, 0)
	end
end
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Recount causing WoW to not respond

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off