Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › Icons

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #22400

    Tim
    #22401

    Alex
    Felgo Team

    Hi Tim,

    you can load the FontAwesome 5 icon font with a FontLoader. Then you have 2 options:

    • Set a custom font for the Icon item, using the textItem.font.family property of the Icon
    • Change the global icon font of the theme using Theme.iconFont = yourLoadedFont

    Since the default icon font is FontAwesome 4, most of the IconType identifiers will also work with FontAwesome 5, and for the rest you can use the unicodes like you provided, e.g. “\uf554”.

    Cheers,
    Alex

    #22402

    Tim

    Thanks Alex!

    For the life of me I cannot find the url for the FontAwesome 5 icon font.  Do you have that handy?

    Thanks,

    Tim

    #22405

    Tim

    Hi Alex,

    I decided to download the fonts locally but it’s not working for me.  All my fonts are blank so I must be doing something wrong.  I copied the webfonts folder from the download (which has fa-brands, fa-regular, and fa-solid) and put it in my assets folder.  Then, on my main page in the App function I added:

    FontLoader {
    id: walkIcon
    source: “../../assets/webfonts/fa-regular-400.ttf”
    }

    In the onInitTheme: I added:

    Theme.iconFont = walkIcon

    Now all my previous icons are now all blank.  Thanks for looking at this.

    #22407

    Alex
    Felgo Team

    Hi,

    if the FontLoader is placed in your Main.qml file, then your path to the font is wrong, it will only need 1 “../” to leave the qml folder.

    Could this be the issue?

    Cheers,
    Alex

    #22415

    Tim

    I thought of that after I posted and tried it as “../” but it still didn’t work.  I think the problem was I was still trying to use IconType.# . I changed it to “\uf1b0” and it still didn’t work in the Felgo Live run but when I connected with my iPhone it did display correctly.  How do I get it to work in Felgo Live?

    Thanks!

    #22526

    Alex
    Felgo Team

    Hi Tim,

    we do not have reports of any differences between live and normal deployment in combination with custom fonts. We are also using it in a couple of customer apps without issues. You can send us the project as zip archive to support@felgo.com and we can have a quick look if there is any obvious issue.

    Cheers,
    Alex

Viewing 7 posts - 1 through 7 (of 7 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded