cosmic-text icon indicating copy to clipboard operation
cosmic-text copied to clipboard

example `editor-libcosmic` is broken?

Open WhyNotHugo opened this issue 3 years ago • 6 comments

Running the editor-libcosmic example, I get this:

image

There is no text rendered anywhere. Clicking on the big textfield and typing does nothing. Opening a file changes nothing. The pulldown menus and toggle buttons respond, but do nothing.

WhyNotHugo avatar Nov 03 '22 20:11 WhyNotHugo

This looks like a graphics driver issue. What GPU do you have?

mmstick avatar Nov 03 '22 20:11 mmstick

Oh, that was on Asahi Linux / M1. So software rendering. I'll try on another host.

WhyNotHugo avatar Nov 03 '22 21:11 WhyNotHugo

I tried on Intel, text rendering is very blurry:

image

WhyNotHugo avatar Nov 03 '22 21:11 WhyNotHugo

Screenshot from 2022-11-03 at 22_25_38 092491215

WhyNotHugo avatar Nov 03 '22 21:11 WhyNotHugo

Dammit, github compreses too much: https://0x0.st/ogOl.09249121

WhyNotHugo avatar Nov 03 '22 21:11 WhyNotHugo

You should run cargo update to ensure you have the latest version of iced. We have a patched version that fixes the blurriness.

jackpot51 avatar Nov 07 '22 15:11 jackpot51

~~I think the issue is the example itself isn't handling the scale properly.~~ Actually, not sure about this; I'm not sure if it's an issue in the example, in cosmic-text or in iced.

The issue becomes extremely obvious when setting scale=6:

image

I can repro this with:

cd ~/clones/github.com/pop-os/cosmic-text
cd examples/rich-text/
echo "output * scale 6\nxwayland off\nexec cargo run" > sway.conf
sway -c sway.conf

If you run your terminal (e.g.: foot) instead of cargo run, it renders perfectly crisp.

WhyNotHugo avatar Dec 03 '22 15:12 WhyNotHugo

Is this problem fixed by https://github.com/pop-os/cosmic-text/commit/d85f12af8bbee5a3ef97dc9785f8193a0c3b5f4e?

VitalyAnkh avatar Mar 24 '23 14:03 VitalyAnkh

Yes, it should be.

jackpot51 avatar Mar 24 '23 15:03 jackpot51

Yeah, now it's nice and sharp!

WhyNotHugo avatar Mar 24 '23 16:03 WhyNotHugo