Ah yes, this issue is described in the fine print here (see EmbeddedFontRegistry): http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084- 799a.html
It didn't for me without RSLs in 4.6 which is how Apache Flex works. On 3/8/13 12:15 PM, "Scott Talsma" <sc...@talsma.tv> wrote: > It works perfectly if I do not use external stylesheets. > > (Although I did notice that the Panel label [title attribute] does not > assume the correct font, but that may be a skinning issue.) > > Just as a sanity check, I have tested it against the following SDKs: > 4.6 (works) > 4.9 (broken) > 4.9.1 (broken) > > I don't have 4.8 installed (tried pulling it from source, but can't seem to > get IntelliJ to like it). > > > On Fri, Mar 8, 2013 at 2:13 PM, Alex Harui <aha...@adobe.com> wrote: > >> Well, I'll try to look into it later today. If you aren't using external >> stylesheets does it work? >> >> The default for spark is embedAsCFF=true and all components, even Label >> should be able to use it. >> >> >> On 3/8/13 10:58 AM, "Scott Talsma" <sc...@talsma.tv> wrote: >> >>> I misspoke earlier. I suspect that my alias collided w/a locally >> installed >>> system font, and that was used instead of the embedded font. >>> >>> When embedAsCFF=false, none of the text classes use the embedded font. >>> When embedAsCFF=true, only the s:Label instances refuse to use it. >>> >>> Does it make sense to poke around using fontSwf? >>> >>> >>> Here is my styles.css file: >>> @namespace s "library://ns.adobe.com/flex/spark"; >>> >>> @font-face { >>> src: url("../fonts/Herculanum.ttf"); >>> embedAsCFF: true; >>> fontFamily: testing; >>> } >>> >>> s|Application { >>> fontFamily: testing; >>> } >>> >>> And here is the app that loads it: >>> <?xml version="1.0"?> >>> <s:Application >>> xmlns:fx="http://ns.adobe.com/mxml/2009" >>> xmlns:mx="library://ns.adobe.com/flex/mx" >>> xmlns:s="library://ns.adobe.com/flex/spark" >>> creationComplete="loadExtStylesheet()"> >>> <s:layout> >>> <s:VerticalLayout/> >>> </s:layout> >>> <fx:Script> >>> >>> private function loadExtStylesheet():void { >>> styleManager.loadStyleDeclarations("styles.swf"); >>> } >>> >>> </fx:Script> >>> >>> <fx:Declarations> >>> <fx:String id="valueEng"> >>> <![CDATA[Help.]]> >>> </fx:String> >>> </fx:Declarations> >>> <s:Panel title="Example of text" > >>> <s:layout> >>> <s:VerticalLayout /> >>> </s:layout> >>> <s:Label text="Example of text" fontFamily="testing" /> >>> <s:Label text="Example of text" /> >>> <s:RichText id="myRT1" width="400" text="asdf"/> >>> <s:RichEditableText width="400" text="asdf"/> >>> </s:Panel> >>> </s:Application> >>> >>> >>> >>> On Fri, Mar 8, 2013 at 1:13 PM, Scott Talsma <sc...@talsma.tv> wrote: >>> >>>> Nope--this was a generic desktop AIR app. >>>> >>>> >>>> On Fri, Mar 8, 2013 at 11:39 AM, Alex Harui <aha...@adobe.com> wrote: >>>> >>>>> Are you using the mobile theme? You shouldn't need to do that for a >>>>> non-mobile app. >>>>> >>>>> >>>>> On 3/8/13 7:41 AM, "Scott Talsma" <sc...@talsma.tv> wrote: >>>>> >>>>>> Sure enough--that was the issue. Thanks for the help. >>>>>> >>>>>> >>>>>> On Fri, Mar 8, 2013 at 10:12 AM, Jagan Langa Sami Durai < >>>>> jaga...@sybrant.com >>>>>>> wrote: >>>>>> >>>>>>> * embedAsCFF: true; - *this is the problem. set it to false. >>>>>>> >>>>>>> >>>>>>> On Fri, Mar 8, 2013 at 8:34 PM, Scott Talsma <sc...@talsma.tv> >> wrote: >>>>>>> >>>>>>>> I just updated a 4.6 to 4.9, and discovered some my text fields were >>>>>>>> displaying in Times New Roman instead of Verdana. Verdana is being >>>>>>>> specified in an runtime stylesheet, compiled into an external swf. >>>>>>>> >>>>>>>> When I dug further, I confirmed that only the spark Label >> (<s:Label>) >>>>> is >>>>>>>> affected (broken); <s:RichText> and <s:RichEditableText> work fine. >>>>>>>> >>>>>>>> I know that some things changed b/t 4.6 and 4.9 around embedded >> fonts, >>>>>>> so I >>>>>>>> wanted to confirm that I am doing things correctly before filing a >>>>> bug. >>>>>>>> >>>>>>>> <?xml version="1.0"?> >>>>>>>> <s:Application >>>>>>>> xmlns:fx="http://ns.adobe.com/mxml/2009" >>>>>>>> xmlns:mx="library://ns.adobe.com/flex/mx" >>>>>>>> xmlns:s="library://ns.adobe.com/flex/spark" >>>>>>>> creationComplete="loadExtStylesheet()"> >>>>>>>> <s:layout> >>>>>>>> <s:VerticalLayout/> >>>>>>>> </s:layout> >>>>>>>> <fx:Script> >>>>>>>> >>>>>>>> private function loadExtStylesheet():void { >>>>>>>> styleManager.loadStyleDeclarations("styles.swf"); >>>>>>>> } >>>>>>>> >>>>>>>> </fx:Script> >>>>>>>> >>>>>>>> <fx:Declarations> >>>>>>>> <fx:String id="valueEng"> >>>>>>>> <![CDATA[Help.]]> >>>>>>>> </fx:String> >>>>>>>> </fx:Declarations> >>>>>>>> <s:Panel title="Example of text" > >>>>>>>> <s:layout> >>>>>>>> <s:VerticalLayout /> >>>>>>>> </s:layout> >>>>>>>> <s:Label text="Example of text" fontFamily="BodyCopyFont" /> >>>>>>>> <s:Label text="Example of text" /> >>>>>>>> <s:RichText id="myRT1" width="400" text="asdf"/> >>>>>>>> <s:RichEditableText width="400" text="asdf"/> >>>>>>>> </s:Panel> >>>>>>>> </s:Application> >>>>>>>> >>>>>>>> >>>>>>>> ---BEGIN styles.css----- >>>>>>>> @namespace mx "library://ns.adobe.com/flex/mx"; >>>>>>>> @namespace s "library://ns.adobe.com/flex/spark"; >>>>>>>> >>>>>>>> s|global { >>>>>>>> fontSize: 11; >>>>>>>> >>>>>>>> fontAntiAliasType: "advanced"; >>>>>>>> fontGridFitType: "subpixel"; >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>>> /* BodyCopyFont is used by spark components (cff=true) */ >>>>>>>> @font-face { >>>>>>>> src: url("../fonts/Herculanum.ttf"); >>>>>>>> embedAsCFF: true; >>>>>>>> fontFamily: BodyCopyFont; >>>>>>>> } >>>>>>>> >>>>>>>> s|Application { >>>>>>>> fontSize: 11; >>>>>>>> fontFamily: "BodyCopyFont"; >>>>>>>> fontAntiAliasType: "advanced"; >>>>>>>> fontGridFitType: "subpixel"; >>>>>>>> } >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> * >>>>>>> Regards, >>>>>>> S. Jagan Langa* *|* *Team Lead* >>>>>>> *Sybrant Technologies Pvt Ltd* >>>>>>> *-------------------------------- >>>>>>> * >>>>>>> ŒShriram The Gateway (SEZ)¹, Block A1, >>>>>>> 3rd Floor, 16 GST Road, Perungalathur, >>>>>>> Chennai - 600 063, India >>>>>>> India | USA | Germany | China >>>>>>> >>>>>>> Mobile: +91 98430 50897 >>>>>>> Skype: seesamjagan >>>>>>> >>>>> >>>>> -- >>>>> Alex Harui >>>>> Flex SDK Team >>>>> Adobe Systems, Inc. >>>>> http://blogs.adobe.com/aharui >>>>> >>>>> >>>> >> >> -- >> Alex Harui >> Flex SDK Team >> Adobe Systems, Inc. >> http://blogs.adobe.com/aharui >> >> -- Alex Harui Flex SDK Team Adobe Systems, Inc. http://blogs.adobe.com/aharui