File text icon

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

file-text

01Use it

Use file-text

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

<FileText size={24} />

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

JavaScript

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

toSvg(FileText, { 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-file-text" data-sketch="" aria-hidden="true"><path d="M14.75 3.3Q10.46 3.09 6.18 3.48Q6.19 12.08 6.02 20.67Q12.07 20.78 18.11 20.66Q18.06 14.01 18.06 7.35Q15.89 5.54 14 3.44Q13.83 5.49 13.85 7.54Q16.02 7.33 18.2 7.35" stroke-width="1.696"/><path d="M8.49 9.14Q9.93 9.08 11.37 9.01" stroke-width="1.472"/><path d="M8.78 12.34Q12.11 12.4 15.44 12.54" stroke-width="1.712"/><path d="M8.77 16.33Q11.95 16.21 15.13 16.31" stroke-width="1.824"/></svg>

Pencil variant

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

<FileText size={32} pencil />

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

02How it's drawn

The recipe for file-text

File text is not stored as a drawing. It is a recipe of 1 polyline 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 14 3.5 6 3.5 6 20.5 18 20.5 18 7.5 14 3.5 14 7.5 18 7.5;
L 9 9 11 9;
L 9 12.5 15 12.5;
L 9 16.5 15 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 file-text. Seed 0 is the default.

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

True pixel sizes.

Ink
Pencil