Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing text on GUI #77

Open
auroraanna opened this issue Sep 23, 2023 · 12 comments
Open

Missing text on GUI #77

auroraanna opened this issue Sep 23, 2023 · 12 comments

Comments

@auroraanna
Copy link

auroraanna commented Sep 23, 2023

On master (d724865), the text on the GUI is missing, e.g. all the buttons, select menus but now the hints for what key plays what note. Therefore I guess, assuming that Neothesia renders the note hints, not iced, that this is an issue with iced.

The previous issue about this seems to have fixed this by switching to DX12. I am on Linux so this application should only be able to run on Vulkan on my system.

Screenshots of what it looks like:
image
image

This doesn't occur on 0.0.16 and for 1.0.0, I can't get it building in nixpkgs (NixOS/nixpkgs#256882).

@PolyMeilex
Copy link
Owner

Yep, text rendered while playing the song is rendered by Neothesia directly, in menu it's done by iced

@PolyMeilex
Copy link
Owner

You could try with opengl

@auroraanna
Copy link
Author

auroraanna commented Sep 23, 2023

You could try with opengl

So, I figured you can set the WGPU_BACKEND environment variable but it launches successfully on nothing but gl. So it must've been running on OpenGL this whole time. I thought vulkan would work but no.

$ WGPU_BACKEND="vulkan" ./result/bin/neothesia
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: AdapterRequest', neothesia/src/main.rs:243:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: queue 0x55b0209b1650 destroyed while proxies still attached:
  xdg_wm_base@20 still attached
  wl_output@14 still attached
  wl_seat@13 still attached
  xdg_activation_v1@12 still attached
  wp_viewporter@11 still attached
  zwp_text_input_manager_v3@10 still attached
  zwp_pointer_constraints_v1@9 still attached
  zwp_relative_pointer_manager_v1@8 still attached
  zxdg_decoration_manager_v1@7 still attached
  wl_subcompositor@6 still attached
  wl_compositor@5 still attached
  wl_shm@4 still attached
  wl_registry@2 still attached

For games on Steam, vulkan works though. vkcube runs too.

I guess I could told from the missing mangohud overlay I get on all other vulkan apps that it's not running on vulkan.

@PolyMeilex
Copy link
Owner

Could you try with "RUST_LOG=debug" env

@auroraanna
Copy link
Author

Could you try with "RUST_LOG=debug" env

With that env variable I found out the problem with running on vulkan was that it didn't have libvulkan.so.1 in it's path which it has now.

So, it runs on vulkan but the text is still missing. However, the Neothesia logo shows now:
image

@auroraanna
Copy link
Author

auroraanna commented Sep 23, 2023

Oh, it was logging that it failed to find a bunch of fonts which I have all installed. Recompiling with fontconfig in runtime path.

This might just end up being a missing libraries thing.

@auroraanna
Copy link
Author

Hmm, fontconfig in it's runtime PATH doesn't help. For vulkan-loader with libvulkan.so.1 I had to explicitly put it's lib folder into LD_LIBRARY_PATH though. Maybe fontconfig is not accessible to it?

@auroraanna
Copy link
Author

The database can try to load system fonts. Currently, this is implemented by scanning predefined directories. The library does not interact with the system API.

--https://crates.io/crates/fontdb

I looked in the dependency graph and found fontdb. Assuming this crate is used for using system fonts, scanning predefined directories doesn't work on my Linux distro (NixOS). That must be why adding fontconfig to the runtime PATH didn't help.

I will try to put it in a FHS environment then so the predefined directories will work.

@auroraanna
Copy link
Author

So, I was told putting it in an FHS env is not ideal. Patching the source code of the fontdb dependency would be better, but complex. Another option is Neothesia switching to using fontconfig. You can't expect fonts to be in predefined paths. Not every systen works the same way.

@PolyMeilex
Copy link
Owner

PolyMeilex commented Sep 24, 2023

I wonder if it would be possible to hardcode the iced font the same way I do for Neothesia, for Neothesia I just prebundle the hardcoded font and that's why it works, iced on the other hand is "smarter" and tries to use system's font.

Could you try one of iced demos/examples? So we can at least report this upstream before I strip the font detection part out (if it manifests upstream that is)

@auroraanna
Copy link
Author

So we can at least report this upstream

Upstream in iced? Shouldn't this be reported in cosmic-text or fontdb itself? (fontdb is a direct dependency of cosmic-text)

@auroraanna
Copy link
Author

auroraanna commented Sep 24, 2023

Hmm, there's already issues about this:

and pop-os/cosmic-text#174 was merged so I guess cosmic-text needs to be updated in glyphon and iced_tiny_skia but there hasn't been a release of cosmic-text since it was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants