Re: Open source parts of FP

2014-08-29 Thread Harbs
Yup. Pixel perfect text layout is the kicker.

There’s currently three approaches to this problem that I know of:

1) Google Docs separates words (and sometimes letters) into separate divs and 
places each div separately. Selection rectangles and cursors are separate divs 
that are imposed over the text.
2) Apple Pages uses a similar approach, but the text atoms are broken down into 
separate SVG text objects rather than divs.
3) Other companies (plural? I’ve only found one public available example) use 
an approach of writing the text to Canvas (and custom handling of selections, 
etc.)

Any one of these three approaches requires writing a text engine from scratch 
and the effort is probably measured in man-years. This is why there are so few 
examples of HTML apps with decent text handling and rendering (beyond the 
simple embeddable text editor widgets).

An open source HTML text engine would be awesome, but I don’t see anyone with 
the funds stepping forward. TLF might be a good platform for interacting with 
that engine. (i.e. the engine would interface similar to how the FTE interfaces 
with TLF. But my gut tells me that it might be easier to redo TLF from scratch 
specifically for HTML possibly modeling it after the original TLF. Parts of TLF 
have become very hard to follow. Especially things like selections could 
probably use a redo.

On Aug 28, 2014, at 6:13 PM, Joel Marks  wrote:

> Thanks for the reply Mike. Sorry I didn't realize how well documented the
> "open source parts of Flash" argument is.
> 
> Applications that rely on pixel perfect text layout can not use the browser
> DOM because most everything in the browser world it is dependent on what
> browser and OS you use.  This has led companies like Prezi, who is trying
> to get off FP, to use Emscripten for HarfBuzz in the browser then they
> completely wrote their own paragraph layout engine.
> 
> 
> On Wed, Aug 27, 2014 at 6:13 PM, Michael A. Labriola <
> labri...@digitalprimates.net> wrote:
> 
>>> Long story short we are trying to do what the Flash Player does outside
>> of Flash. We have seen other companies have success using Emscripten and
>> asm.js so if Adobe could open source parts of the Flash Player then we
>> could get some of the Flash Player functionality in javascript. FTE and the
>> Core Text Services C library (documentation <
>> http://www.adobe.com/cn/devnet/flash/articles/tlf-overview.html>) inside
>> of the Flash Player are of particular interest to me and anyone else that
>> was using TLF in their Flex application. This also has potential of making
>> the effort for Flex JS easier.
>> 
>> Joel,
>> 
>> I am not going to address the why won't adobe open source flash part of
>> this, there are too many threads on that in this forum to count already.
>> However, just want to point out that a lot of what FTE was trying to
>> accomplish is bringing the rendering capabilities of the browser into Flash
>> Player. So, porting something that does browser rendering in the player
>> back to the browser is a bit circular if not redundant. We have found that
>> everything FTE could do is generally available, faster and easier in the
>> browser DOM today. This isn’t a comment on Flex versus JS in general, just
>> on text rendering.
>> 
>> Just something to think about,
>> Mike
>> 
>> 
>> 



RE: Open source parts of FP

2014-08-28 Thread Michael A. Labriola
>Applications that rely on pixel perfect text layout can not use the 
>browser DOM because most everything in the browser world it is 
>dependent on what browser and OS you use.  This has led companies like 
>Prezi, who is trying to get off FP, to use Emscripten for HarfBuzz in 
>the browser then they completely wrote their own paragraph layout 
>engine.

Joel, 

A sincere thanks for the information and sorry for the hasty reply while not 
understanding the requirements. I am going to do a bit more reading on some of 
the items you mention above as it's kind of fascinating. 

Mike



Re: Open source parts of FP

2014-08-28 Thread Alex Harui
Hi Joel,

Long time ago, someone mentioned this project: http://lightspark.github.io
I have no idea if it will help you or not.

Regarding FlexJS, in these early days, we are punting on pixel-perfect
text.  I have hope that someday, a few dedicated volunteers will take a
shot at pixel-perfect text's cousin, which I call wrap-perfect text. I'm
wondering if just getting line-wrapping and interline spacing would be
good enough for your purposes.

I'm also wondering if editing text while maintaining pixel or wrap
perfection is important for your app.

IMO, the public code-base to compute wrap-perfect text is TLF.  I would
encourage anyone working on platform-independent text rendering for FlexJS
to not rely on the Flash Player FTE on the ActionScript side.  I've asked
a few folks who've poked at the TLF code base if there is any true FTE
dependency in the code.  Nobody has found one yet, so in a port of TLF for
FlexJS, I would recommend abstracting the generating of TextLines and have
it generate "anything", including TextFields for a mobile ActionScript
project, and span tags for html.  In my tours through TLF it appears to
just want to find out how long a run of single-style text is and then
place a display object containing that run in an appropriate place.  For
FlexJS, that might change the problem to trying to find a way to get
consistent measurements of a single-style run from the browser.  Of
course, that might still be a giant problem).

Anyway, my point is, TLF, which is open, may in fact be a better starting
point, and if you want to build out a wrap-perfect layout engine that
FlexJS can use, I'd definitely try to help when I can.

-Alex

On 8/28/14 8:13 AM, "Joel Marks"  wrote:

>Thanks for the reply Mike. Sorry I didn't realize how well documented the
>"open source parts of Flash" argument is.
>
>Applications that rely on pixel perfect text layout can not use the
>browser
>DOM because most everything in the browser world it is dependent on what
>browser and OS you use.  This has led companies like Prezi, who is trying
>to get off FP, to use Emscripten for HarfBuzz in the browser then they
>completely wrote their own paragraph layout engine.
>
>
>On Wed, Aug 27, 2014 at 6:13 PM, Michael A. Labriola <
>labri...@digitalprimates.net> wrote:
>
>> >Long story short we are trying to do what the Flash Player does outside
>> of Flash. We have seen other companies have success using Emscripten and
>> asm.js so if Adobe could open source parts of the Flash Player then we
>> could get some of the Flash Player functionality in javascript. FTE and
>>the
>> Core Text Services C library (documentation <
>> http://www.adobe.com/cn/devnet/flash/articles/tlf-overview.html>) inside
>> of the Flash Player are of particular interest to me and anyone else
>>that
>> was using TLF in their Flex application. This also has potential of
>>making
>> the effort for Flex JS easier.
>>
>> Joel,
>>
>> I am not going to address the why won't adobe open source flash part of
>> this, there are too many threads on that in this forum to count already.
>> However, just want to point out that a lot of what FTE was trying to
>> accomplish is bringing the rendering capabilities of the browser into
>>Flash
>> Player. So, porting something that does browser rendering in the player
>> back to the browser is a bit circular if not redundant. We have found
>>that
>> everything FTE could do is generally available, faster and easier in the
>> browser DOM today. This isn¹t a comment on Flex versus JS in general,
>>just
>> on text rendering.
>>
>> Just something to think about,
>> Mike
>>
>>
>>



Re: Open source parts of FP

2014-08-28 Thread Joel Marks
Thanks for the reply Mike. Sorry I didn't realize how well documented the
"open source parts of Flash" argument is.

Applications that rely on pixel perfect text layout can not use the browser
DOM because most everything in the browser world it is dependent on what
browser and OS you use.  This has led companies like Prezi, who is trying
to get off FP, to use Emscripten for HarfBuzz in the browser then they
completely wrote their own paragraph layout engine.


On Wed, Aug 27, 2014 at 6:13 PM, Michael A. Labriola <
labri...@digitalprimates.net> wrote:

> >Long story short we are trying to do what the Flash Player does outside
> of Flash. We have seen other companies have success using Emscripten and
> asm.js so if Adobe could open source parts of the Flash Player then we
> could get some of the Flash Player functionality in javascript. FTE and the
> Core Text Services C library (documentation <
> http://www.adobe.com/cn/devnet/flash/articles/tlf-overview.html>) inside
> of the Flash Player are of particular interest to me and anyone else that
> was using TLF in their Flex application. This also has potential of making
> the effort for Flex JS easier.
>
> Joel,
>
> I am not going to address the why won't adobe open source flash part of
> this, there are too many threads on that in this forum to count already.
> However, just want to point out that a lot of what FTE was trying to
> accomplish is bringing the rendering capabilities of the browser into Flash
> Player. So, porting something that does browser rendering in the player
> back to the browser is a bit circular if not redundant. We have found that
> everything FTE could do is generally available, faster and easier in the
> browser DOM today. This isn’t a comment on Flex versus JS in general, just
> on text rendering.
>
> Just something to think about,
> Mike
>
>
>


RE: Open source parts of FP

2014-08-27 Thread Michael A. Labriola
>Long story short we are trying to do what the Flash Player does outside of 
>Flash. We have seen other companies have success using Emscripten and asm.js 
>so if Adobe could open source parts of the Flash Player then we could get some 
>of the Flash Player functionality in javascript. FTE and the Core Text 
>Services C library (documentation 
>) inside of 
>the Flash Player are of particular interest to me and anyone else that was 
>using TLF in their Flex application. This also has potential of making the 
>effort for Flex JS easier.

Joel,

I am not going to address the why won't adobe open source flash part of this, 
there are too many threads on that in this forum to count already. However, 
just want to point out that a lot of what FTE was trying to accomplish is 
bringing the rendering capabilities of the browser into Flash Player. So, 
porting something that does browser rendering in the player back to the browser 
is a bit circular if not redundant. We have found that everything FTE could do 
is generally available, faster and easier in the browser DOM today. This isn’t 
a comment on Flex versus JS in general, just on text rendering.

Just something to think about,
Mike