hyprwm / hyprcursor

The hyprland cursor format, library and utilities.
https://standards.hyprland.org/hyprcursor/
BSD 3-Clause "New" or "Revised" License
375 stars 14 forks source link

Cursor is blurry for smaller sizes when using svgs. And blurry for big sizes when scaling with pngs. #55

Open JonathanSteininger opened 4 months ago

JonathanSteininger commented 4 months ago

A recent issue about blurry cursors when compared to the xcursor counterpart has come up in catppucin-cursors.

Issue

The issue revolves around using svgs for the hyprcursor. Setting a small cursor sizes below 30 pixels causes the cursor to become blurry compared to the xcursor counterpart.

A way to address it is to use the xcursor pngs for the hyprcursor. However, this will cause any large or non regular xcursor scales to become blurry.

So we are stuck at a roadblock.

Possible solutions.

  1. We could allow for both options to be built. But this seems counter intuitive for what hyprcursor is meant to achieve.
  2. Allow for small sized pngs to be used in conjunction with svgs. Where it would use the png version when the cursor size reaches a certain threshold.
  3. Allow multiple svgs to be used for the hyprcursor and have size thresholds assigned to each of them.

Dislaimer

I am not sure if some of these are in place already. I could not find it in the documentation.

vaxerski commented 4 months ago

none are, but option 3 sounds reasonable.

Are you able to confirm that a different svg renders fine at smaller sizes?

JonathanSteininger commented 4 months ago

I will attempt to make a better svg version for smaller sizes of the cursor theme and test the results.

It will probably be a couple of days.

vaxerski commented 4 months ago

no worries

JonathanSteininger commented 4 months ago

I have tested making alternate version of the source svg's used in the cursor theme I have made an issue about.

The results are in this message.

Due to the styling of the cursor it leaves a space around the cursors edges for a shadow effect on the cursor.

For some reason this is causing the cursor to become really blurry, I still don't know the root cause to that.

Would the results on the linked message be enough to make option 3 a possibility? Or would you like me to make a version for more cursors in the cursor theme to see more differences?

vaxerski commented 4 months ago

if it helps you I have no problem with 3

JonathanSteininger commented 4 months ago

I think it would make sense to have that option. Having a high quality cursor be scaled really small feels like it will just cause issues. Having the option to use a simplified version for better clarity on smaller sizes would really help.