Skada Damage Meter

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

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.

User When Change
Dashsmash Feb 12, 2013 at 19:00 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

Facts

Last updated
Apr 12, 2013
Reported
Feb 12, 2013
Status
New - Issue has not had initial review yet.
Type
Enhancement - A change which is intended to better the project in some way
Priority
Medium - Normal priority.
Votes
1

Reported by

Possible assignees