6 Replies Latest reply on Nov 15, 2011 11:41 AM by Jason Woodcock

    Embedded font on Spark Button

    gkcohen Level 1

      I am using an embedded font for all spark labels. It works fine.

       

      However, the font is not applied to the button label. If I switch the font to Comic Sans MS then the font is used on the button.

       

      I can't figure out why this particular embedded font works in all labels, except the button label.

       

      Any help would be greatly appreciated.

       

      gkx

        • 1. Re: Embedded font on Spark Button
          gkcohen Level 1

          Does anyone have any suggestions?

           

          Thank you!

           

          gkc

          • 2. Re: Embedded font on Spark Button
            Flex harUI Adobe Employee

            Does the button have the same fontWeight and fontStyle as the Label?

            • 3. Re: Embedded font on Spark Button
              gkcohen Level 1

              Flex harUI, thank you for your response.

               

              I don't have either of those properties set for the label or the button.

               

              This is all I have:

               

              s|Label {

                                  fontFamily: "HelveticaNeue67_";

                                  color: #FFFFFF;

              }

              • 4. Re: Embedded font on Spark Button
                robglobal

                You most likely need to set fontWeight and fontStyle:

                 

                fontWeight: normal;

                fontStyle: normal;

                 

                Some fonts will work when these properties are not set, meaning the font family only has one typeface of glyphs embedded. But if the font supports bold/italic, you need to specify these settings in the css.

                • 5. Re: Embedded font on Spark Button
                  gkcohen Level 1

                  robglobal, that was it!

                   

                  Thank you, and Flex harUI for your help.

                  • 6. Re: Embedded font on Spark Button
                    Jason Woodcock

                    I'm seconding Robs reply here... I had a very similar issue and ended up having to set the fontWeight and fontStyle to match the embedded font. In my case it was normal and normal using a Futura family font.

                     

                    So, my overall embed was:

                     

                     

                    @font-face {

                                                  src: url("assets/fonts/Futura_Book_BT.ttf");

                                                  fontFamily: "FuturaCFF";

                                                  embedAsCFF: true;

                                        }

                     

                                        @font-face {

                                                  src: url("assets/fonts/Futura_Book_BT.ttf");

                                                  fontFamily: "Futura";

                                                  embedAsCFF: false;

                                        }

                     

                     

                    Then my buttons looked like

                     

                     

                    <s:Button fontFamily="Futura"  fontWeight="normal" label="Select"  click="hubSelectionHandler(event)" />