inlyne icon indicating copy to clipboard operation
inlyne copied to clipboard

Can't find Variable Font

Open azzamsa opened this issue 1 year ago • 4 comments

Hi.

I can use "Noto Sans" in other applications just fine, but Inlyne can't find it.

  • Error message:
❯ inlyne README.md
warning: queue 0x564f2e209da0 destroyed while proxies still attached:
  wl_display@1 still attached
warning: queue 0x564f2e304900 destroyed while proxies still attached:
  wl_display@1 still attached
warning: queue 0x564f2dcd5940 destroyed while proxies still attached:
  wl_buffer@41 still attached
  wl_buffer@40 still attached
  wl_buffer@38 still attached
  wl_buffer@39 still attached
  wl_subsurface@33 still attached
  wl_surface@32 still attached
  wl_subsurface@31 still attached
  wl_surface@30 still attached
  wl_subsurface@29 still attached
  wl_surface@28 still attached
  wl_subsurface@27 still attached
  wl_surface@26 still attached
  wl_subsurface@25 still attached
  wl_surface@24 still attached
  xdg_wm_base@22 still attached
  xdg_activation_v1@14 still attached
  zwp_text_input_manager_v3@13 still attached
  zwp_pointer_constraints_v1@12 still attached
  zwp_relative_pointer_manager_v1@11 still attached
  wl_seat@10 still attached
  wp_fractional_scale_manager_v1@9 still attached
  wp_viewporter@8 still attached
  wl_subcompositor@7 still attached
  wl_output@6 still attached
  wl_shm@5 still attached
  wl_compositor@4 still attached
  wl_registry@2 still attached
Error: InvalidFont
  • In Gnome Text Editor

image

  • The fonts are there
❯ fc-list | grep "Noto Sans" | grep "Regular"
/usr/share/fonts/google-noto-vf/NotoSansArabic[wght].ttf: Noto Sans Arabic:style=Regular
/usr/share/fonts/google-noto-vf/NotoSansKhmer[wght].ttf: Noto Sans Khmer:style=Regular
/usr/share/fonts/google-noto/NotoSansMath-Regular.ttf: Noto Sans Math:style=Regular
/usr/share/fonts/google-noto-vf/NotoSansThai[wght].ttf: Noto Sans Thai:style=Regular
/usr/share/fonts/google-noto-vf/NotoSans[wght].ttf: Noto Sans:style=Regular
/usr/share/fonts/google-noto-vf/NotoSansHebrew[wght].ttf: Noto Sans Hebrew:style=Regular
/usr/share/fonts/google-noto-vf/NotoSansGurmukhi[wght].ttf: Noto Sans Gurmukhi:style=Regular
/usr/share/fonts/google-noto-vf/NotoSansMono[wght].ttf: Noto Sans Mono:style=Regular
/usr/share/fonts/google-noto-vf/NotoSansSinhala[wght].ttf: Noto Sans Sinhala:style=Regular
/usr/share/fonts/google-noto-vf/NotoSansCanadianAboriginal[wght].ttf: Noto Sans Canadian Aboriginal:style=Light,Regular
/usr/share/fonts/google-noto-vf/NotoSansArmenian[wght].ttf: Noto Sans Armenian:style=Regular
/usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK JP:style=Thin,Regular
/usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK HK:style=Thin,Regular
/usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK KR:style=Thin,Regular
/usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK TC:style=Thin,Regular
/usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK SC:style=Thin,Regular
/usr/share/fonts/google-noto-vf/NotoSansLao[wght].ttf: Noto Sans Lao:style=Regular
/usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK SC:style=Regular
/usr/share/fonts/google-noto-vf/NotoSansThaana[wght].ttf: Noto Sans Thaana:style=Regular
/usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK TC:style=Regular
/usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansMonoCJK-VF.ttc: Noto Sans Mono CJK JP:style=Regular
/usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansMonoCJK-VF.ttc: Noto Sans Mono CJK HK:style=Regular
/usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansMonoCJK-VF.ttc: Noto Sans Mono CJK KR:style=Regular
/usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK JP:style=Regular
/usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK HK:style=Regular
/usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansCJK-VF.ttc: Noto Sans CJK KR:style=Regular
/usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansMonoCJK-VF.ttc: Noto Sans Mono CJK TC:style=Regular
/usr/share/fonts/google-noto-sans-cjk-vf-fonts/NotoSansMonoCJK-VF.ttc: Noto Sans Mono CJK SC:style=Regular
/usr/share/fonts/google-noto-vf/NotoSansGeorgian[wght].ttf: Noto Sans Georgian:style=Regular
/usr/share/fonts/google-noto-vf/NotoSansEthiopic[wght].ttf: Noto Sans Ethiopic:style=Regular
/usr/share/fonts/google-noto-vf/NotoSansCherokee[wght].ttf: Noto Sans Cherokee:style=Regular

The content of ~/.config/inlyne/inlyne.toml:

[font-options]
regular-font = "Noto Sans" # ⚠ didn't work
regular-font = "Noto Sans Regular" # ⚠ didn't work
regular-font = "Noto Sans Regular 19" # ⚠ didn't work


monospace-font = "Iosevka Nerd Font"

My system:

OS: Fedora Linux 38 (Container Image) x86_64
Kernel: 6.2.14-300.fc38.x86_64
Shell: zsh 5.9
DE: GNOME
WM: Mutter
❯ rustc --version
rustc 1.69.0 (84c898d65 2023-04-16)

❯ inlyne --version
inlyne 0.3.0

azzamsa avatar May 07 '23 22:05 azzamsa

I am guessing this is the same upstream issue as #79. Probably on Wayland this leads to errors and on X11 this leads to invalid rendering.

coastalwhite avatar May 08 '23 09:05 coastalwhite

That's odd. I can reproduce the issue from #79, but I can't reproduce this issue on Arch Linux. I'll try to get a fedora VM setup this weekend to see if I can reproduce there. At the very least I'd like to add more context to the InvalidFont error

CosmicHorrorDev avatar May 08 '23 23:05 CosmicHorrorDev

I was able to reproduce this in an out-of-the-box Fedora 38 VM. #105 is going to change a lot of the font logic, so I'll have to take a deeper look once that work is closer to merging

CosmicHorrorDev avatar May 14 '23 19:05 CosmicHorrorDev

#105 is in and this now appears as a panic in one of our dependencies

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/test/.cargo/git/checkouts/glyphon-bce1d8fb6a1f7cb1/80e8465/src/text_render.rs:110:26

I'll work on making a minimal reproduction and submitting an issue in whichever dependency seems to be responsible

CosmicHorrorDev avatar May 18 '23 23:05 CosmicHorrorDev