How do I make a two-color font?


(billy2000) #1

Hello. I was wandering if I can make a font that has 2 collors.Black for the borders and white for the filler.Or is there any other technique that I can use to achive the same effect?


(Jacob Albano) #2

It’s probably not the best approach, but my first thought is to have two Text objects that contain the same string, and render one on top of the other. The top one would be white, and the bottom would be black and slightly bigger so as to peek through.


(Zachary Lewis) #3

@jacobalbano This may work well with some fonts, but some may not scale so well.

This sounds like it could be solved with a spritefont, but you’d have to write the code to render and display it.

You may also look into adding a border or stroke to the outside of the fonts if possible.


(billy2000) #4

@jacobalbano thats a great idea,actually im goin to try it. @zachwlewis as long as I create both black and white fonts is not rlly a problem with scale.

Thx guys for your help :).


(Abel Toy) #5

You can use a GlowFilter with special settings so as to make it really solid (I think it was: blurX = 2, blurY = 2, strength= 8 or something like that, and if you want to make it bigger, strength has to be blur * 4).


(billy2000) #6

Tank you. I allready used cobalbano’s solution and it works great.Maybe next time ill try this too.


(Zachary Lewis) #7