From 7e58e89f973b4f7e5dd6bc497d246d5a7e7bdc87 Mon Sep 17 00:00:00 2001 From: tetrapod00 <145553014+tetrapod00@users.noreply.github.com> Date: Sat, 2 Nov 2024 17:42:48 -0700 Subject: [PATCH 1/2] Update Editor Icons page to reflect usage of svgo --- .../development/code_style_guidelines.rst | 2 ++ .../development/editor/creating_icons.rst | 21 +++---------------- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/contributing/development/code_style_guidelines.rst b/contributing/development/code_style_guidelines.rst index e5513094990..e6203cd41fd 100644 --- a/contributing/development/code_style_guidelines.rst +++ b/contributing/development/code_style_guidelines.rst @@ -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_pre_commit_hook: + Pre-commit hook ^^^^^^^^^^^^^^^ diff --git a/contributing/development/editor/creating_icons.rst b/contributing/development/editor/creating_icons.rst index 451616aca3f..4ee13a60dcd 100644 --- a/contributing/development/editor/creating_icons.rst +++ b/contributing/development/editor/creating_icons.rst @@ -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 `__ - by downloading a binary from its - `Releases tab `__ - 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 ` runs, it automatically optimizes +the SVG using `svgo `_. .. note:: From 2011eb5b72ce7256460ac3141284e0d6d37c8127 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Mon, 4 Nov 2024 22:08:39 +0100 Subject: [PATCH 2/2] Apply suggestions from code review --- contributing/development/code_style_guidelines.rst | 2 +- contributing/development/editor/creating_icons.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contributing/development/code_style_guidelines.rst b/contributing/development/code_style_guidelines.rst index e6203cd41fd..80b69e5bd61 100644 --- a/contributing/development/code_style_guidelines.rst +++ b/contributing/development/code_style_guidelines.rst @@ -61,7 +61,7 @@ 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_pre_commit_hook: +.. _doc_code_style_guidelines_pre_commit_hook: Pre-commit hook ^^^^^^^^^^^^^^^ diff --git a/contributing/development/editor/creating_icons.rst b/contributing/development/editor/creating_icons.rst index 4ee13a60dcd..cdb6047311d 100644 --- a/contributing/development/editor/creating_icons.rst +++ b/contributing/development/editor/creating_icons.rst @@ -48,7 +48,7 @@ Icon optimization Because the editor renders SVGs once at load time, they need to be small in size so they can be efficiently parsed. When the -:ref:`pre-commit hook ` runs, it automatically optimizes +:ref:`pre-commit hook ` runs, it automatically optimizes the SVG using `svgo `_. .. note::