The complete SVG pipeline was as follows. Zeplin etc is gone
Sketch Assets → Zeplin → Export to SVG → Optimized with SVGO → Download
It's important to note that the original Sketch assets determine the final SVG output after running through SVGO. Pay attention for strange overlapping/masking paths in the final SVGs or inverted colors. This is usually caused by something happening in Sketch.
The naming convention of the SVG files is very important.
{counter}-kb-inconfont-{name-with-dashes}-{size}.svg
The counter is used to generate the unicode values for the characters in the iconfont. It is okay to have gaps in the counters. It is NOT ok to have multiple icons with the same counter.
- Open the Iconfont Zeplin sheet
- Select the icons to add/replace. Then download as SVG
- Ensure the SVG name is
{counter}-kb-iconfont-{name}-{size}.svgand there are no collisions in the counters - Move SVG to
keybase/client/shared/images/iconfont - Ensure that the icon font dependencies are insatlled wtih
yarn --check-files - Run
yarn update-icon-font- If new icons were added then
shared/common-adapters/icon.constants-gen.tsxandshared/fonts/kb.ttfshould be modified - If existing icons were modified/replaced then only
shared/fonts/kb.ttfshould be modified
- If new icons were added then
- Inspect modified
kb.ttffor SVG artifacts or entirely black boxes for icons- Launch
FontForge.app File>Open(cmd+O)- Select
$GOPATH/src/github.com/keybase/client/shared/fonts/kb.ttf - Then search for the added/modified icons
View>Go To(cmd+shift+>)- Search using
{counter}-kb-iconfont-{name}-{size}.svg(E.g.172-kb-iconfont....)
- Launch
- Ensure that no icon in the iconfont is an entirely black box (this occurs if the "icon area" layer is still 100% opaque. It should be transparent even if it has no fill)
- Ensure that no icon in the iconfont is invereted (icon path & white space are invereted/switch). If this ocurred, then the SVG in Sketch was layerd/grouped/highlihgted incorrectly. Post in #design.
Unfortunately this library is now archived / deprecated. Internally it uses the following packages, which can be used to replace the library if needed.
- svg - svgicons2svgfont
- ttf - svg2ttf
- woff2 - ttf2woff2
- woff - ttf2woff
- eot - ttf2eot