TextField.setTextFormat on Windows Build

When targeting Windows, TextField.setTextFormat just changes the whole text field to that format rather than setting it just between the start and end indexes. So in this example TEXTFORMAT3 is what the whole textbox is set to regardless of what was set before it.

var textbox:TextField = new TextField();
textbox.text = “This is a bit of a hard issue to solve…”;
textbox.defaultTextFormat = TEXTFORMAT1;
textbox.setTextFormat(TEXTFORMAT2, 5, 10);
textbox.setTextFormat(TEXTFORMAT3, 11, 13);

It used to work fine in openfl 3.6.0.

Can you try this pull request ?

How do I make a pull request? I don’t have much knowledge of how github works.

Easier method:

  • Just copy/paste the modified file by Tienery into you current openfl (if possible from git and not from haxelib version even if it should also work)

Best method:

  • fork openfl (you have a button on github for this)
  • merge Tienery pull request into your forked openfl

Ok, thanks for your help.

Edit: Ok I tested the new file, but no text appears at all anywhere in my windows build now.