The changeset has been committed, it's in Trunk now. The test file (for anyone interested) can be found here: http://localhost:8080/trunk/test/tlf/embedascff.lzx
On Fri, Oct 14, 2011 at 2:47 PM, Raju Bitter <[email protected]> wrote: > I have checked in a changeset for review, adding the embedascff > property to font. The changeset contains a test file as well. > openlaszlo/patches/raju-20111014-aaS.tar > > A screenshot of the test file in action has been attached to the JIRA: > http://jira.openlaszlo.org/jira/secure/attachment/13472/TestScreenShot.jpg > > On Wed, Oct 12, 2011 at 3:54 PM, Raju Bitter > <[email protected]> wrote: >> I have attached a screenshot of a proof-of-concept app using TLF 1.0 >> and a custom font embedded with embedAsCFF='true'. >> http://jira.openlaszlo.org/jira/secure/attachment/13470/Proof-of-concept+of+TLF+TextFlow+with+embedded+font+and+rotation..jpg >> >> On Wed, Oct 12, 2011 at 1:23 PM, Raju Bitter >> <[email protected]> wrote: >>> I've created a JIRA here >>> http://jira.openlaszlo.org/jira/browse/LPP-10093 for the embedAsCFF >>> attribute handling. I have that working already locally for >>> >>> <font name="LibertineRegular" src="LinBiolinum_r.otf" embedascff="true" />, >>> >>> and I can use rotated text with a TextFlow component. Text quality >>> looks very good. But I have a few questions: >>> >>> 1) What should the name of the property be? I suppose embedascff would >>> be the best choice. >>> >>> 2) How should multiple fonts be treated? Should the embedascff be set >>> on the font tag, or the face tag (less optimal in my eyes)? >>> <font name="myfont" embedascff="true"> >>> <face src="myfont.otf" style="plain" /> >>> <face src="myfont-bold.otf" style="bold" /> >>> <face src="myfont-ital.otf" style="italic" /> >>> <face src="myfont-bita.otf" style="bold italic"/> >>> </font> >>> >>> 3) How is the usage of CFF fonts going to affect DHTML font embedding? >>> Haven't investigated, yet. >>> >>> 4) Compiler implementation question: >>> What is the org.openlaszlo.compiler.Canvas.mInfo element used for? >>> Does the new property 'embedascff' need to be added to the mInfo >>> element, e.g. >>> File: org.openlaszlo.compiler.FontCompiler#compileFont >>> >>> private void compileFont(String name, Element element) { >>> String style = element.getAttributeValue("style"); >>> try { >>> String path = mEnv.resolveReference(element).getAbsolutePath(); >>> String embedAsCFF = null; >>> if (mEnv.isCanvas()) { >>> Element info = new Element("resolve"); >>> info.setAttribute("src", element.getAttributeValue("src")); >>> info.setAttribute("pathname", >>> mEnv.resolveReference(element).toString()); >>> embedAsCFF = element.getAttributeValue("embedascff"); >>> if (embedAsCFF == null) { >>> // Default value should be false to support embedded >>> fonts in Flash TextField components. >>> // See http://jira.openlaszlo.org/jira/browse/LPP-9140 >>> embedAsCFF = "false"; >>> } >>> info.setAttribute("embedascff", embedAsCFF); >>> mEnv.getCanvas().addInfo(info); >>> } >>> >>> Thanks, >>> Raju >>> >>> On Tue, Oct 11, 2011 at 4:25 PM, Raju Bitter >>> <[email protected]> wrote: >>>> Great, thanks Henry. I appreciate your help! >>>> >>>> For now, I'll use these two wiki pages to collect the information I have: >>>> http://wiki.openlaszlo.org/Adobe_TextLayoutFramework >>>> http://wiki.openlaszlo.org/Enhanced_Text_API >>>> >>>> OL trunk includes TLF 1.0 at the moment. Flex 4.5 ships with TLF 2.0. >>>> >>>> On Tue, Oct 11, 2011 at 3:09 PM, Henry Minsky <[email protected]> wrote: >>>>> I can advise, although any memory of the details is rapidly fading. >>>>> >>>>> The current implentation tried to make an exact drop-in class that works >>>>> like the venerable TextField, so it could be swapped into LzTextSprite >>>>> with >>>>> no changes to LzTextSprite. >>>>> >>>>> The embedding of fonts was handled by some calls in the compiler to emit >>>>> Flex resource directives. I could try to help out on modifying some of >>>>> those >>>>> to take different args. >>>>> >>>>> >>>>> On Tue, Oct 11, 2011 at 8:23 AM, Raju Bitter >>>>> <[email protected]> wrote: >>>>>> >>>>>> The current textfield implementation utilizing the TLF is limited in >>>>>> how much of the FTE and TLE can be used. To have full TLF feature >>>>>> support, OpenLaszlo would have to support OTF/CFF fonts - which the >>>>>> platform does not do right now. >>>>>> >>>>>> Would Laszlo be interested in working with me on implementing full >>>>>> FTE/TLE support in OpenLaszlo? The support I'd need would be >>>>>> >>>>>> 1) support for working on a spec for the new features (Amy?) >>>>>> 2) a contact person with good knowledge of font handling in the AS3 >>>>>> runtime >>>>>> 3) a QA resource for testing changes >>>>>> >>>>>> The ultimate goal is to have a the functionality for an RTE componen >>>>>> in Flash using the TLF. >>>>>> >>>>>> - Raju >>>>> >>>>> >>>>> >>>>> -- >>>>> Henry Minsky >>>>> >>>>> >>>>> >>>>> >>>> >>> >> >
