Non-embedded TextField to use browser rendering

Bug #982628 reported by Philippe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
jeash
Triaged
High
Unassigned

Bug Description

It would be very interesting to be able to render text as a simple DIV with regular text (and HTML) instead of canvas rendering. It can have a whole lot of benefits.

This would be linked to .embedFonts and you wouldn't be forced to embed this fairly heavy default font.

Likewise, being able to include a DIV and use browser CSS styling would bring interesting side effects to Jeash (not everything has to be rendered "manually" using canvas).

Revision history for this message
Niel Drummond (niel-drummond) wrote :

It's actually currently possible to do this already in the tip version, if you set htmltext, or if you set the textfield's type as an input field.

Unfortunately, the implementation for htmltext is still quite buggy, and though I was intending to implement textfield's exactly as you describe it above, I am still left wondering after Prezi's talk at wwx what the best default is for jeash, since their use case seems to be a viable avenue for developing with jeash, and I haven't seen anyone actually use textfields for anything other than displaying an fps counter (which you should not be doing in javascript anyway).

Revision history for this message
Philippe (philippe-elsass) wrote :

Prezi has very specific needs: they need a custom cross-platform text engine for their presentation texts. And they can just add it on top of the existing TextField.

System text has always been used in Flash even if it's not consistent accross browsers - but that's already the case if you do HTML/CSS where text greatly varies between Mac & Win. I can totally imagine Jeash being used to build complete HTML websites like Flash is used, and for that you'll definitely want to use the browser text rendering (either system or webfonts).

Revision history for this message
Niel Drummond (niel-drummond) wrote : Re: [Bug 982628] [NEW] Non-embedded TextField to use browser rendering

Yes, i could imagine that jeash could be used for web site
interactivity too, and i think taking some ideas from flex helps.

It seems conceptually more sound to have a mechanism to associate
existing html content with a class derived from the displayobject,
rather than feeding a string of html into a textfield... It's not in
jeash's goals, but that would be a 'killer' feature for haxe.

On 17/04/2012, Philippe <email address hidden> wrote:
> Prezi has very specific needs: they need a custom cross-platform text
> engine for their presentation texts. And they can just add it on top of
> the existing TextField.
>
> System text has always been used in Flash even if it's not consistent
> accross browsers - but that's already the case if you do HTML/CSS where
> text greatly varies between Mac & Win. I can totally imagine Jeash being
> used to build complete HTML websites like Flash is used, and for that
> you'll definitely want to use the browser text rendering (either system
> or webfonts).
>
> --
> You received this bug notification because you are subscribed to jeash.
> https://bugs.launchpad.net/bugs/982628
>
> Title:
> Non-embedded TextField to use browser rendering
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/jeash/+bug/982628/+subscriptions
>

--
Sent from my mobile device

Changed in jeash:
status: New → Triaged
Revision history for this message
Philippe (philippe-elsass) wrote :

I see you've started implementing native text when .htmlText is used - that's great.

Do you plan to at least support .defaultTextFormat?

Revision history for this message
Niel Drummond (niel-drummond) wrote :

uhmm.. I guess adding some simple stylesheets could be done.. don't want to go too far down that road though.

Changed in jeash:
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.