5 Replies Latest reply on Sep 8, 2009 6:39 PM by djordan79

    PLEASE HELP!.... can't embed font in flash builder

    djordan79

      could use someone's help...

       

      trying to embed a font (no bold or ltalic) in flash builder from a catalyst file...

       

      can't figure out what i'm doing wrong... thanks

       

      sdkpreferences.jpg

      flashbuildermain.jpg

        • 1. Re: PLEASE HELP!.... can't embed font in flash builder
          jdesko Level 2

          Your font is set for the Sparks RichEditableText component, I take it that's what you want but do not see from your code if you are using that component.

           

          I am running Flash Builder Beta with latest nightly builds and I receive the same warning on Sparks components, not necessarily for RichEditableText though, but my font displays fine.

           

          If you want to check to see if your font is being embedded (without the link or copying all the code) go to the Flash Builder 4 Help, under Adobe Flex 4 Help/ Using embedded fonts/ go to the section Detecting Embedded Fonts, this shows and explains some code that you can try.

          • 2. Re: PLEASE HELP!.... can't embed font in flash builder
            djordan79 Level 1

            hey jdesko,

            not sure what that really means... i'm very new to the flex program...how do i download the spark component?...

            thanks,daniel

            • 3. Re: PLEASE HELP!.... can't embed font in flash builder
              jdesko Level 2

              hey back Daniel;

              From the warning and your code: under <Styles> in @font-face - you are embedding a font and under s|RichEditableText (font style) it is saying that in your application or modules(if any) any <s:RichEditableText> (the component - the s means it is a Sparks component) is going to use that style/embedded font. What is between <Styles> </Styles> is basically CSS. 

               

              So if you look in your code you should see (I couldn't see it from your screen shot)

              <s:RichEditableText>your text or content goes here </s:RichEditableText>

              where I have 'your text or content goes here' or anything between those two tags - that text should be using your embedded font. 

               

              The warning is saying that you are not using <s:RichEditableText> in your application, you'll have to verify that 'cause again I don't see it in your screen shot, but I'll assume you are 'cause Catalyst generated the code.  As I was saying in my earlier post, I get this warning also but with the <s:TextInput> component; I am using this component in my app and the embedded font I am using for it displays fine, so I am assuming it is an issue with the Beta of Flash Builder.

               

              So disregard your warning and run (play button icon) or debug (bug icon) your application and see if the font is being used.  If it is being used then again disregard the warning and continue on, unless someone else has a fix or we wait for the next Beta of Flash Builder.

               

              Catalyst I'm sure helps alot, I don't use it, but take the time to read Flex Help to learn what's going on in your code, it will help alot.  Also, visit http://blog.flexexamples.com/ or www.flex.org for many examples.

               

              It's been a longgggg weekend of coding and I'm tired so my apologies if it is still not understandable.

               

              John

              • 4. Re: PLEASE HELP!.... can't embed font in flash builder
                jdesko Level 2

                Hey Daniel;  I just noticed in my last rambling post that I didn't answer about how you download the spark component.  You don't, that's part of Flash Builder.  Components are your building blocks of FB.  So again what's between <Styles> <Styles> is basically CSS for styling your app.  Then essentially what you see on your screen, via your app, are the components that you are using - basically code that is written already for you to perform a certain function, for example <s:RichEditableText>Hello World<s/RichEditableText> displays "Hello World" on the screen and <Styles> tells it to display using the font that you embedded or color, size, etc., or in the code that I see <Parallel> or <Fade> are effects.  In FB there are two sets of components, Halo and Spark (distinguished by their namespace mx or s). 

                 

                Just make backups, play around, and press debug!

                 

                Again very tired so you'll have to excuse me.

                 

                John

                • 5. Re: PLEASE HELP!.... can't embed font in flash builder
                  djordan79 Level 1

                  hey jdesko,

                   

                  thanks for the replies!...

                  i'm really new to this whole flex thing so alot of what you said is kinda like greek to me ;]

                   

                  i searched "embed fonts" on flex.org...

                   

                  will this code work?

                  and is there a way for me to test locally to see if the font is actually being embedded?

                   

                  thanks

                   

                  flex[dot]org code.jpg