[FMX] Embed fonts for ComboBox

How do I Embed fonts for a ComboBox?

I found out that I had to do it with the bolean Style.embedFonts = true;

But after I added, that to my code the comboboxes became very small in height? and the content disapear

[font=Arial]

[/font]
[font=Arial][/font]
[font=Arial]embedFonts will embed only the fonts that are declared in fontFamily.[/font]
[font=Arial][/font]
[font=Arial]like:[/font]
[font=Arial]_global.style.setStyle(“embedFonts”, true);
_global.style.setStyle(“fontFamily”, “verdana”);[/font]

Hi Pietertje,

Thanks for your reply. How does that work with Pixelfonts? I have FFF Business that I want to use.

Thanks in advance

don’t know sure, but if you add a new font (the FFF B…) to your library
and then just add the code(or change it only for the combobox):
_global.style.setStyle(“embedFonts”, true);
_global.style.setStyle(“fontFamily”, “FFF Business”);

Do you mean that when I have a font in the library with let’s say the name comboFont the code should look like:
[color=red]_global.style.setStyle(“fontFamily”, “comboFont”);[/color]

I don’t think I’ve ever seen setStyle before :-/ And I couldn’t find it in the AS dictionary either. Maybe you meant setStyleFormat? http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary238.html (apparently there’s a chapter concerning Components color and font somewhere :))

I tried the globalStyleFormat as you suggested Ilyas, but without result.I also had a look add the Macromedia site but counln’t find anything back about globalStyleFormat in relation to embedFonts. Any other sugestions?

just like this i think:

_global.styles.ComboBox.setStyle(“embedFonts”,true);
_global.styles.ComboBox.setStyle(“fontFamily”,“FFF Business”);

and check: http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004&file=00002145.html

Ever got this one figured out??

Got the same problem just for a TextArea, would assume the method inr esolving this is the same, so please if you figured it out, share :slight_smile:

Hi,

I presume that you have MX and there is a simple way to embed the font into the comboBox in Flash MX:
[font=Verdana][size=2][color=black][color=black][font=Verdana][/font][/color][/color][/size][/font]
[list]
[][font=Verdana][size=2][color=black][font=Verdana]Open the library and locate Flash UI Components/Component Skins/FLabel.[/font][/color][/size][/font] [font=Verdana][size=2][color=black][font=Verdana]Edit this label and embed the font [/font][/color][/size][/font]
[
][font=Verdana][size=2][color=black][font=Verdana]While still in editing mode, click on the “transform panel” and reset the size of this textfield to be 100%x100%.[/font][/color][/size][/font]
[*][font=Verdana][size=2][color=black][font=Verdana]Ensure that you position the comboBox on the whole pixel.[/font][/color][/size][/font]
[/list][color=black]goodluck[/color]