flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maurice Amsellem (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (FLEX-34197) Text Layout Framework: change embedded fontFamily works in AIR doesn't work in FLEX(WEB)
Date Tue, 01 Apr 2014 09:48:18 GMT

     [ https://issues.apache.org/jira/browse/FLEX-34197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Maurice Amsellem resolved FLEX-34197.
-------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: Adobe Flex SDK 4.6 (Release))
                   Apache Flex 4.12.0

> Text Layout Framework: change embedded fontFamily works in AIR doesn't work in FLEX(WEB)
> ----------------------------------------------------------------------------------------
>
>                 Key: FLEX-34197
>                 URL: https://issues.apache.org/jira/browse/FLEX-34197
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Embedded Fonts
>    Affects Versions: Adobe Flex SDK 4.6 (Release)
>         Environment: every platform (linux not tested)
>            Reporter: Dudda
>              Labels: easytest, embedded-fonts, flex, tlf
>             Fix For: Apache Flex 4.12.0
>
>
> i have a sample code, if you run it as an AIR windowedApplication it works, if you run
it as a web page (s:Application) it doesn't.
> I have AIR 3.8 and flex 4.6.0
> The problem is the embedded font: in desktop application i can see the text changes in
the textarea using TLF, in web it falls in the default font, but the font is there, since
the other textarea displays it, so the problem seems to be the TLF.... but i can't understand
what is wrong in the code.
>  
> the following is the code for AIR desktop application, to test the problem just create
a  web application for flashplayer and replace windowedApplication with Application in the
code
> (you'll need also to have TopSecret.ttf, or another ttf font changing the referenced
name accordingly in the code, in the main folder):
> <?xml version="1.0" encoding="utf-8"?>
> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
>                                                      xmlns:s="library://ns.adobe.com/flex/spark"

>                                                      xmlns:mx="library://ns.adobe.com/flex/mx">
>           <fx:Script>
>                     <![CDATA[
>                               import flashx.textLayout.formats.TextLayoutFormat;
>                               import mx.events.FlexEvent;
>                               import spark.events.IndexChangeEvent;
>                               protected function fontDDL_changeHandler(event:IndexChangeEvent):void
>                               {
>                                         var txtLayFmt:TextLayoutFormat = dynamicArea.getFormatOfRange(null,
>                                                   dynamicArea.selectionAnchorPosition,
>                                                   dynamicArea.selectionActivePosition);
>                                         txtLayFmt.fontFamily = fontDDL.selectedItem;
>                                         dynamicArea.setFormatOfRange(txtLayFmt,
>                                                   dynamicArea.selectionAnchorPosition,
>                                                   dynamicArea.selectionActivePosition);
>                               }
>                     ]]>
>           </fx:Script>
>           <fx:Style>
>                     @namespace s library://ns.adobe.com/flex/spark;
>                     @namespace mx library://ns.adobe.com/flex/mx;
>                     @font-face {
>                               src: url(TopSecret.ttf);
>                               fontFamily: TopSecret;
>                               embedAsCFF:true;
>                     }
>           </fx:Style>
>           <s:VGroup>
>                     <s:TextArea text="this is a font Arial Text" fontFamily="Arial"/>
>                     <s:TextArea text="this is a font TopSecret" fontFamily="TopSecret"/>
>                     <s:TextArea id="dynamicArea" text="select this text and change
font"/>
>                     <s:DropDownList id="fontDDL" width="150" change="fontDDL_changeHandler(event);">
>                               <s:dataProvider>
>                                         <s:ArrayList id="fontList" source="[TopSecret,
Arial, Courier New, Times, Verdana]" />
>                               </s:dataProvider>
>                     </s:DropDownList>
>           </s:VGroup>
> </s:WindowedApplication>



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message