Smile icon

A free pencil-style smile icon, drawn by code from 1 circle, 1 curve and 2 dots. Use it as an SVG, a React component, or by name. MIT licensed.

smile

01Use it

Use smile

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 { Smile } from '@matita/icons/react';

<Smile size={24} />

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

JavaScript

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

toSvg(Smile, { 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-smile" data-sketch="" aria-hidden="true"><path d="M15.83 4.16C16.27 4.53 17.8 5.44 18.46 6.35C19.12 7.25 19.51 8.47 19.78 9.59C20.04 10.71 20.12 11.89 20.05 13.06C19.99 14.22 19.93 15.6 19.41 16.59C18.88 17.59 17.81 18.33 16.91 19.02C16.01 19.71 15.04 20.42 13.99 20.75C12.94 21.08 11.72 21.15 10.6 21.01C9.49 20.86 8.25 20.52 7.29 19.89C6.34 19.26 5.52 18.22 4.86 17.22C4.21 16.21 3.6 15.03 3.36 13.84C3.13 12.65 3.2 11.28 3.44 10.08C3.68 8.88 4.15 7.64 4.79 6.62C5.44 5.6 6.32 4.57 7.29 3.94C8.27 3.31 9.53 2.99 10.67 2.84C11.81 2.69 13.02 2.76 14.14 3.05C15.25 3.33 16.42 3.82 17.35 4.54C18.27 5.26 19.07 6.3 19.68 7.37C20.3 8.43 20.8 10.33 21.02 10.92" stroke-width="1.712"/><path d="M7.64 13.59Q12.04 17.92 16.28 13.56" stroke-width="1.584"/><path d="M9.14 9.39l.01 0M15.03 9.4l.01 0" stroke-width="2.48"/></svg>

Pencil variant

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

<Smile size={32} pencil />

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

02How it's drawn

The recipe for smile

Smile is not stored as a drawing. It is a recipe of 1 circle, 1 curve and 2 dots 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
C 12 12 8.5;
Q 8 14 12 18 16 14;
O 9 9.5;
O 15 9.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 smile. Seed 0 is the default.

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

True pixel sizes.

Ink
Pencil