Book icon

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

book

01Use it

Use book

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

<Book size={24} />

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

JavaScript

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

toSvg(Book, { 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-book" data-sketch="" aria-hidden="true"><path d="M19.42 16.9Q12.92 17.18 6.41 16.92" stroke-width="1.424"/><path d="M7.21 17.11C7.07 17.09 6.61 16.92 6.36 17C6.11 17.08 5.92 17.38 5.73 17.59C5.55 17.79 5.38 17.99 5.26 18.22C5.15 18.46 5.06 18.74 5.06 19C5.06 19.26 5.16 19.53 5.26 19.78C5.35 20.03 5.44 20.35 5.64 20.52C5.83 20.69 6.16 20.71 6.43 20.79C6.69 20.87 7.09 20.98 7.22 21.01" stroke-width="1.408"/><path d="M6.55 21.15Q12.87 20.57 19.2 20.92Q18.79 11.9 19.17 2.89Q12.89 2.69 6.6 2.93" stroke-width="1.504"/><path d="M7.16 3.12C7.02 3.13 6.57 3.06 6.33 3.15C6.08 3.25 5.88 3.49 5.68 3.68C5.48 3.88 5.25 4.07 5.14 4.32C5.02 4.57 5.02 5.03 5 5.17" stroke-width="1.744"/><path d="M5.11 4.44Q4.84 11.89 4.97 19.35" stroke-width="1.568"/></svg>

Pencil variant

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

<Book size={32} pencil />

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

02How it's drawn

The recipe for book

Book is not stored as a drawing. It is a recipe of 2 polylines, 2 arcs and 1 line 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
P 19 17 7 17;
A 7 19 2 270 90;
P 7 21 19 21 19 3 7 3;
A 7 5 2 270 180;
L 5 5 5 19
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 book. Seed 0 is the default.

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

True pixel sizes.

Ink
Pencil