revery-ui / revery

:zap: Native, high-performance, cross-platform desktop apps - built with Reason!

Home Page:https://www.outrunlabs.com/revery/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

jericdeleon opened this issue · comments

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?

  • Steps to reproduce:

    1. Using an archlinux/archlinux vagrant box (or any Arch Linux machine, updated to latest), follow the building and installing instructions
  • Expected Result: esy '@examples' run will render with text

  • Actual Result: esy '@examples' run renders, but there is no text:

error01
error02
error03

  • CLI logs:
revery on  master
➜ esy '@examples' run
Done: 0/0 (jobs: 0)Hello from example app
[1, 2, 3]
[DEBUG] [ 0.000s] Revery.Core.Window : Starting window creation...
[INFO]  [ 0.000s] Revery.Core.Window : Display count: 1
[INFO]  [ 0.000s] Revery.Core.Window : Display 0:VGA-1 - pixelFormat: SDL_PIXELFORMAT_RGB888 width: 512 height: 384 refreshRate: 30 Bounds: x: 0 y: 0 width: 1024 height: 768
[INFO]  [ 0.000s] Revery.Core.Window : Creating window Welcome to Revery! width: 800 height: 480
[INFO]  [ 0.018s] Revery.Core.Window : Window created successfully.
[DEBUG] [ 0.018s] Revery.Core.Window : - Id: 2
[DEBUG] [ 0.019s] Revery.Core.Window : - PixelFormat: SDL_PIXELFORMAT_RGB888
[DEBUG] [ 0.019s] Revery.Core.Window : Setting window context
[DEBUG] [ 0.026s] Revery.Core.Window : GL setup. Checking GL version...
[DEBUG] [ 0.026s] Revery.Core.Window : Checking GL vendor...
[DEBUG] [ 0.026s] Revery.Core.Window : Checking GL shading language version...
[INFO]  [ 0.026s] Revery.Core.Window : OpenGL hardware info:
[INFO]  [ 0.026s] Revery.Core.Window :   renderer: llvmpipe (LLVM 10.0.1, 256 bits)
[INFO]  [ 0.026s] Revery.Core.Window :   version: 3.1 Mesa 20.2.1
[INFO]  [ 0.026s] Revery.Core.Window :   vendor: Mesa/X.org
[INFO]  [ 0.026s] Revery.Core.Window :   shadingLanguageVersion: 1.40
[DEBUG] [ 0.026s] Revery.Core.Window : Loading icon from: /home/vagrant/revery/_esy/examples/store/i/revery-a4f16d89/bin/revery-icon.png
[DEBUG] [ 0.027s] Revery.Core.Window : Icon loaded successfully.
[DEBUG] [ 0.027s] Revery.Core.Window : Icon set successfully.
[DEBUG] [ 0.027s] Revery.Core.Window : Getting window metrics
[DEBUG] [ 0.027s] Revery.Core.Window : Metrics: { scaledSize = { width = 800; height = 480 };
  unscaledSize = { width = 800; height = 480 };
  framebufferSize = { width = 800; height = 480 }; devicePixelRatio = 1.;
  scaleFactor = 1.; zoom = 1.; isDirty = false }
[INFO]  [ 0.030s] Revery.Core.Window : Using vsync: Synchronized
[INFO]  [ 0.072s] Revery.App : Operating in locale : en_US.UTF-8
Moved: 530 x 56
Size changed: 461 x 679
Focus gained
[DEBUG] [ 0.073s] Revery.App : Running Gtk iteration
[INFO]  [ 0.077s] Revery.IO.Image : Loading from path: /home/vagrant/revery/_esy/examples/store/i/revery-a4f16d89/bin/outrun-logo.png
[INFO]  [ 0.077s] Revery.IO.Image : Got data.
[DEBUG] [ 0.077s] Revery.CanvasContext : Native interface created successfully.
[INFO]  [ 0.077s] Revery.CanvasContext : Creating Skia context...
[DEBUG] [ 0.078s] Revery.CanvasContext : Skia context created successfully.
[DEBUG] [ 0.078s] Revery.CanvasContext : Framebuffer binding 0.
[INFO]  [ 0.078s] Revery.CanvasContext : Successfully created canvas: 461x679
[WARN]  [ 0.085s] Revery.FontCache : Error loading typeface (skia)
[DEBUG] [ 0.124s] Revery.App : Running Gtk iteration
[DEBUG] [ 0.139s] Revery.App : Running Gtk iteration
[DEBUG] [ 0.144s] Revery.App : Running Gtk iteration
[DEBUG] [ 0.152s] Revery.App : Running Gtk iteration
[DEBUG] [ 0.159s] Revery.App : Running Gtk iteration
[DEBUG] [ 0.163s] Revery.App : Running Gtk iteration
[DEBUG] [ 0.169s] Revery.App : Running Gtk iteration
[DEBUG] [ 4.347s] Revery.App : Running Gtk iteration
[DEBUG] [ 4.381s] Revery.App : Running Gtk iteration
Focus lost
[DEBUG] [ 4.662s] Revery.App : Running Gtk iteration
[DEBUG] [ 4.696s] Revery.App : Running Gtk iteration
12[DEBUG] [ 7.835s] Revery.App : Running Gtk iteration
Moved: 33 x 56
Size changed: 958 x 679
Focus gained
[INFO]  [ 8.216s] Revery.CanvasContext : Resizing canvas: 461x679->958x679
[DEBUG] [ 8.216s] Revery.CanvasContext : Native interface created successfully.
[INFO]  [ 8.217s] Revery.CanvasContext : Creating Skia context...
[DEBUG] [ 8.217s] Revery.CanvasContext : Skia context created successfully.
[DEBUG] [ 8.217s] Revery.CanvasContext : Framebuffer binding 0.
[INFO]  [ 8.217s] Revery.CanvasContext : Successfully created canvas: 958x679
Focus lost
  • Operating System: Arch Linux 5.9.6
  • Dependency Versions:
vagrant in ~ at archlinux
➜ sudo pacman -Q base base-devel libpng libxcursor libxi libxinerama libxrandr harfbuzz glu gtk3 fontconfig nasm clang
base 2-2
error: package 'base-devel' was not found
libpng 1.6.37-3
libxcursor 1.2.0-2
libxi 1.7.10-3
libxinerama 1.1.4-3
libxrandr 1.5.2-3
harfbuzz 2.7.2-1
glu 9.0.1-2
gtk3 1:3.24.23-4
fontconfig 2:2.13.91+48+gfcb0420-2
nasm 2.15.05-1
clang 10.0.1-1

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

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

Hi @jericdeleon! Sorry you're having this issue. Our default font on Linux is Liberation Sans, as seen here:

| Linux => system("Liberation Sans")

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!

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

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