Does' starling TextField 'not support character spacing in' html5 '? Flash and Windows support

.
txt = new TextField(500, 100, “100.00%”);
txt.format.letterSpacing = 10;
txt.format.setTo(Main.font.fontName, 20, 0xFF9933);
txt.autoSize = TextFieldAutoSize.BOTH_DIRECTIONS;
txt.x = -txt.width / 2;
txt.y = 188 - 20;
txt.text = “100.00%”;
this.addChild(txt);
.
txt.format.letterSpacing = 10;
It doesn’t work in HTML5! Flash and Windows display normally.
.
Flash and Windows font spacing support normal



.
Does HTML5 not support character spacing?

.

.
I tried it, pure ‘openfl’
Word spacing is also not supported in HTML5 ..
.



.

var format = new TextFormat(“Katamotz Ikasi”, 30, 0xFF0000);
var textField = new TextField();
format.letterSpacing = 20;
textField.defaultTextFormat = format;
textField.embedFonts = true;
textField.selectable = false;

	textField.x = 50;
	textField.y = 50;
	textField.width = 200;

	textField.text = "100.00%";

	addChild(textField);

The order you do this is important. I’d suggest it’s best to define your TextFormat object, before applying it to your TextField object. Your current code has this in reverse, applying the TextFormat afterwards.

This produces consistent letter spacing in Neko and HTML5 targets in my testing:

var format = new TextFormat(“Katamotz Ikasi”, 30, 0xFF0000);
format.letterSpacing = 20;

var textField = new TextField(200, 100, "100.00%", format);
textField.autoSize = starling.text.TextFieldAutoSize.BOTH_DIRECTIONS;
textField.embedFonts = true;
textField.selectable = false;

.
Tested the code you provided, it doesn’t work in the HTML5 target!
.



.

With format.letterSpacing commented out:

var format = new TextFormat(BitmapFont.MINI, 30, 0xFF0000);
//format.letterSpacing = 20;
var textField = new TextField(200, 100, "100.00%", format);
textField.autoSize = starling.text.TextFieldAutoSize.BOTH_DIRECTIONS;
textField.x = textField.y = 50;
addChild(textField);

Neko

openfl test neko

HTML5

openfl test html5


Now with format.letterSpacing active:

var format = new TextFormat(BitmapFont.MINI, 30, 0xFF0000);
format.letterSpacing = 20;
var textField = new TextField(200, 100, "100.00%", format);
textField.autoSize = starling.text.TextFieldAutoSize.BOTH_DIRECTIONS;
textField.x = textField.y = 50;
addChild(textField);

Neko

openfl test neko

HTML5

openfl test html5


I have also replicated this just now, using custom bitmap fonts too, although I needed to use a much higher letterSpacing value, perhaps because of the bitmapFont’s original resolution.
openfl test html5

.
“BitmapFont”?
I mean vector text spacing doesn’t work.
I know BitmapFont can do it
.