Sorry, sent that last email out accidently, without finishing it.
What's not covered by my code in the first version is the following
case:

        <font name="Cousine" embedascff="true">
            <face style="plain" src="Cousine-Regular.ttf" />
            <face style="italic" src="Cousine-Italic.ttf" />
            <face style="bold" src="Cousine-Bold.ttf" />
            <face style="bold italic" src="Cousine-BoldItalic.ttf" />
        </font>

I'll update the changeset to support font/face tag combinations as
well, and sent the final version out for review.

Thanks,
Raju

On Fri, Oct 14, 2011 at 6:31 PM, Raju <[email protected]> wrote:
> Phil, thanks a lot. I have just one final question:
>
> On Oct 14, 2011, at 6:00 PM, [email protected] wrote:
>
> Very cool. Approved!
>
>
> On Fri, Oct 14, 2011 at 8:32 AM, Raju wrote:
>
> Change raju-20111014-aaS by [email protected] on 2011-10-14 12:56:41 CEST
>
>    in /Users/raju/src/svn/openlaszlo/tlf
>
>    for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: Add support of embedAsCFF property for embedded fonts in the SWF10
> runtime
>
> New Features: Font tag supports embedascff property with boolean value
>
> Bugs Fixed: LPP-10093
>
> Technical Reviewer: [email protected],[email protected]
>
> QA Reviewer: (pending)
>
> Doc Reviewer: (pending)
>
> Documentation:
>
>
> Release Notes:
>
> Add support for CFF font embedding in the ActionScript3 runtime (Flash
> Player 10+). Adobe's Text Layout Framework (TLF) requires fonts to be
> embedded as CFF to support all the features of the TLF.
>
> Overview:
>
> You can now set an optional attribute 'embedascff' on the  tag (e.g. ) to
> embed a font, setting the AS3 embedAsCFF option to 'true'. The default value
> for embedascff is "false" (the default value within Flash is 'true'), to be
> compatible with existing code.
>
> Details:
>
> FontCompiler#compileFont checks for an attribute "embedascff" on the tag. If
> the attribute is not found, the default value is set to "false".
> SWF9Writer#importFontStyle is called with the value as an additional
> argument to the method.
>
> SWF9Writer#importFontStyle passes the embedAsCFF parameter value on to
> SWF9Writer#importFont.
>
> SWF9Writer#importFont - which generates the AS3 font embedding code - has an
> additional parameter 'String embedAsCFF'. In ObjectWriter - the abstract
> base class for SWF9Writer - the signature of importFontStyle had to be
> modified to take the additional embedAsCFF parameter.
>
> For all other classes extending ObjectWriter (SWFWriter.java,
> DHTMLWriter.java, NullWriter.java ), the method importFontStyle has an
> additional parameter embedAsCFF now (value can be ignored).
>
> Tests:
>
> Compile test/tlf/embedascff.lzx using the SWF10 runtime. The font
> KentuckyFriedChickenFont.ttf has been embedded two times: With embedascff
> set to true and false.
>
> 1) Validate that the  element does not render CFF fonts
>
> The  element in line #152 should not be displayed:
>
>        Text with font ChickenCFF
>
> 2) Validate that TextFlow (TLF) renders CFF enabled fonts correctly
>
> You will see two poems in a gray box. Both are rendered using an TFL
> TextFlow instance. The left one uses the CFF enabled font, so you should see
> the KentuckyFriedChickenFont.ttf rendered correctly. The right box does not
> render the font correctly, since it has been embedded with embedAsCFF set to
> false.
>
> 3) Check the generated source code for the [Embed] information
>
> The [Embed] element should show that the font has been embedded two times,
> once with embedAsCFF set to true, once set to false.
>
> [Embed(mimeType='application/x-font',
> source='/Users/raju/src/svn/openlaszlo/tlf/test/resources/ttf/KentuckyFriedChickenFont.ttf',
> fontName='ChickenCFF',
> fontWeight='plain',fontStyle='plain',advancedAntiAliasing='true',embedAsCFF='true')]
>
> [Embed(mimeType='application/x-font',
> source='/Users/raju/src/svn/openlaszlo/tlf/test/resources/ttf/KentuckyFriedChickenFont.ttf',
> fontName='ChickenNoCFF',
> fontWeight='plain',fontStyle='plain',advancedAntiAliasing='true',embedAsCFF='false')]
>
> Files:
>
> A       test/tlf/embedascff.lzx
>
> M WEB-INF/lps/server/src/org/openlaszlo/compiler/ObjectWriter.java
>
> M WEB-INF/lps/server/src/org/openlaszlo/compiler/DHTMLWriter.java
>
> M       WEB-INF/lps/server/src/org/openlaszlo/compiler/NullWriter.java
>
> M       WEB-INF/lps/server/src/org/openlaszlo/compiler/SWFWriter.java
>
> M WEB-INF/lps/server/src/org/openlaszlo/compiler/FontCompiler.java
>
> M       WEB-INF/lps/server/src/org/openlaszlo/compiler/SWF9Writer.java
>
> Changeset:
> http://svn.openlaszlo.org/openlaszlo/patches/raju-20111014-aaS.tar
>
>
>

Reply via email to