Smile icon

Added in v0.2.0

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.2 4.45 17.47 5.18 18.06 5.9C18.64 6.62 19.01 7.59 19.34 8.48C19.66 9.37 19.86 10.3 20 11.25C20.14 12.21 20.41 13.3 20.2 14.21C19.99 15.12 19.27 15.93 18.74 16.73C18.22 17.53 17.72 18.37 17.04 19C16.36 19.62 15.51 20.12 14.65 20.48C13.8 20.83 12.83 21.14 11.91 21.13C11 21.13 10.05 20.8 9.17 20.47C8.29 20.13 7.37 19.73 6.65 19.12C5.93 18.51 5.33 17.65 4.84 16.8C4.36 15.95 3.97 14.99 3.75 14.03C3.53 13.07 3.39 11.99 3.51 11.02C3.63 10.05 4.06 9.07 4.49 8.2C4.92 7.34 5.47 6.53 6.1 5.82C6.73 5.12 7.47 4.44 8.27 3.99C9.07 3.54 10.01 3.29 10.93 3.13C11.84 2.97 13.28 3.03 13.75 3.01" 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.7.0.

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.

wobble 0
wobble 0.25
wobble 0.5
wobble 0.75
wobble 1

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

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

True pixel sizes.

Ink
Pencil