Bug icon

Added in v0.2.0

A free pencil-style bug icon, drawn by code from 1 ellipse, 1 arc and 4 lines. Use it as an SVG, a React component, or by name. MIT licensed.

bug

01Use it

Use bug

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

<Bug size={24} />

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

JavaScript

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

toSvg(Bug, { 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-bug" data-sketch="" aria-hidden="true"><path d="M15.9 11.59C15.98 11.88 16.33 12.73 16.4 13.32C16.47 13.91 16.37 14.53 16.3 15.12C16.24 15.72 16.2 16.34 16.01 16.87C15.81 17.4 15.46 17.86 15.14 18.29C14.81 18.72 14.46 19.18 14.05 19.46C13.64 19.73 13.14 19.82 12.67 19.94C12.2 20.06 11.67 20.28 11.21 20.18C10.75 20.08 10.32 19.65 9.9 19.33C9.49 19.02 9.06 18.72 8.72 18.3C8.38 17.88 8.06 17.37 7.86 16.82C7.66 16.28 7.56 15.64 7.51 15.04C7.47 14.44 7.48 13.79 7.6 13.22C7.72 12.64 7.98 12.1 8.23 11.58C8.47 11.05 8.72 10.48 9.07 10.06C9.42 9.64 9.88 9.24 10.33 9.05C10.79 8.86 11.33 8.95 11.83 8.93C12.32 8.91 12.84 8.8 13.32 8.93C13.8 9.05 14.48 9.55 14.72 9.67" stroke-width="1.808"/><path d="M9.28 9.2C9.3 9.01 9.28 8.45 9.37 8.08C9.46 7.71 9.59 7.27 9.84 6.99C10.09 6.71 10.5 6.52 10.86 6.38C11.22 6.25 11.63 6.16 12 6.19C12.37 6.22 12.7 6.42 13.06 6.56C13.43 6.69 13.91 6.74 14.16 6.99C14.42 7.25 14.52 7.72 14.6 8.09C14.68 8.45 14.64 9.01 14.64 9.19" stroke-width="1.68"/><path d="M3.66 10.91Q5.91 11.6 8.03 12.59" stroke-width="1.44"/><path d="M20.04 10.79Q17.85 11.58 15.71 12.51" stroke-width="1.68"/><path d="M3.77 18.84Q5.93 17.56 8.14 16.38" stroke-width="1.52"/><path d="M20.34 18.74Q18.02 17.34 15.57 16.18" stroke-width="1.76"/></svg>

Pencil variant

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

<Bug size={32} pencil />

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

02How it's drawn

The recipe for bug

Bug is not stored as a drawing. It is a recipe of 1 ellipse, 1 arc and 4 lines 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
E 12 14.5 4.5 5.5;
A 12 9 2.8 180 360;
L 4 11 7.8 12.5;
L 20 11 16.2 12.5;
L 4 18.5 8 16.5;
L 20 18.5 16 16.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 bug. Seed 0 is the default.

wobble 0
wobble 0.25
wobble 0.5
wobble 0.75
wobble 1

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

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

True pixel sizes.

Ink
Pencil