oreo-cursors icon indicating copy to clipboard operation
oreo-cursors copied to clipboard

Oreo multisize

Open Souravgoswami opened this issue 4 years ago • 2 comments

Add capability to generate user defined sizes.

In the past (master)

  1. Add convert.rb to Makefile.
  2. Readme added ruby 2.4+ as a dependency.

In the recent past (oreo-bordered)

  1. We have added borders.
  2. Changed syntax for the colours.conf config file.
  3. Notable changes in the convert.rb ruby script.

In this recent branch (oreo-multisize)

  1. We have modified README.
  2. We have named colours.conf to cursors.conf, which is now available in the project root path.
  3. Most importantly, we can generate sizes from configuration file.

The way multisize works is simple. We have some defined file names mapped to the cursors size (pasted from the original config file). Then it generates new config files out of that.

There are other small yet notable changes.

More tests are needed.

User's note

The building is simple. You don't need a gazillion dependencies. We have kept it simple as always. Just modify cursors.conf with the given simple syntax that looks like JSON. And run make build to start building.

Happy theming!

Souravgoswami avatar Oct 04 '20 07:10 Souravgoswami

The reason why we provide only 32px and 64px sizes because source SVGs is 32px. To support all declared sizes you need to draw new cursors for 24px, 40px, and 56px otherwise it will be blurred.

SmartFinn avatar Oct 04 '20 07:10 SmartFinn

@SmartFinn, the cursors actually work flawlessly (with a rounded value of x and y coordinates). Check it out!

A 32x32 svg maybe downscaled or upscaled without any problem. I have tested 16, 24, 32, 40, 48 pixel cursors. which just works nicely.

The file changed are:

  1. build.sh

  2. all the files in config/

  3. build.sh runs a ruby script to check for the file sizes, which writes the values to standard output in this format: 16 32 48 64

Here are the major changes: https://github.com/Souravgoswami/oreo-cursors/blob/90c949547d17f31b260eef4d55f99eb8152bd704/build.sh#L15 https://github.com/Souravgoswami/oreo-cursors/blob/90c949547d17f31b260eef4d55f99eb8152bd704/build.sh#L24

Building takes really long time now, with the default configuration file (cursors.conf), it takes 62 minutes on my laptop to build the cursors. But once it's built, I am facing 0 issues.

  1. config files are calculated from the configuration hardcoded into the script, and then it runs some simple elementary maths to convert one size to another.

https://github.com/Souravgoswami/oreo-cursors/blob/oreo-multisize/generator/checksizes.rb https://github.com/Souravgoswami/oreo-cursors/blob/oreo-multisize/generator/configs.rb

ezgif com-video-to-gif

I will really appreciate people testing out this version along with the borders and finding issues with the built cursors and the scripts, etc.

Souravgoswami avatar Oct 04 '20 11:10 Souravgoswami