revery-ui / revery

:zap: Native, high-performance, cross-platform desktop apps - built with Reason!
https://www.outrunlabs.com/revery/
MIT License
8.06k stars 196 forks source link

esy '@examples' run output has no text (Revery.FontCache: Error loading typeface (skia)) #1016

Closed jericdeleon closed 3 years ago

jericdeleon commented 3 years ago

Tried to follow the Building and Installing steps using a plain vagrant box with archlinux/archlinux, was able to build successfully. However, esy '@examples' run shows no text. The UI elements work (can be clicked, dragged, etc), it's just that there's no text.

There is a relevant warning log, but this was not mentioned in the build doc / any other issue :

[WARN]  [ 0.085s] Revery.FontCache : Error loading typeface (skia)

Did I miss any step? I'd like to help investigate, but this is new territory for me; any tips on where to start?

error01 error02 error03

vagrant in ~ at archlinux ➜ sudo pacman -Syu base base-devel libpng libxcursor libxi libxinerama libxrandr harfbuzz glu gtk3 fontconfig nasm clang
:: Synchronizing package databases... core is up to date extra is up to date community 5.2 MiB 1709 KiB/s 00:03 [###############################################################] 100% warning: base-2-2 is up to date -- reinstalling :: There are 24 members in group base-devel: :: Repository core 1) autoconf 2) automake 3) binutils 4) bison 5) fakeroot 6) file 7) findutils 8) flex 9) gawk 10) gcc 11) gettext 12) grep 13) groff 14) gzip 15) libtool 16) m4 17) make 18) pacman 19) patch 20) pkgconf 21) sed 22) sudo 23) texinfo 24) which

Enter a selection (default=all): warning: autoconf-2.69-7 is up to date -- reinstalling warning: automake-1.16.2-3 is up to date -- reinstalling warning: binutils-2.35.1-1 is up to date -- reinstalling warning: bison-3.7.2-1 is up to date -- reinstalling warning: fakeroot-1.25.3-1 is up to date -- reinstalling warning: file-5.39-1 is up to date -- reinstalling warning: findutils-4.7.0-2 is up to date -- reinstalling warning: flex-2.6.4-3 is up to date -- reinstalling warning: gawk-5.1.0-1 is up to date -- reinstalling warning: gcc-10.2.0-3 is up to date -- reinstalling warning: gettext-0.21-1 is up to date -- reinstalling warning: grep-3.5-1 is up to date -- reinstalling warning: groff-1.22.4-3 is up to date -- reinstalling warning: gzip-1.10-3 is up to date -- reinstalling warning: libtool-2.4.6+42+gb88cebd5-14 is up to date -- reinstalling warning: m4-1.4.18-3 is up to date -- reinstalling warning: make-4.3-3 is up to date -- reinstalling warning: pacman-5.2.2-1 is up to date -- reinstalling warning: patch-2.7.6-8 is up to date -- reinstalling warning: pkgconf-1.7.3-1 is up to date -- reinstalling warning: sed-4.8-1 is up to date -- reinstalling warning: sudo-1.9.3.p1-1 is up to date -- reinstalling warning: texinfo-6.7-3 is up to date -- reinstalling warning: which-2.21-5 is up to date -- reinstalling warning: libpng-1.6.37-3 is up to date -- reinstalling warning: libxcursor-1.2.0-2 is up to date -- reinstalling warning: libxi-1.7.10-3 is up to date -- reinstalling warning: libxinerama-1.1.4-3 is up to date -- reinstalling warning: libxrandr-1.5.2-3 is up to date -- reinstalling warning: harfbuzz-2.7.2-1 is up to date -- reinstalling warning: glu-9.0.1-2 is up to date -- reinstalling warning: gtk3-1:3.24.23-4 is up to date -- reinstalling warning: fontconfig-2:2.13.91+48+gfcb0420-2 is up to date -- reinstalling warning: nasm-2.15.05-1 is up to date -- reinstalling warning: clang-10.0.1-1 is up to date -- reinstalling :: Starting full system upgrade... resolving dependencies... looking for conflicting packages...

Packages (37) fzf-0.24.3-1 autoconf-2.69-7 automake-1.16.2-3 base-2-2 binutils-2.35.1-1 bison-3.7.2-1 clang-10.0.1-1 fakeroot-1.25.3-1 file-5.39-1 findutils-4.7.0-2 flex-2.6.4-3 fontconfig-2:2.13.91+48+gfcb0420-2 gawk-5.1.0-1 gcc-10.2.0-3 gettext-0.21-1 glu-9.0.1-2 grep-3.5-1 groff-1.22.4-3 gtk3-1:3.24.23-4 gzip-1.10-3 harfbuzz-2.7.2-1 libpng-1.6.37-3 libtool-2.4.6+42+gb88cebd5-14 libxcursor-1.2.0-2 libxi-1.7.10-3 libxinerama-1.1.4-3 libxrandr-1.5.2-3 m4-1.4.18-3 make-4.3-3 nasm-2.15.05-1 pacman-5.2.2-1 patch-2.7.6-8 pkgconf-1.7.3-1 sed-4.8-1 sudo-1.9.3.p1-1 texinfo-6.7-3 which-2.21-5

Total Download Size: 1.01 MiB Total Installed Size: 486.71 MiB Net Upgrade Size: 0.00 MiB

lessp commented 3 years ago

Thanks for reporting @jericdeleon! @zbaylin and probably @EduardoRFS might have some ideas 🙂

zbaylin commented 3 years ago

Hi @jericdeleon! Sorry you're having this issue. Our default font on Linux is Liberation Sans, as seen here: https://github.com/revery-ui/revery/blob/833d86dfc8b718441702b23e9d73a4a84c7154cf/src/Font/FontFamily.re#L84

That error can pop up if you don't have that font installed. Choosing a default font on Linux is tricky, since there are no guarantees with regards to what's included by each distro.

Does installing Liberation Sans help? If not, let me know and we can try to debug further!

jericdeleon commented 3 years ago

Installing the font worked, thanks a lot @zbaylin! Thanks @lessp for the relay!

If something like this should be included in the Arch part of the build guide, just say the word and I'll include a quick PR, if not then I'll just leave this here for reference:

sudo pacman -S ttf-liberation
lessp commented 3 years ago

Closing with the following comments:

Regarding default font on Linux (@zbaylin)

That error can pop up if you don't have that font installed. Choosing a default font on Linux is tricky, since there are no guarantees with regards to what's included by each distro.

To install current default font (@jericdeleon)

sudo pacman -S ttf-liberation