Prescription icon

New Added in v0.5.0

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

prescription

01Use it

Use prescription

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

<Prescription size={24} />

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

JavaScript

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

toSvg(Prescription, { 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-prescription" data-sketch="" aria-hidden="true"><path d="M6.18 20.53Q5.6 12.31 6.11 4.08Q8.47 4.07 10.84 4.03" stroke-width="1.776"/><path d="M10.16 4.14C10.47 4.14 11.43 3.98 12.01 4.15C12.59 4.32 13.16 4.72 13.61 5.13C14.06 5.55 14.47 6.09 14.72 6.66C14.97 7.22 15.14 7.9 15.1 8.5C15.07 9.1 14.74 9.68 14.5 10.25C14.25 10.82 14.07 11.48 13.66 11.92C13.24 12.35 12.6 12.69 12.01 12.87C11.43 13.04 10.46 12.93 10.15 12.95" stroke-width="1.456"/><path d="M5.87 13.04Q8.55 13.29 11.22 13.17" stroke-width="1.728"/><path d="M10.25 12.71Q14.36 16.75 18.27 20.97" stroke-width="1.728"/><path d="M18.47 13.99Q15.3 17.81 11.97 21.49" stroke-width="1.488"/></svg>

Pencil variant

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

<Prescription size={32} pencil />

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

02How it's drawn

The recipe for prescription

Prescription is not stored as a drawing. It is a recipe of 1 polyline, 1 arc and 3 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
P 6 20 6 4 10.5 4;
A 10.5 8.5 4.5 270 450;
L 6 13 10.5 13;
L 10.5 13 18 21;
L 18.5 14 12.5 21
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 prescription. Seed 0 is the default.

wobble 0
wobble 0.25
wobble 0.5
wobble 0.75
wobble 1

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

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

True pixel sizes.

Ink
Pencil