Problem embedding fonts

Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default Problem embedding fonts

    Hi,

    I followed step by step instruction on font embedding. I use this in my CSS.

    @font-face {
    src: url("copacetix.ttf");
    fontFamily: myFont;
    }

    I try to apply this font to each button like this (in CSS):

    Button{
    fontFamily: myFont;
    }

    but my button gets displayed with "Times New Roman".

    Any hint?

    -c.

    CesareRocchi Guest

  2. Similar Questions and Discussions

    1. Embedding Fonts
      This seems to be my problem also. I need to produce Press Quality pdf and I have tried doing it as a printer driver directly in my graphics app. I...
    2. embedding fonts in movie
      I need to create a flash movie that has multiple fonts. The problem is I don't want to download all the fonts with the movie every time. I was...
    3. Fonts not embedding
      Just started working in XP, and even though I have certain Fonts in my system, the Distiller (6) doesn't read them in the fonts list. Why is this?...
    4. embedding fonts...
      so im building a flash site and i have certain fonts that I use, but I realized that on most computers they wont see these fonts, I was wondering...
    5. Embedding Fonts (k)
      I'm trying to embed a couple of fonts in Director. I'm using Mac OS 10.2.6 and Director MX. I've installed the fonts in my system(Macintosh HD >...
  3. #2

    Default Re: Problem embedding fonts

    CesareRocchi,

    Two options:
    1) Embed the bold font face as well (Button labels are bold by default)
    2) Set the Button label's fontWeight style to normal)

    Something like:
    a)
    @font-face {
    src: url("copacetix.ttf");
    fontFamily: myFont;
    fontWeight: bold;
    }

    or
    b)
    Button{
    fontFamily: myFont;
    fontWeight: normal;
    }

    Hope that helps,
    Peter

    peterd_mm Guest

  4. #3

    Default Re: Problem embedding fonts

    tried both. no way. my buttons are without label and my linkbar shows just '-' separators.
    CesareRocchi Guest

  5. #4

    Default Re: Problem embedding fonts

    How about this?

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

    <mx:Style>
    @font-face {
    src: url("copacetix.ttf");
    fontFamily: myFont;
    }

    Button{
    fontFamily: myFont;
    fontWeight: normal;
    fontSize: 18;
    }

    Label {
    fontFamily: myFont;
    fontSize: 18;
    }
    </mx:Style>

    <mx:Label text="Copacetix" />
    <mx:Button label="Copa! regular" />

    </mx:Application>

    peterd_mm Guest

  6. #5

    Default Re: Problem embedding fonts

    Hi,
    I may have a related problem on font embedding

    I reduced my code to the attached test.
    In this font Futura applies on the label and button. The linkbar items
    disappears
    If I comment CSS Button definition, linkBar items are visible but font Futura
    is not applied on them, as it is applied correctly on the independant Label.
    After all test, I couldn't have my embedded font applied to the LinkBar. I'm
    missing something ?

    Would appreciate a LOT any help on this. I'm lost :)

    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Style>
    LinkBar{
    embedFonts: true;
    fontFamily: Futura;
    fontWeight: normal;
    fontSize:14;
    color:#FFFFFF;
    }
    Label {
    fontFamily: Futura;
    fontSize:14;
    color:#FFFFFF;
    }
    Button{
    fontFamily: Futura;
    fontSize:12;
    fontWeight: normal;
    color:#FFFFFF;
    }
    @font-face {
    src:url("assets/Fu.ttf");
    fontWeight: normal;
    fontFamily: Futura;
    }
    </mx:Style>
    <mx:VBox>
    <mx:LinkBar textAlign="right" direction="vertical" separatorWidth="0"
    dataProvider="{dp}"
    alpha="0.0" width="100%" horizontalAlign="right" >
    </mx:LinkBar>
    <mx:Label text="font test three - working">

    </mx:Label>
    <mx:Button label="button font test">

    </mx:Button>
    </mx:VBox>

    <mx:Array id="dp">
    <mx:Object label="font test one - not ok"/>
    <mx:Object label="test font two - not ok"/>
    </mx:Array>
    </mx:Application>

    Danjor23 Guest

  7. #6

    Default Re: Problem embedding fonts

    I solved. I forgot to specify which glyphs to embed. now it is working, though
    I has some problems with Candara font, which froze the Flex builder. Then I
    changed to another font, and everything went fine.

    CesareRocchi Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139