Link to home
Start Free TrialLog in
Avatar of msukow
msukowFlag for United States of America

asked on

Flex 3.0 embedded fonts

My bindable text fields are not displaying and I believe it is a font issue

I have a tag as follows:
<mx:Text id="lastSentenceID" text="{siteData.lastResult.page.lastSentence}"
            x="34" y="558" color="#585956" fontSize="14.81" fontFamily="Helvetica Neue" width="640" height="22" fontWeight="normal" letterSpacing="-.25"/>

I have another tag as follows:
      <mx:Text id="boldGreenQuestionID" text="{siteData.lastResult.page.boldGreenQuestion}"
            x="34" y="544" color="#768E20" fontSize="12" fontFamily="Helvetica Neue" width="640" height="22" fontWeight="bold" letterSpacing=".5"/>

The 2nd text block appears. The only difference is that the fontWeight attribute is bold for one and not the other. If I change it to bold for both it looks fine on the Mac. However, when I upload to the server to view, the type displays, but the fonts are now Times New Roman.

Initially I thought it was an XML issue, but that is not the case because I can view the text when I change the fontWeight to bold. I am using a Flash CS3 file for my fonts and a publish setting of Flash Player 9 as well as 10.

Lastly, to get it to display, I find it odd that my text tag used to be  fontFamily="Helvetica Neue", and I had to remove the space in the name. My style tag has the space between Helvetica and Neue. If I remove the space  in my style tag, I get an error. If I add a space to my text tag, the text is no longer displayed. I removed the space in the text tag above to display the text.

I have attached the CS3 flash file I used to embed the fonts. You will need to change the extension to .fla.

<mx:Style>
      @font-face {
    	src:url("supportFiles/fonts.swf");
    	fontFamily: "Helvetica Neue";
  		}
  		@font-face {
    	src:url("supportFiles/fonts.swf");
    	fontFamily: "Helvetica Neue";
    	fontStyle: italic;
  		}
  		@font-face {
    	src:url("supportFiles/fonts.swf");
    	fontFamily: "Helvetica Neue";
    	fontStyle: bold;
  		}
  		
	</mx:Style>

Open in new window

fonts.txt
ASKER CERTIFIED SOLUTION
Avatar of msukow
msukow
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial