Hello,
I tried to copy fonts to a QGIS-project but it does not work on my mobile devices. I created a folder named ‘fonts’ in the directory of the QGIS-project. No effect. Copying the fonts to the Android/data-folder on my mobile devices is also not working. The fonts are in ttf-format. So I changed the fonts in my QGIS-project to Roboto but this is also not working, I thought that Roboto is the standard font type on Android devices?
Can anyone help me?
Imported from GitHub discussion by @komakeks on 2024-07-08T09:19:38Z
komakeks , can you share your project (or at least a reduced sample project with fonts)? More details on your Android device would help too.
Imported from GitHub comment by @nirvn on 2024-07-08T09:22:34Z
Thanks. First device is a Galaxy S10 with Android 11, second device is a Galaxy Tab Active3 with Android 14.
Imported from GitHub comment by @komakeks on 2024-07-08T09:29:06Z
komakeks , I don’t see your fonts folder in there. Please attach the project you’re trying to view with the fonts in-place.
Imported from GitHub comment by @nirvn on 2024-07-08T09:30:16Z
Done.
Imported from GitHub comment by @komakeks on 2024-07-08T09:34:08Z
komakeks , hm, I think this problem might linger until QGIS is built against Qt6. I did a bit of debugging, and long story short here is that the font loaded on Android has a different family name than the one in QGIS.
You might be able to ‘fix it’ by having a static data-defined property using the Android-loaded font family name: ‘Open Sans Condensed’ (vs. ‘Open Sans Condensed ExtraBold’ on QGIS).
Imported from GitHub comment by @nirvn on 2024-07-08T12:37:31Z
nirvn Thank you very much! Static property works for me in this case. I will try other fonts, but generally this isn’t so easy as told in the Qfield-manual…
Imported from GitHub comment by @komakeks on 2024-07-09T05:36:43Z