Skip to content

Commit 1523dcd

Browse files
tetrapod00Calinou
andauthored
Update Editor icons page to reflect usage of svgo (#10195)
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
1 parent e954194 commit 1523dcd

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

contributing/development/code_style_guidelines.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ You need to use **clang-format 17** to be compatible with Godot's format. Later
6161
be suitable, but previous versions may not support all used options, or format
6262
some things differently, leading to style issues in pull requests.
6363

64+
.. _doc_code_style_guidelines_pre_commit_hook:
65+
6466
Pre-commit hook
6567
^^^^^^^^^^^^^^^
6668

contributing/development/editor/creating_icons.rst

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,9 @@ Icon optimization
4747
~~~~~~~~~~~~~~~~~
4848

4949
Because the editor renders SVGs once at load time, they need to be small
50-
in size so they can be efficiently parsed. Editor icons must be first
51-
optimized before being added to the engine, to do so:
52-
53-
1. Install `svgcleaner <https://github.com/RazrFalcon/svgcleaner>`__
54-
by downloading a binary from its
55-
`Releases tab <https://github.com/RazrFalcon/svgcleaner/releases/latest>`__
56-
and placing it into a location in your ``PATH`` environment variable.
57-
58-
2. Run the command below, replacing ``svg_source.svg`` with the path to your
59-
SVG file (which can be a relative or absolute path):
60-
61-
.. code-block:: bash
62-
63-
svgcleaner --multipass svg_source.svg svg_optimized.svg
64-
65-
The ``--multipass`` switch improves compression, so make sure to include it.
66-
The optimized icon will be saved to ``svg_optimized.svg``. You can also change
67-
the destination parameter to any relative or absolute path you'd like.
50+
in size so they can be efficiently parsed. When the
51+
:ref:`pre-commit hook <doc_code_style_guidelines_pre_commit_hook>` runs, it automatically optimizes
52+
the SVG using `svgo <https://github.com/svg/svgo>`_.
6853

6954
.. note::
7055

0 commit comments

Comments
 (0)