Skip to content

Commit 611008c

Browse files
update: CONTRIBUTING guide to document process for adding new icons (#1939)
* update: CONTRIBUTING guide to document process for adding new icons Added instructions for adding new icons to the existing font family, including steps for using Icomoon and updating the style.css file. * Update CONTRIBUTING.md Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update CONTRIBUTING.md Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update CONTRIBUTING.md Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Fix typos and improve clarity in CONTRIBUTING.md Corrected capitalization of 'Unicode' and improved clarity in instructions for adding icons. * Update CONTRIBUTING.md Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update CONTRIBUTING.md Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update CONTRIBUTING.md Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * update: renumber steps for clarity in CONTRIBUTING.md * Update CONTRIBUTING.md Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update CONTRIBUTING.md Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
1 parent acc3bcc commit 611008c

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

CONTRIBUTING.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,45 @@ refactor: simplify file loading logic
166166
pnpm run lang update # Update translations
167167
```
168168

169+
## ℹ️ Adding New Icons (to the existing font family)
170+
> [!NOTE]
171+
> Acode uses SVG and converts them into a font family, to be used inside the editor and generally for plugin devs.
172+
>
173+
> **Plugin-specific icons SHOULD NOT be added into the editor. Only generally helpful icons SHOULD BE added**
174+
175+
Many font editing software and web-based tools exist for this purpose. Some of them are listed below.
176+
177+
| Name | Platform |
178+
|------|----------|
179+
| https://icomoon.io/ | Free (Web-Based, PWA-supported, Offline-supported) |
180+
| https://fontforge.org/ | Open-Source (Linux, Mac, Windows) |
181+
182+
### Steps in Icomoon to add new Icons
183+
184+
1. Download the `icons.ttf` file from https://github.com/Acode-Foundation/Acode/tree/main/src/res/icons
185+
2. Go to https://icomoon.io/ > Start a new Project
186+
3. Import the `icons.ttf` downloaded (in step 1)
187+
4. All icons will be displayed after importing.
188+
5. Import the SVG icon created/downloaded to be added to the Font Family.
189+
6. On the right side, press **enable Show Characters** to view the Unicode character for that icon.
190+
7. Copy the newly added icon's Unicode character (required for later steps)
191+
8. Repeat Step 5 and Step 7 until all needed new icons are added.
192+
9. Press the export icon from the top left-hand side.
193+
10. Add **Font** in the formats section, expand the **Font**, enter **code-editor-icon** as the font-family for `icons.ttf` file.
194+
11. Press the download button, and a zip file will be downloaded.
195+
196+
### Adding the Unicode characters to style.css
197+
198+
1. Open the `style.css` file present at https://github.com/Acode-Foundation/Acode/tree/main/src/res/icons
199+
2. Add a new class called `.icon.icon-name:before` e.g ```.icon.all_inclusive:before { content: "\ea18"; }```
200+
3. `content` (i.e., `ea18` -> `\ea18`) property's value is the Unicode Character copied after importing the icon in the font family.
201+
4. Save the `style.css` file.
202+
5. Extract the downloaded zip file; navigate to the `fonts` folder inside it.
203+
6. Rename `code-editor-icon.ttf` to `icons.ttf`.
204+
7. Copy & paste the renamed `icons.ttf` into https://github.com/Acode-Foundation/Acode/tree/main/src/res/icons
205+
8. Commit the changes **ON A NEW branch** (by following: [Commit Messages guide](#commit-messages))
206+
5. commit the changes **ON A NEW branch** (by following: [Commit Messages guide](#commit-messages))
207+
169208
## 🔌 Plugin Development
170209

171210
To create plugins for Acode:

0 commit comments

Comments
 (0)