You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by WelshAndy <an...@eazyweb.net> on 2015/04/19 17:03:40 UTC

FontAwesome and Flex 4.14

Hi,
Im trying to get FontAwesome icons working with buttons in my Flex project,
but having no luck at all. Ive tried all sorts of fixes but only see
fontawesome icons on labels. Its doing my head in, web searches throw up
nothing on this, and its got me beat. If anyone can shed any light on this,
Im eternally grateful...

I do the following:

In the <s:View I have this:
xmlns:components=&quot;flatspark.components.*&quot;

in the &lt;fx:Script I have this:
import flatspark.components.ButtonIcon;
import flatspark.skins.ButtonIconSkin;
import flatspark.utils.AwesomeUtils;

and then this in the main mxml part I have the default code from CWiki:
&lt;components:ButtonIcon iconFont=&quot;{AwesomeUtils.fa_info_circle}&quot;
height=&quot;{ButtonSizeEnum.Large}&quot; label=&quot;Icon see
anything&quot;/>

Instead of a symbol, that just shows me a square with a cross in it (the
broken char symbol)
What am I missing please?

many thanks for any clues!




--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FontAwesome-and-Flex-4-14-tp46092.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: FontAwesome and Flex 4.14

Posted by WelshAndy <an...@eazyweb.net>.
That was it! Thanks so much. I checked the settings for embedAsCFF and set
the fontWeight to bold, and sure enough it now works on external devices.
Thanks Alex, thats been bugging me for a couple of weeks!



--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FontAwesome-and-Flex-4-14-tp46092p46134.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: FontAwesome and Flex 4.14

Posted by Alex Harui <ah...@adobe.com>.

On 4/20/15, 12:56 PM, "WelshAndy" <an...@eazyweb.net> wrote:

>Thanks. Yes, I selected the font support & that seemed to install okay. I
>see
>Flatspark buttons, and I see Fontawesome icons on labels, but I dont see
>the
>FontAwesome icons on buttons, using the code above, outside of the AIR
>simulator. Im using 4.14. Should I update to the 4.14.1 maybe?
>

I don’t think anything was changed in that regard in 4.14.1.

I couldn’t tell from your code what embeds the font, but there are a
couple of factors to consider:

1) In mobile apps, Labels use CFF fonts, but everything else doesn’t.
2) In many themes, Buttons use Bold fonts and Labels don’t.

If you don’t have the right font embedded (CFF vs non-CFF, bold vs
regular), you won’t get the expected result.

-Alex


Re: FontAwesome and Flex 4.14

Posted by WelshAndy <an...@eazyweb.net>.
Thanks. Yes, I selected the font support & that seemed to install okay. I see
Flatspark buttons, and I see Fontawesome icons on labels, but I dont see the
FontAwesome icons on buttons, using the code above, outside of the AIR
simulator. Im using 4.14. Should I update to the 4.14.1 maybe? 




--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FontAwesome-and-Flex-4-14-tp46092p46129.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: FontAwesome and Flex 4.14

Posted by Alex Harui <ah...@adobe.com>.
When you installed Flex 4.14, did you select the option to install the
embedded font support?

-Alex

On 4/20/15, 11:57 AM, "WelshAndy" <an...@eazyweb.net> wrote:

>hmm... apparently that only fixed it on the AIR Simulator. Just tried it
>on 2
>Android devices and still get the broken symbol (square with a cross) with
>no FontAwesome icon, so no fix yet.
>
>Do I need to manually add something / swc / font / package to the
>compilation stage perhaps?
>
>Thanks for any advice.
>
>
>
>
>
>--
>View this message in context:
>http://apache-flex-development.2333347.n4.nabble.com/FontAwesome-and-Flex-
>4-14-tp46092p46123.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: FontAwesome and Flex 4.14

Posted by WelshAndy <an...@eazyweb.net>.
hmm... apparently that only fixed it on the AIR Simulator. Just tried it on 2
Android devices and still get the broken symbol (square with a cross) with
no FontAwesome icon, so no fix yet. 

Do I need to manually add something / swc / font / package to the
compilation stage perhaps?

Thanks for any advice.





--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FontAwesome-and-Flex-4-14-tp46092p46123.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: FontAwesome and Flex 4.14

Posted by aYo ~ <ay...@binitie.com>.
Ok nice one, but deeply weird solution. Absolute strangeness.

aYo
mrbinitie.blogspot.com
ayobinitie.com
On 19 Apr 2015 19:58, "WelshAndy" <an...@eazyweb.net> wrote:

> Solved, though not sure why! I include it here for completness, in the hope
> it may help someone else.
>
> I gave up trying to get the icons displaying and went ahead and created
> PNGs, then added the first of them using the icon tag of ButtonIcon
> (icon="assets/icons/ico1.png") leaving the FontAwesome assignment still
> there under iconFont. When I went to test it, the original FontAwesome icon
> was displaying instead of my icon :D
>
> No idea what was causing that, but now it works so Ill take it!
>
>
>
>
>
> --
> View this message in context:
> http://apache-flex-development.2333347.n4.nabble.com/FontAwesome-and-Flex-4-14-tp46092p46097.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.
>

Re: FontAwesome and Flex 4.14

Posted by WelshAndy <an...@eazyweb.net>.
Solved, though not sure why! I include it here for completness, in the hope
it may help someone else.

I gave up trying to get the icons displaying and went ahead and created
PNGs, then added the first of them using the icon tag of ButtonIcon
(icon="assets/icons/ico1.png") leaving the FontAwesome assignment still
there under iconFont. When I went to test it, the original FontAwesome icon
was displaying instead of my icon :D

No idea what was causing that, but now it works so Ill take it!





--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FontAwesome-and-Flex-4-14-tp46092p46097.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.