Skip to content

Commit

Permalink
wallet-ext: updated font with new icons
Browse files Browse the repository at this point in the history
* new icons:
  * arrow-left
  * clipboard
  * globe
  * logout
  * person
  * sui-chevron-right
* used icomoon to optimize all the svg iamges
  • Loading branch information
pchrysochoidis committed Jul 15, 2022
1 parent 352e262 commit e0af77e
Show file tree
Hide file tree
Showing 18 changed files with 76 additions and 35 deletions.
9 changes: 8 additions & 1 deletion wallet/font-icons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,20 @@ It will be useful to also document here the source of each icon.
- [nfts.svg](./svgs/nfts.svg) - exported from [figma](https://www.figma.com/file/rkFrheddol8YO7HQaHgIfF/Sui-Systematize?node-id=3547%3A3433)
- [history.svg](./svgs/history.svg) - exported from [figma](https://www.figma.com/file/rkFrheddol8YO7HQaHgIfF/Sui-Systematize?node-id=3547%3A3433)
- [apps.svg](./svgs/apps.svg) - exported from [figma](https://www.figma.com/file/rkFrheddol8YO7HQaHgIfF/Sui-Systematize?node-id=3547%3A3433)
- [globe.svg](./svgs/globe.svg) - exported from [figma](https://www.figma.com/file/OzLaRFzevjxdQAbybWEZk0/Sui-Visualize?node-id=1607%3A18842)
- [person.svg](./svgs/person.svg) - exported from [figma](https://www.figma.com/file/OzLaRFzevjxdQAbybWEZk0/Sui-Visualize?node-id=1607%3A18842)
- [arrow-left.svg](./svgs/arrow-left.svg) - exported from [figma](https://www.figma.com/file/OzLaRFzevjxdQAbybWEZk0/Sui-Visualize?node-id=1609%3A19253)
- [clipboard.svg](./svgs/clipboard.svg) - exported from [figma](https://www.figma.com/file/OzLaRFzevjxdQAbybWEZk0/Sui-Visualize?node-id=1609%3A19253)
- [logout.svg](./svgs/logout.svg) - exported from [figma](https://www.figma.com/file/OzLaRFzevjxdQAbybWEZk0/Sui-Visualize?node-id=1609%3A19253)
- [sui-chevron-right.svg](./svgs/sui-chevron-right.svg) - exported from [figma](https://www.figma.com/file/OzLaRFzevjxdQAbybWEZk0/Sui-Visualize?node-id=1607%3A18842)

# Troubleshooting

- Sometimes the svg icon will not work properly when converted to font. An easy way to fix it is use [IcoMoon](https://icomoon.io/app) and [svgfont2svgicons](https://github.com/nfroidure/svgfont2svgicons)
- Sometimes the svg icon will not work properly when converted to font (it might be a good idea to do this process for all svgs - to take advantage of any optimizations). An easy way to fix it is use [IcoMoon](https://icomoon.io/app) and [svgfont2svgicons](https://github.com/nfroidure/svgfont2svgicons)
- Upload the svg icon to `IcoMoon`
- Generate the font (check if the icon looks good - if not probably it will not work)
- Download the new font
- Unzip the font
- Use `svgfont2svgicons path/to/svgfont path/to/output` to extract the svg icon
- Use the extracted svg icon instead of the original one
- The new svg usually starts with something like `<?xml version="1.0" encoding="UTF-8" standalone="no"?>` but this doesn't work properly when running `make-font-icons`. Removing it will fix the error.
Binary file modified wallet/font-icons/output/sui-icons.eot
Binary file not shown.
32 changes: 22 additions & 10 deletions wallet/font-icons/output/sui-icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,28 @@ url('./sui-icons.svg#sui-icons') format('svg');
}

.sui-icons-apps:before { content: "\ea01"; }
.sui-icons-history:before { content: "\ea02"; }
.sui-icons-nfts:before { content: "\ea03"; }
.sui-icons-sui-logo-icon:before { content: "\ea04"; }
.sui-icons-sui-logo-txt:before { content: "\ea05"; }
.sui-icons-tokens:before { content: "\ea06"; }
.sui-icons-arrow-left:before { content: "\ea02"; }
.sui-icons-clipboard:before { content: "\ea03"; }
.sui-icons-globe:before { content: "\ea04"; }
.sui-icons-history:before { content: "\ea05"; }
.sui-icons-logout:before { content: "\ea06"; }
.sui-icons-nfts:before { content: "\ea07"; }
.sui-icons-person:before { content: "\ea08"; }
.sui-icons-sui-chevron-right:before { content: "\ea09"; }
.sui-icons-sui-logo-icon:before { content: "\ea0a"; }
.sui-icons-sui-logo-txt:before { content: "\ea0b"; }
.sui-icons-tokens:before { content: "\ea0c"; }

$sui-icons-apps: "\ea01";
$sui-icons-history: "\ea02";
$sui-icons-nfts: "\ea03";
$sui-icons-sui-logo-icon: "\ea04";
$sui-icons-sui-logo-txt: "\ea05";
$sui-icons-tokens: "\ea06";
$sui-icons-arrow-left: "\ea02";
$sui-icons-clipboard: "\ea03";
$sui-icons-globe: "\ea04";
$sui-icons-history: "\ea05";
$sui-icons-logout: "\ea06";
$sui-icons-nfts: "\ea07";
$sui-icons-person: "\ea08";
$sui-icons-sui-chevron-right: "\ea09";
$sui-icons-sui-logo-icon: "\ea0a";
$sui-icons-sui-logo-txt: "\ea0b";
$sui-icons-tokens: "\ea0c";

38 changes: 28 additions & 10 deletions wallet/font-icons/output/sui-icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions wallet/font-icons/output/sui-icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@

export enum SuiIcons {
Apps = "sui-icons-apps",
ArrowLeft = "sui-icons-arrow-left",
Clipboard = "sui-icons-clipboard",
Globe = "sui-icons-globe",
History = "sui-icons-history",
Logout = "sui-icons-logout",
Nfts = "sui-icons-nfts",
Person = "sui-icons-person",
SuiChevronRight = "sui-icons-sui-chevron-right",
SuiLogoIcon = "sui-icons-sui-logo-icon",
SuiLogoTxt = "sui-icons-sui-logo-txt",
Tokens = "sui-icons-tokens"
}

export type SuiIconsClassname = "sui-icons-apps" | "sui-icons-history" | "sui-icons-nfts" | "sui-icons-sui-logo-icon" | "sui-icons-sui-logo-txt" | "sui-icons-tokens"
export type SuiIconsIcon = "apps" | "history" | "nfts" | "sui-logo-icon" | "sui-logo-txt" | "tokens"
export type SuiIconsClassname = "sui-icons-apps" | "sui-icons-arrow-left" | "sui-icons-clipboard" | "sui-icons-globe" | "sui-icons-history" | "sui-icons-logout" | "sui-icons-nfts" | "sui-icons-person" | "sui-icons-sui-chevron-right" | "sui-icons-sui-logo-icon" | "sui-icons-sui-logo-txt" | "sui-icons-tokens"
export type SuiIconsIcon = "apps" | "arrow-left" | "clipboard" | "globe" | "history" | "logout" | "nfts" | "person" | "sui-chevron-right" | "sui-logo-icon" | "sui-logo-txt" | "tokens"
export const SuiIconsPrefix = "sui-icons-"
Binary file modified wallet/font-icons/output/sui-icons.ttf
Binary file not shown.
Binary file modified wallet/font-icons/output/sui-icons.woff
Binary file not shown.
Binary file modified wallet/font-icons/output/sui-icons.woff2
Binary file not shown.
4 changes: 1 addition & 3 deletions wallet/font-icons/svgs/apps.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions wallet/font-icons/svgs/arrow-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions wallet/font-icons/svgs/clipboard.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions wallet/font-icons/svgs/globe.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions wallet/font-icons/svgs/history.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e0af77e

Please sign in to comment.