Is CSS3 @font-face somehow supported? I’d like to make use of WebFonts like FontAwesome and others in order to reduce traffic by not using pictures.
I’m using Google Web Fonts in my apps but I have not tried (a)font-face.
Should be doable and I’m to interested in a solution!
Maybe I should add a feature request to allow setting CSS styles like in the WebSDK. There are so many other things one could do.
PageSource might be worth a try…
PageSource loads these things too late. Use App.HTMLHeader for things like this.
Excellent, thank you Greg!
Where do I need to put my own style.css files (and other resources) so I can refer to in App.HTMLHeader?
You’ll need to put them somewhere outside of your web app that Apache can get to through a regular URL.
@Alex von Siebenthal ,
If You get this working I’d love to see your implementation if you’re willing to share!
It works, yep. Will share for sure. However, there are still some barriers within the framework to make it work nicely
Web Custom Controls allows you to set CSS properties at runtime. WebStyleExt allows you to change CSS properties on both controls and WebStyles. And WebStyleTD is a new CSS class with additional features over WebStyle.
With these you can also dynamically load and use Google fonts at runtime entirely from Xojo code. You should be able to load and use other web fonts. If you would like me to test a particular service or font, let me know.
i have been testing with font-face in my desktop application with both ttf file on the web and also include in the application. I used w2html2pdf to generate html to pdf and it seem to work only on Mac machine and not on the Window machine.
Just make sure that the fonts you use are licensed for use on the web.
Greg, are you referring to the Xojo web edition
See the links I posted above. These are specifically provided for web use.
No. I’m speaking strictly about the Fonts themselves. For instance, I think you mentioned Truetype fonts. Most of them are licensed for desktop use only.
I know what you mean. The respective licences for the fonts are listed on those sites, mostly CC…
but for my purpose, it is for desktop use anyway… and free.