Ruler icon
A free pencil-style ruler icon, drawn by code from 1 rectangle and 5 lines. Use it as an SVG, a React component, or by name. MIT licensed.
01Use it
Use ruler
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 { Ruler } from '@matita/icons/react';
<Ruler size={24} />
// or by name
import { SketchIcon } from '@matita/icons/react';
<SketchIcon name="ruler" />JavaScript
import { Ruler, toSvg } from '@matita/icons';
toSvg(Ruler, { size: 24 }); // SVG stringSVG
<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-ruler" data-sketch="" aria-hidden="true"><path d="M2.49 8.36Q12.45 8.6 22.42 8.42M21.12 8.04Q20.87 12.3 20.87 16.55M22.24 15.31Q12.09 15.98 1.95 15.61M3.18 16.31Q3.27 11.84 3.07 7.36" stroke-width="1.648"/><path d="M6.02 7.8Q6 9.41 5.89 11.02" stroke-width="1.712"/><path d="M9.08 8.17Q9 9.24 9.02 10.32" stroke-width="1.648"/><path d="M11.98 8.34Q11.97 9.87 12.13 11.39" stroke-width="1.728"/><path d="M15.19 8.07Q15.2 9.39 15.09 10.7" stroke-width="1.536"/><path d="M18.01 7.96Q17.89 9.7 17.95 11.44" stroke-width="1.488"/></svg>Pencil variant
import '@matita/icons/pencil.css';
import { Ruler } from '@matita/icons/react';
<Ruler size={32} pencil />The file is icons/ruler.svg in the package (pencil/ruler.svg for the pencil variant). Matita 0.2.1.
02How it's drawn
The recipe for ruler
Ruler is not stored as a drawing. It is a recipe of 1 rectangle and 5 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.
R 3 8.5 18 7;
L 6 8.5 6 11;
L 9 8.5 9 10.2;
L 12 8.5 12 11;
L 15 8.5 15 10.2;
L 18 8.5 18 11
ruler as a number: 2647637363
Shapes: L line, P polyline, Z closed shape, R rectangle, C circle, E ellipse, A arc, Q curve, O dot. Separate shapes with ;. Edits stay on this page.
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.
Five seeds of ruler. Seed 0 is the default.
True pixel sizes.