Uno-Platform: Default FontFamily not available for WASM deployment? - uno-platform

I have built and tested my uno-platform WASM app (yea!) and, like Android and UWP, the default FontFamily for all text is a san-serif font (I'm guessing it's Segoe UI).
I am very happy with this as a default.
Unfortunately, when I then test deploy the contents of my WASM app's bin/Release/netstard2.0/dis folder by using Apache on my Mac, all the text is rendered using Times New Roman (and all of the FontIcons using SegoeMdl2 are not rendered.
EDIT: Looks like everything is fine when I view the WASM app on a PC (when served from a Mac) - so perhaps the WASM can't find the Segoe fonts? Are additional steps required to assure the Segoe fonts are packaged with a WASM app ... or is all this because of font licensing?

To answer this question, I followed this post from Martin Zikmund, using Segoe fonts found here.
That fixed the technical issue.
Looking at Segoe license, looks like it can get expensive quickly - which likely explains why it wasn't packaged in Uno by default.

Related

Change fonts in Qt application on Windows10

I installed qt5 application (Mendeley Desktop) from here by using the instraller on windows10, and I don't like the default font; MS Gothic.
Is there some ways to change fonts in a qt5 application which I didn't build from source code?
Thanks in advance!
If they bundled the font into the application binary (via QRC), I'm afraid you can't.
Otherwise, you can check in the application installation folders if by any chance the font is loaded at runtime. In that case you just need to replace it (by keeping the original name) with your preferred one.
Same thing if they use the system font, but that would compromise all the other apps using MS Gothic.

TestApplication with Qt5.9 and embedded linux on Raspberry Pi 3

Setting up Qt5.9 on my RaspberryPi3 with raspbian-lite version of image.
Next compile test application qtbase/examples/opengl/qopenglwidget
With run I can see next message
QFontDatabase: Cannot find font directory /usr/local/qt5pi/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
Application was running, but there is no any text.
I want to use standard fonts, but I don't now how I can do it.
OR, How to use FREE-Types from http://dejavu-fonts.org.
Please help me, somebody
I found right answer. It was very simple:
You must add any font (*.ttf) in-to directory /usr/local/qt5pi/lib/fonts on raspberryPi. For example, I use free fonts from
http://dejavu-fonts.org.

Testing font support in Chrome?

Is there a way to preview what a given site would look like without using any system built-in fonts?
I'm currently making a website which uses Roboto Mono and Open Sans, but these fonts are installed on my local system. I'm loading these fonts from Google Fonts CDN, but it seems to not load the fonts it detects that I have locally installed.
Is there a way to preview a page without using any local fonts resident on the host system?
I would suggest renaming these fonts in your local system temporarily.

Font and icons not appearing on Windows phones only

I'm using phonegap 3.0 for create a application on android, iOS, and Windows phone. I use a custom font-face for my text and for icons. But when viewed in Windows Phone 8, the font and the icons won't appear on the application.
I have tried loading the fonts after the device ready event; using a .woff font; loading from an external source - nothing works. How could I solve this?
I heard about this problem before, apparently there is an issue present in Windows Phone 8 that prevents custom font-faces from working when html/css are hosted locally. Could you try and host the html/css files externally? Just to see if it makes a difference. I think this is a bug in the current WebBrowser control that's used on WP8
EDIT: See this StackOverflow questions and answers about a similar problem
you can transform the file to base64, using one of the services around (e.g. this one,
and add url like this:
src: url(data:application/x-font-woff;charset=utf-8;base64, AAEAAAALAIAAAwAwT1MvMg6SAy8AAAC8AAAAYGNtYXAa.....)

Qt: Safe Fonts for Cross Platform Desktop App

Just a thought: is there any resource somewhere with a list "safe-fonts" for a cross platform desktop Qt app that needs to run on windows, Mac and Linux (Ubuntu 10.* for instance).
and while we're on the subject, is there any way to "package" a font with the executable as part of the resources and have it run seamlessly in all three platforms?
I've never tried it but I think you can use addApplicationFont to load a font from a file. The file can be part of your app's resource.

Resources