I was trying to use distance field font for my new app and seems like I was doing it all wrong. The reason why i decided to try it out is to use, the glow property without additional draw count. Before using it the drawcount was 1 and after using it went upto 19 as I was using 18 text fields. These are the steps i followed :-
1) loaded http://kvazars.com/littera/
2) Added a font ending with .ttf
3) Enabled distance field with default properties which was Type:Type1 and Quality:4
4) Made sure all other values are disabled and increased padding to 4
5) Clicked Export
6) Extracted the files and added it to the asset folder of my app.
7) Using Asset Manager loaded the font in the app
Added the following code:-
name_text = new TextField(240, 30, "HOUSE"); name_text.format.setTo("newFont", 22); name_text.format.horizontalAlign = Align.RIGHT; name_text.format.verticalAlign = Align.CENTER; name_text.format.color = Color.YELLOW; name_text.text = caption; //name_text.autoScale = true; name_text.batchable = true; //name_text.border = true; addChild(name_text); style1 = new DistanceFieldStyle(0.5, 1); style1.setupGlow(); name_text.style = style1;
9) Run the build and following was the output :-
When using the it without distance filed this is the output:-
Please let me know if I did something wrong or missed.