Displaying animated fonts/icons like font-awesome in desktop apps

On a webpage (just plain HTML, not a Xojo app) I have used font-awesome to display animated icons like a spinner to show something is running.

Is there a way to display those in a desktop app?
The target needs to be MacOS, Windows and Raspberry.

If not, is there a way to display .svg files?
If that is not possible, any other way to display animated UI element.

I have seen a few forum conversations referring to displaying images using a timer, which should work, but moves to problem to getting suitable images, which is, at least for me, a problem.



You should be able to display animated gifs in the HTMLViewer.

For FontAwesome, download the fonts, and at least for Mac and Windows, there are ways to activate the fonts for the app itself.

I use FontActivate from MBS:

There are probably other ways in WFS and MacLib.

I don’t know any way for Linux, but if it is possible, I am sure others will chime in. You may be able to install fonts in the installer.

Thanks for your response. I am not sure if one can load these fonts in the OS. They seem to be particularly focussed on WEB use. Controlled via CSS.
For example on the web page I include and display a spinning icon by just including in the html text.
The fonts are located in a subdirectory in files like “fa-solid-900.woff” and “fa-solid-900.woff2”.

Could try HTMLViewer. See what happens…

@Hans van Schaick
Here you go. :wink:

I was too quick.
No icons, only one font (Free version) :frowning:
The icons are in a folder but only as svg.

RTFM :wink:

Using HTML viewer seems to be a stretch for just displaying a single rotating item. Looking at creating a few images by using the font download Paul so elegantly pointed me to.
So i can support any platform without relying on font support…

[quote=481885:@Hans van Schaick]Is there a way to display those in a desktop app?
The target needs to be MacOS, Windows and Raspberry.[/quote]
Have a look at this Thread: Using fonts in app without installing them?.

@Jürg Otter : I will have a look thanks!

For the record, the complete fonts are here:

Thanks for all your feedback. In the end I decided to use font- awesome to create images that I animate myself.
To do this I created a class AnimatedIcon as a subclass of Canvas.

See https://github.com/hvanschaick/XojoAnimatedIcon for an example project.

Any feedback is appreciated. One minor issue is the fact that the icon directories used for animation should be located in the Resource directory for een Built app. This should be automated. I do it manually for the time being. (IDE automation is a blank area for me for the time being. Docs are not very informative.)

Note that the icons in the icon directories are displayed in alphabetical order.



You could also separate frames from animated gifs and display them with a timer:

That what my little class does. So using separate frames from a gif could be used in this class as well. So the above links could be useful if one wants to decompose an existing gif. Thanks.