Author Topic: Shadow and Outline  (Read 3840 times)

Romano

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 32
    • View Profile
Shadow and Outline
« on: December 17, 2013, 01:45:25 AM »
How to use both shadow and outline together in UILabel?

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Shadow and Outline
« Reply #1 on: December 17, 2013, 03:51:31 AM »
It isn't made to do that, since the outline would cover the shadow entirely (it makes either in the html style, by rendering multiple labels).

You can make your own version of UILabel to include it, or use a bitmap font where the outline (or shadow) is already embedded in the font.

Jonu

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Shadow and Outline
« Reply #2 on: January 17, 2014, 05:07:14 AM »
Why is the outline made so that it renders multiple labels? It look really bad.
Is there anyway of getting the results that are visible on my screenshot?
I want that my label has 3px stroke and shadow. both of these should have opacity of 50%.
Top one is what it should like and bottom one is how it looks in unity

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Shadow and Outline
« Reply #3 on: January 17, 2014, 01:49:05 PM »
It's because it's not really a proper outline or shadow at all like photoshop does. It's like html/css does by faking it with multiple renderings of characters. This means that the shadow/outline is always sharp with no blurring or extruding which means it will look bad for what you're trying to make in your picture.

I would recommend making a bitmap font with exactly the look you want, then it will look fine - it will also be faster performance wise that using the built in fakery.