Hide fontstring shadows if fontstyle contains "OUTLINE" (pixelfonts and monochromeoutline) #315


  • New
  • Enhancment
Open
Assigned to zarnivoop
  • Forge_User_06673707 created this issue Feb 12, 2013

    What steps will reproduce the problem?

    1. Try to set a pixelfont (depending on resolution and font, either 8 or 10 will work best), for example, ElvUI has a pixel font.
    2. Set the MONOCHROMEOUTLINE property

    What is the expected output? What do you see instead?

    UGLY FAT SHADOWS :(

    As an outline already adds a black 1px border around the font (or 3px when using thickoutline), extra shadows are ugly. I would like it to automagically hide the shadow (:SetShadowOffset(0,0) and :SetShadowColor(0,0,0,0)) on the bars.

    What version of the product are you using?

    any

    Do you have an error log of what happened?

    not relevant (there are no errors)

    Please provide any additional information below.

    I made some edits to libspecialisedbars at around line 1153:

    function barPrototype:SetFont(newFont, newSize, newFlags)
    	local t, font, size, flags
    	t = self.label
    	font, size, flags = t:GetFont()
    	t:SetFont(newFont or font, newSize or size, newFlags or flags)
    	if (newFlags or flags):lower():find('outline') then
    		t:SetShadowColor(0, 0, 0, 0)
    		t:SetShadowOffset(0, 0)
    	else
    		t:SetShadowColor(0, 0, 0, 1)
    		t:SetShadowOffset(1, -1)
    	end
    
    	t = self.timerLabel
    	font, size, flags = t:GetFont()
    	t:SetFont(newFont or font, newSize or size, newFlags or flags)
    	if (newFlags or flags):lower():find('outline') then
    		t:SetShadowColor(0, 0, 0, 0)
    		t:SetShadowOffset(0, 0)
    	else
    		t:SetShadowColor(0, 0, 0, 1)
    		t:SetShadowOffset(1, -1)
    	end
    end
    

    I'm not sure if I need to add to other places atm but this seems to give a much cleaner font look.

  • Forge_User_06673707 added the tags New Enhancment Feb 12, 2013

To post a comment, please login or register a new account.