On 11 Nov 2005 at 21:39, Scott Evans wrote:

> I want *really beautiful* type in LZX apps.  I want it to look as good as
> if it were done using Photoshop - but of course, it's gotta be dynamic.
>
> Right now importing a TTF into an LZX app looks... eh.  Talking to folks
> around the office, it seems that this is considered a limitation of the
> way Flash transcodes TTF fonts.
>
> But!  There are Flash sites like this one with great-looking type:
> (flash 8 required)
>   http://www.tremorcore.com/seismologist.html
>
> And more specifically, there's sIFR, which does a lovely job of
> type-rendering using Flash.  (fp 8 not required)
>   http://www.mikeindustries.com/sifr/
>
> Any of you flash player experts want to take a look at their code to see
> what it's doing?  Is there anything we can take away from this code?
>   http://www.mikeindustries.com/blog/files/sifr/2.0/sIFR2.0.1.zip

_____________________________________________________

sIFR can be used with Laszlo .. I am using it .. but not inside Laszlo canvas.

Since HTML + CSS content cannot be integrated into Laszlo code a new presentation model is required where HTML containers can be "wrapped" with LZX.SWF containers (as "skin components"). In other words the browser is considered to be the "meta-canvas", and browser "subviews" (embedded content in divs or iframes) contain either LZX.SWF or HTML content (including embedded SVG content).

I am testing this hybrid approach (LZX.SWF, HTML, SVG) and it works quite nicely.

No overlaying of HTML iframes over Laszlo, just slicing the browser into different views, one view containing the HTML content setup with sIFR enabled.

Just as in setting Laszlo canvas attributes, "browser attributes" (e.g. position and visibility of containers) can be changed dynamically by setting CSS attributes by _javascript_ in parent page, called using LzBrowser.loadJS().

SVG also renders fonts (including MathML) very nicely.  An Adobe SVG plugin is still required for IE browser, but SVG viewing is native in Firefox and most other browsers.

The downside is that more LZX.SWF movies are embedded in the browser, and a message passing protocol is required to set variables in all movies.

The Laszlo canvas can be designed where the views are built as libraries.

e.g. here is my Laszlo design which contains the sub-views.

<canvas width="1200" height="800" bgcolor="#336699" >
<include href="" />
<include href="" />
<include href="" />
<include href="" />
<include href="" />
</canvas>


Then this compiles the left_view.lzx movie

<canvas width="200" height="600" bgcolor="#336699" >
<include href="" />
</canvas>

and so on for the other movies ..

The centre_view.lzx can be made hidden (by CSS) and an HTML object (enabled with sIFR) can be made visible to replace this content.  These containers can be stacked as layers.

...

Of course, other browser canvas layout templates can be used, I have just built the centre_view model.  Equally, there could be just two "sub-view" components, LZX.SWF on left and HTML object on left.

...

Note that I am using flashobject for the embedding of LZX.SWF and not the embed.js in OpenLaszlo distribution.  I find that flashobject is much easier to use.

http://blog.deconcept.com/flashobject/

...

Demo to be posted soon.

DL



_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to