Open flukejones opened 9 months ago
Can you provide the version of Cosmic-Edit you're using?
This can be found on Pop!_OS, Ubuntu, and many other Debian derivatives by running the following in a terminal:
apt policy cosmic-edit
I just need the value next to Installed:
@XV-02 I run fedora and install from git (just updated to today).
Details of my setup are:
Operating System: Fedora Linux 40 KDE Plasma Version: 6.0.0 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.2 Kernel Version: 6.8.0-0.rc6.49.fc40.x86_64 (64-bit) Graphics Platform: Wayland Processors: 20 × 13th Gen Intel® CoreT i7-13700H Memory: 31.0 GiB of RAM Graphics Processor: Mesa Intel® Graphics Manufacturer: ASUSTeK COMPUTER INC. Product Name: ROG Zephyrus M16 GU604VY_GU604VY_00130747B System Version: 1.0
I run both KDE and Cosmic.
Turned out I had a copy of cosmic-edit in my user bin dir, so i was never actually seeing updates when I rebuilt sysext.
Re-opening as this is still true. Running bcc1ad82840c4109025b7389df953893ee4cce83
From what I can see the bad rendering is in set places (at default window size here)
What graphics card and driver do you have? Does it look like this if you change the WGPU renderer, or disable GPU rendering by removing the wgpu
feature from libcosmic?
Hmm:
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia WGPU_BACKEND=gl cosmic-edit
This is nice and crisp, but on dgpu onlyWGPU_BACKEND=gl cosmic-edit
draws blank squaresRUST_LOG=info WGPU_BACKEND=vulkan WGPU_ADAPTER_NAME="GeForce" cosmic-edit
is not selecting the nvidia like it should (tried a number of strings)Using mesa 24.0.0 for Intel, 550.54.14 for nvidia. I'll try without wgpu feature if I have time.
The main reason for this is that the custom control cosmic-edit uses for text renders it to an image and the image size is calculated based on the logical size multiplied by the scale factor. When using a fractional size, that can sometimes end up being a size that doesn't exactly fit into integer logical pixels and then it scales incorrectly. I'm going to replace this workaround now that iced directly supports rendering cosmic_text buffers.
Ah I see, that explains why resizing to a particular size helped.
This is partially improved by 2bfcfdf. It searches for a pixel size that is an integer in both the logical and physical coordinates. Unfortunately it does not work fully with the wgpu renderer. When I have more time I will switch to using a different rendering technique that will both improve performance and fix this issue when using the wgpu feature.
The screenshot demonstrates the issue. Fractional scaling is 125% here. It happens on most scales except integer.
Not sure what other info is valuable. This does happen in both KDE and Cosmic.