StablexUI
StablexUI copied to clipboard
support html5 embedded font input text via @font-face
basic implementation based on suggestions by glantucan. for it to work, the font (ttf) files need to be copied into the build folder (with something like <assets path="assets/font" rename="font" />). then one needs to comment out lines 138 and 143 of src/platforms/HTML5Platform.hx in hxtools (1.1.6), which is part of openfl. removing the comments from lines 20 and 24 in helpers/HTML5Helpers.hx also helps...
Great! But i'm not sure if it's the right way for a lib to force users make manual changes in another libs :) I'll think how to deal with this. Thanks for your pull request :)
Agreed, a solution probably belongs upstream; just a mini hack-as-an-idea really :) The @font-face fonts also don't render the same as the canvas ones - not ideal. Perhaps one could use a div to capture user interaction but actually pump the text through to a TextField masquerading as input text. Will let you know if ever a solution presents itself at this end. Cheers!