I have binary and all resolved Qt dependencies packaged in tar.gz. I am using next yaml file for snap:
name: sample_name_lol_1 base: core18 version: '1.0.0' summary: sample_summary_lol_2 description: | sample_desc_lol_3 grade: devel confinement: devmode parts: sample_name_lol_1: plugin: dump source: MyApp.tar.gz stage-packages: [ ffmpeg, x264, x265, libopencv-core-dev, libopencv-imgproc-dev, libopencv-calib3d-dev, libblas-dev, liblapack-dev, libfontconfig1-dev, fonts-freefont-ttf, ttf-ubuntu-font-family ] apps: MyApp: command: MyApp environment: LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/x86_64-linux-gnu/blas:$SNAP/usr/lib/x86_64-linux-gnu/lapack
Normal application run (say from regular unpacking tar.gz) would give me information about all fonts available on the system. However snap run (sample_name_lol_1.MyApp) won't see system fonts, only few of them (only 3 to be precise - sans, sans-serif, monospace). I found path after installation, /snap/sample_name_lol_1/x1/usr/share/fonts and /snap/sample_name_lol_1/x1/etc/fonts. Those places are read-only and I can't figure out, what exactly should be done, so Qt application will able to see at lease standard Ubuntu font.