Variable outlined text

Hello. I am working in a game and It would be great if I can create outlined variable text. Are there any walkaround to do this? (I am using feathersUI).

Thanks in advance for any help

With regards
Luis

You might want to experiment with a DropShadow filter or possibly a GlowFilter.

//assuming a textField named myTextField
myTextField.filters = [new DropShadowFilter(4, 275, 0, 0.8, 8, 8)];

Something in the back of my mind tells me the filter might only apply to the enclosing box. In that case you might have to convert it to a bitmap in order to display properly.

With glow filter you can achieve something closest but not perfect. If nothing easy appears I will experiment a little rendering another text with alpha. Will let you know the results.

Thanks for your response

1 Like

You can do this using Bitmap fonts, I updated the BitmapFont lib years ago but my PR was never merged so I guess the latest version is on my github GitHub - MatseFR/BitmapFont: cross-platform bitmap font implementation
Having it working with Feathers will probably require creating a new control

Another possibility is using Distance Field Rendering, it is explained in the Starling manual : The Starling Manual
I guess it could be adapted to work with regular OpenFL (maybe someone did that already ?)