Problem with fonts in Qfield

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

with QGIS4 now being build against QT6 if I’m not mistaken, then this will be a more common problem now?

I’m facing this with some TTF fonts that don’t appear to be working on the QField app, after being included in the project folder in a ‘fonts’ dir.

Hello!

I created a project with geological data and additional fonts. These fonts do not apply after synchronizing via cloud. They only apply after being copied manually to the local path “…\QField\fonts”. Is there any chance for potential users with cloud access only?

Thanks a lot, Peter

I’m using iOS, sorry.

@pstock , when building a cloud project that includes additional fonts in a fonts subfolder, you must add the following setting in the project properties’ QField panel:

Thank you, that’s it! Now other users will be able to use the data, too.