text outlines
#1
Please consider the following for future development on the skinning engine.

I think a good addition to text shadows would be text outlines. They will especially be very useful for text on backdrops. On very light backgrounds adding shadows to the text will enhance readability a bit, but not enough.
Text outlines coupled with the ability to control the sharpness (or glow) would open up possibilities.

Something along the lines of:

<label>foo</label>
<textcolor>ffffffff</textcolor>
<textoutline size="2" glow="0.5">ff000000</textoutline>

Where adjusting the glow and size would allow variations like below.
Image

greetings,
Jeroen
Reply
#2
Yep, that would be awesome !
Reply
#3
I would definitely make use of it.
Reply
#4
not a bad idea indeed.
kinda similar to how subtitle fonts are rendered maybe?

would be nice if skins could use something like it.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
Outline is doable relatively easily (as pointed out, we use it for subs already), though it's quite clunky.

Glow looks as though it needs shader magic to do properly - outline already involves re-rendering the same text over and over, so using a shader might be a faster way to go in general - i.e. have separate shaders for "outline", "shadow", and "glow" effects.

Patches to address this are most welcome Smile

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#6
This might be overkill, but could you as a "workaround", put your text in a photoeditor, make the "fill" transparent and put on the shadow effect. Save it as an image, and place it exactly where your text is?

This might be hard with moving text, lolLaugh
Reply
#7
doestergaard Wrote:This might be overkill, but could you as a "workaround", put your text in a photoeditor, make the "fill" transparent and put on the shadow effect. Save it as an image, and place it exactly where your text is?

and do that again for every language xbmc supports ;-p
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#8
Would be nice to have, I would drop current <shadowcolor> attribute and add this

<textshadow size="3" pos="0,2" blur="2">FF000000</textshadow>.

That would allow full freedom to skinners for adding glow, drop shadows etc.
Image
Reply
#9
Mind if I resurrect this / bring to the attention again? Rolleyes Tongue I don't know if advancements in XBMC have made this easier to do now, but I still think this would be a very powerful feature for skinners to have.
Reply
#10
Outline (as in the stuff the subs uses) is now more efficient as it's just rendering two times instead of lots. It would be a bit non-trivial to hook it up though I think, as there's currently separate routines needed if outlined (as you need to render twice). The shadow stuff might be able to be utilized though?

As for blur or anything like that, I think it requires rendering to a texture first, so that's quite a different change (and adding shaders to the mix might be quite tricky).
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#11
Blur would be awesome, but having the outlines alone would be really great already. As long as we can have some control over the thickness and color of the outline I would most definitely use it. Using that combined with the shadows would open up lots of possibilities.
Reply
#12
Can't you replicate outlines by duplicating the text control in question and making the resulting lower z-order one a bigger font size? From the sound of it this wouldn't even be inefficient compared to how XBMC handles subtitle rendering.
Image
Reply
#13
(2014-03-18, 17:22)toolpunk Wrote: Can't you replicate outlines by duplicating the text control in question and making the resulting lower z-order one a bigger font size? From the sound of it this wouldn't even be inefficient compared to how XBMC handles subtitle rendering.

This would be an extremely hit or miss method, destined to fail in most cases. The results are very dependant on font kerning, and not just font size.

As an example I tried this method on two labels I would like to use text outlines on. I increased the font size of the labels in the back with just 1:

Image

Real outlines wouldn't actually change the size of the fonts so positioning wouldn't be a problem.

Not to mention shadows / fading are completely out of the question. And it's a total hack of course.
Reply
#14
Increasing the font size by just one is a sure way to mess things up. For most fonts this results in characters which are 1pt wider and taller, which obviously does not allow for a clean outline. Also you need to adjust the letter spacing for this method to work properly.

You're right though. It's an awful hacky way of doing this and a native solution would be much preferable.
Image
Reply
#15
We can't adjust letter spacing to the best of my knowledge. Increasing the font size more wouldn't do much good anyway. Thickness or thinness isn't the problem, the positioning is.
Reply

Logout Mark Read Team Forum Stats Members Help
text outlines0