Gem icon

New Added in v0.5.0

A free pencil-style gem icon, drawn by code from 1 closed shape, 1 line and 2 polylines. Use it as an SVG, a React component, or by name. MIT licensed.

gem

01Use it

Use gem

One package, four ways in. The icon inherits currentColor and is decorative unless you give it a title. Install it with npm i @matita/icons.

React

import { Gem } from '@matita/icons/react';

<Gem size={24} />

// or by name
import { SketchIcon } from '@matita/icons/react';
<SketchIcon name="gem" />

JavaScript

import { Gem, toSvg } from '@matita/icons';

toSvg(Gem, { size: 24 });   // SVG string

SVG

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" overflow="visible" class="sketch-icon sketch-icon-gem" data-sketch="" aria-hidden="true"><path d="M6.83 4.42Q11.97 4.68 17.12 4.4Q19.07 7.29 21.41 9.88Q16.34 14.95 11.89 20.57Q7.03 15.35 2.43 9.89Q4.86 7.34 6.83 4.42Q7.78 4.33 8.73 4.41" stroke-width="1.792"/><path d="M1.94 9.97Q11.84 9.57 21.74 10.02" stroke-width="1.632"/><path d="M9.18 4.02Q8.56 7.15 7.4 10.12Q9.57 15.62 12.18 20.92" stroke-width="1.52"/><path d="M14.85 3.82Q15.4 6.95 16.31 9.98Q14.07 15.48 11.73 20.94" stroke-width="1.44"/></svg>

Pencil variant

import '@matita/icons/pencil.css';
import { Gem } from '@matita/icons/react';

<Gem size={32} pencil />

The file is icons/gem.svg in the package (pencil/gem.svg for the pencil variant). Matita 0.5.1.

02How it's drawn

The recipe for gem

Gem is not stored as a drawing. It is a recipe of 1 closed shape, 1 line and 2 polylines on a 24 by 24 grid, and a small program draws it like a pencil would. The wobble comes from the name, so it always comes out the same.

A · Recipe
Z 7 4.5 17 4.5 21.5 10 12 20.5 2.5 10;
L 2.5 10 21.5 10;
P 9 4.5 7.5 10 12 20.5;
P 15 4.5 16.5 10 12 20.5
B · Plotted
C · Drawn
How it works

03Takes, sizes, pencil

Same icon, every way

Pass a seed for another take of the same recipe. The wobble is capped, so it still reads at 16 px.

seed 0
seed 1
seed 2
seed 3
seed 4

Five seeds of gem. Seed 0 is the default.

wobble 0
wobble 0.25
wobble 0.5
wobble 0.75
wobble 1

gem from exact shapes (wobble 0) to the full hand (wobble 1, the default). The exact version is also a ready-made file: exact/gem.svg.

16 px
20 px
24 px
32 px
48 px
96 px

True pixel sizes.

Ink
Pencil