It is working for me but I am using this settings (just tested now on HTML5 target, I see my textfield using the font)
var textFieldFormat:TextFormat = new TextFormat(Assets.getFont("assets/pf_ronda_seven.ttf").fontName, 20 , 0);
var textField = new TextField();
textFieldFormat.align = TextFormatAlign.LEFT;
textField.autoSize = TextFieldAutoSize.LEFT;
textField.antiAliasType = AntiAliasType.ADVANCED;
textField.defaultTextFormat = textFieldFormat;
textField.embedFonts = true;
textField.selectable = false;
textField.wordWrap = false;
textField.border = false;
I think the only one that could be it is embedFonts = true. Try to set it on your code.
Otherwise are you sure you are actually use the TextFormat on the TextField?
If it is still not working check you have openfl and lime updated (sudo haxelib upgrade)
Last chance I would say are you using NEXT or V2? If you are using OpenFL NEXT it could be an issue, Joshua told me he’s working on the Text/Font renderer in these days.
I updated my git repo of the dev build of openfl and it’s broken input text fields (which have been very finnicky) Most of the time I can only click it once and then once I’ve deselected the text field I cannot select or type into it again. Also the highlighting is offset and the wrong size and colour.
The TextField(s) that were set to input text used to not really work (probably because they weren’t dom) so I was using the dev build, I suppose it was b962bb2 because I just git pull'ed the new one (I think) and it’s gone back to the old broken non-dom behaviour when I call openfl test html5
as far as I can tell textWidth and Text Field Alignment are not implemented on bit-five. But if I don’t use bit-five then the text input is not DOM and hardly works at all.
Thanks, It’s probably not appropriate for this app, I was just checking it out because the standard backend had that issue I described and photographed above with input text.
if you are sure it was working before:
the best option is to clone the commit that was working (first step is find it then use haxelib git to install it) and after submit an issue on the openfl github page.
this way you can keep working and you will see the problem will be addressed quite fast and afterwards you could go back to the master.
So it sounds as if input text was not enabled for -Ddom mode, that would be the simplest to support. Probably only a few CSS properties and getters for it to work
The input text under canvas is new, it was based on a pull request that (I feel) brings it closer to reality but isn’t there yet. I hope to see progress in this area soon, as this is a key feature
if it comes down to it, be aware that -Ddom mode is compatible with an openfl.display.DOMSprite which should allow for you to specify your own HTML element, but mix it within the display list. However, making DOM mode work with input text may be easier done as a patch to the TextField class