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

Update Editor Icons page to reflect usage of svgo #10195

Merged
merged 2 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions contributing/development/code_style_guidelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ You need to use **clang-format 17** to be compatible with Godot's format. Later
be suitable, but previous versions may not support all used options, or format
some things differently, leading to style issues in pull requests.

.. _doc_code_style_guidelines_pre_commit_hook:

Pre-commit hook
^^^^^^^^^^^^^^^

Expand Down
21 changes: 3 additions & 18 deletions contributing/development/editor/creating_icons.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,9 @@ Icon optimization
~~~~~~~~~~~~~~~~~

Because the editor renders SVGs once at load time, they need to be small
in size so they can be efficiently parsed. Editor icons must be first
optimized before being added to the engine, to do so:

1. Install `svgcleaner <https://github.com/RazrFalcon/svgcleaner>`__
by downloading a binary from its
`Releases tab <https://github.com/RazrFalcon/svgcleaner/releases/latest>`__
and placing it into a location in your ``PATH`` environment variable.

2. Run the command below, replacing ``svg_source.svg`` with the path to your
SVG file (which can be a relative or absolute path):

.. code-block:: bash

svgcleaner --multipass svg_source.svg svg_optimized.svg

The ``--multipass`` switch improves compression, so make sure to include it.
The optimized icon will be saved to ``svg_optimized.svg``. You can also change
the destination parameter to any relative or absolute path you'd like.
in size so they can be efficiently parsed. When the
:ref:`pre-commit hook <doc_code_style_guidelines_pre_commit_hook>` runs, it automatically optimizes
the SVG using `svgo <https://github.com/svg/svgo>`_.

.. note::

Expand Down