1 (edited by wohali 2008-02-07 09:14:01)

Topic: Need help embedding fonts

I'm programming a chumby metronome with Macromedia Flash 8 and am nearly finished. I've got a bpm indicator (right now, a Label component, not dynamic text!) that uses a custom embedded font, which I'm programmatically specifying to be embedded via the .embedFont("True") method.

Unfortunately I'm having two issues with the font:

* The font doesn't display correctly on the chumby. I see text, but it's not my font, nor is it in bold/italic like I've specified. It also seems to exceed the size of the box. I have a sneaking suspicion it's not actually embedding correctly.
* The virtual chumby doesn't display the text at all.

I was careful not to use _root, _layer0 as described in another thread.

My questions are:

* I'm not sure exactly how to embed a font with a label. Has anyone else done this? Should I just change to dynamic text instead?
* What do I need to do to get custom fonts displaying in the virtual chumby? I know other widgets are doing this successfully. I even tried exporting as Flash 7; this didn't help.

I could just give up and use _sans or something, but I really like the idea of a custom font, and I know others have made it work.

P.S. Why is the [list] tag not working on this phpBB board?

Joan
wohali@EFNet or freenode

Re: Need help embedding fonts

I recommend that you create a MovieClip symbol in the library, set the linkage property so that it will be included in the movie even if not instantiated, and then create some empty dynamic text fields on it, one for each font and variant you're using, and set the fonts used to be embedded for each of them.  This will force the fonts to be included in the movie.

Re: Need help embedding fonts

Thanks for the fast response, Duane. I'll try this now and come back with my results.

Joan
wohali@EFNet or freenode

Re: Need help embedding fonts

Joan.

If you are changing the value of the text field, then dynamic text fields are the way to go. A label component adds extra bloat (as it uses the V2 component architecture) which you really don't need. All you need to do is set the textfield type to dynamic and then click the "Embed" button on the properties panel and decide on the character set you need (in your case in sounds like you only need 0-9).

As Duane said, there are various ways to "trick" flash into making sure the fonts are there. The other is to place a textfield somewhere off the stage which has the font / chars you want. Any other MC / textfield using that font can now use the embedded font.

Cheers,
Aran

5 (edited by wohali 2008-02-07 18:41:53)

Re: Need help embedding fonts

OK, I'm still having problems.

I changed the object to a dynamic text field (thanks, Aran!). I clicked "Embed" and selected the characters I wanted embedded. Still monospace on the Chumby itself (it's supposed to be Adobe Garamond Pro), and still no text on the virtual chumby at all.

I'm also having problems with sound playback, but I'll tinker a bit more before posting into another thread with my questions.

In case you want to have a look, the widget is here: http://www.chumby.com/xml/movies/24FB4D … 16353B0686 I'd be willing to let one or both of you look at my .fla if it'd help.

Joan
wohali@EFNet or freenode

6 (edited by gingerbeardman 2008-03-03 12:58:44)

Re: Need help embedding fonts

Did you check the box to export unused symbols with the movie?

"Export for runtime sharing"

http://i32.tinypic.com/oqcfax.png

Re: Need help embedding fonts

Embarrassing problem -- I lost the source code in an encrypted drive to which I forgot the password. I'll have to recreate the entire thing from scratch... sad

Joan
wohali@EFNet or freenode