<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Matita]]></title><description><![CDATA[Matita]]></description><link>https://matita.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6ac613744bba77490b391d2b/bffe3b4a-01c9-47bb-9e62-75b452c13d41.png</url><title>Matita</title><link>https://matita.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Tue, 27 Oct 2026 20:46:37 GMT</lastBuildDate><atom:link href="https://matita.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Matita icons 0.4.0: 60 new pencil-style icons and Wobble]]></title><description><![CDATA[Matita icons 0.4.0 adds 60 new pencil-style SVG icons, including a medical and science set, and a wobble setting that goes from sketchy to exact shapes.]]></description><link>https://matita.hashnode.dev/matita-icons-0-4-0-60-new-pencil-style-icons-and-wobble</link><guid isPermaLink="true">https://matita.hashnode.dev/matita-icons-0-4-0-60-new-pencil-style-icons-and-wobble</guid><category><![CDATA[icon-set]]></category><category><![CDATA[Icons]]></category><category><![CDATA[svg icons]]></category><category><![CDATA[icon library]]></category><category><![CDATA[pencil,]]></category><category><![CDATA[icon]]></category><category><![CDATA[Sketch]]></category><category><![CDATA[SVG]]></category><dc:creator><![CDATA[matita]]></dc:creator><pubDate>Sat, 24 Oct 2026 09:39:19 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6ac613744bba77490b391d2b/51f30e69-1359-48b5-b0da-218e683f13b0.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Matita Icons is a free set of pencil-style icons for the web, drawn by code: lines run a little past their ends, box corners cross, circles overlap where the pen closes. 0.4.0 is out: <strong>60 new icons (200 to 260)</strong> and a <strong>wobble</strong> setting that goes from the full sketchy look all the way down to exact shapes.</p>
<img src="https://matita.dev/set.png?v=0.4.0" alt="All Matita icons on graph paper" style="display:block;margin:0 auto" />

<h2>60 new icons</h2>
<p>The most concrete request last time was a medical and science set, so that is the biggest group: 22 icons, including <code>stethoscope</code>, <code>syringe</code>, <code>microscope</code>, <code>dna</code>, <code>x-ray</code>, <code>brain</code>, <code>tooth</code> and <code>ambulance</code>. The other 38 fill everyday gaps: <code>timer</code>, <code>calculator</code>, <code>trophy</code>, <code>wrench</code>, <code>car</code>, <code>plane</code>, <code>file-check</code>, <code>user-check</code> and more.</p>
<p>Each glyph is checked at 96 px and at 24 px before it goes in. Some did not pass: a fingerprint read as wifi, so it is out, and six icons (including the brain and the car) were drawn twice. Greek letters, a lab coat and a surgeon did not make it either; I couldn't draw them clearly at 24 px yet.</p>
<h2>Wobble: one number, sketchy to exact</h2>
<pre><code class="language-jsx">&lt;SketchIcon name="wrench" /&gt;              // the full hand (default)
&lt;SketchIcon name="wrench" wobble={0.4} /&gt; // a calm hand
&lt;SketchIcon name="wrench" wobble={0} /&gt;   // exact shapes
</code></pre>
<p>![One glyph at wobble 1, 0.75, 0.5, 0.25 and 0](upload devto/fig-wobble.png)</p>
<p>Every habit of the pencil in the engine already had an amount (overshoot, bow, jitter, how far a ring overlaps). Wobble multiplies them. At <code>1</code> it multiplies by nothing, so the default draws exactly what 0.3.0 drew. At <code>0</code> the engine skips the sketching and draws the plotted shapes as they are: true lines, closed circles, square corners. The random numbers do not depend on the wobble, so <code>0.5</code> is the same drawing as <code>1</code>, only calmer.</p>
<p>Exact icons are small, too: about 0.47 KB per SVG against about 0.82 KB for the sketchy one, and there are ready-made files for all 260 at <code>@matita/icons/exact/&lt;name&gt;.svg</code>.</p>
<h2>Try it</h2>
<pre><code class="language-sh">npm i @matita/icons
</code></pre>
<p>React components, plain SVG, a script tag, a sprite and a Figma file. MIT, free, no signup. Play with the Wobble slider on <a href="https://matita.dev">matita.dev</a>, see what changed in the <a href="https://matita.dev/changelog/">changelog</a>, and what is next on the <a href="https://matita.dev/roadmap/">roadmap</a>. If an icon is missing, <a href="https://github.com/matita-dev/icons/issues/new/choose">open an issue</a> and I'll draw it.</p>
<p><em>The full write-up, with how the wobble works inside the engine: [</em><a href="https://dev.to/matita/matita-040-60-new-icons-and-one-number-from-sketchy-to-exact-3di4"><em>LINK to the dev.to article</em></a><em>].</em></p>
]]></content:encoded></item><item><title><![CDATA[Hand-drawn icons that draw the same every time]]></title><description><![CDATA[I wanted icons that look drawn with a pencil: lines that run a little past their ends, box corners that cross, circles that don't quite close where they…]]></description><link>https://matita.hashnode.dev/hand-drawn-icons-that-draw-the-same-every-time</link><guid isPermaLink="true">https://matita.hashnode.dev/hand-drawn-icons-that-draw-the-same-every-time</guid><dc:creator><![CDATA[matita]]></dc:creator><pubDate>Wed, 07 Oct 2026 09:45:03 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6ac613744bba77490b391d2b/ac7af4e2-251e-4853-86fb-6a436a8a8e33.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I wanted icons that look drawn with a pencil: lines that run a little past their ends, box corners that cross, circles that don't quite close where they started. But I also wanted them to behave like a normal icon set: same grid, same stroke, <code>currentColor</code>, tree-shakable, and the exact same drawing on the server and in the browser.</p>
<p>The result is <a href="https://matita.dev">Matita</a> (Italian for pencil): 173 icons, MIT, on npm as <code>@matita/icons</code>. This post is about the small engine that draws them.</p>
<img src="https://matita.dev/set.png" alt="All Matita icons on graph paper" style="display:block;margin:0 auto" />

<h2>Glyphs are plotted, not drawn</h2>
<p>Nobody draws the icons by hand. Each glyph is a line of drafting primitives on a 24 × 24 grid, the kind of thing you'd plot with a ruler and compass:</p>
<pre><code class="language-js">calendar: 'R 4 5.5 16 15; L 4 10 20 10; L 8.5 3.5 8.5 7; L 15.5 3.5 15.5 7',
search:   'C 10.5 10.5 6.2; L 15.2 15.2 20 20',
clock:    'C 12 12 8.5; P 12 7 12 12 15.5 14',
</code></pre>
<p>There are nine primitives: <code>L</code> line, <code>P</code> open polyline, <code>Z</code> closed polyline, <code>R</code> rect, <code>C</code> circle, <code>E</code> ellipse, <code>A</code> arc, <code>Q</code> quadratic curve and <code>O</code> dot. Most glyphs use two to five of them. That keeps the source tiny and makes the set consistent: every icon is built from the same handful of shapes, and the engine applies the same habits to all of them.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ac613744bba77490b391d2b/ded6bc86-e581-40a7-8cf9-3d97585a951a.png" alt="The calendar glyph: its source plotted in blue, the drawn version in black, and both overlaid" style="display:block;margin:0 auto" />

<h2>Same name, same drawing</h2>
<p>The randomness is seeded by the icon's name. A 32-bit FNV-1a hash of <code>"calendar"</code> seeds a small PRNG (a few lines of integer mixing), and every random choice the engine makes for that glyph comes from that stream, in a fixed order:</p>
<pre><code class="language-js">const hash = s =&gt; { let h = 2166136261; for (const c of s) { h ^= c.charCodeAt(0); h = Math.imul(h, 16777619); } return h &gt;&gt;&gt; 0; };
const random = prng(hash(name) + seed * 7919);
</code></pre>
<p>So <code>calendar</code> is drawn the same way on every machine, in every build, forever, unless its source changes. That matters more than it sounds:</p>
<ul>
<li><p><strong>No hydration mismatch.</strong> The server-rendered SVG and the client-rendered SVG are byte-identical.</p>
</li>
<li><p><strong>No flicker.</strong> Nothing re-rolls on re-render.</p>
</li>
<li><p><strong>Snapshot tests stay green.</strong></p>
</li>
<li><p><strong>No drawing at runtime.</strong> The whole set is drawn once at build time and the package ships the finished path data; the engine only runs if you ask for another seed or your own glyph. One icon adds about 1 kB gzipped to a bundle, renderer included; ten add about 4 kB.</p>
</li>
</ul>
<p>If you don't like a particular drawing, pass a <code>seed</code> and get another hand for the same glyph:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ac613744bba77490b391d2b/c56778e6-16a2-4d2e-81ef-3f10d6dcdaf3.png" alt="The image glyph drawn with seeds 0 to 4" style="display:block;margin:0 auto" />

<h2>The habits of a pencil</h2>
<p>The engine is about 90 lines. Each primitive gets a few habits, all small, all bounded. Units below are grid units, and at 24 px one unit is one pixel.</p>
<p><strong>Lines overshoot.</strong> Both ends of a line are pushed out along its direction by 0.2 to 0.5, and each endpoint moves by up to ±0.2. The line is then drawn as a quadratic curve whose control point sits a little off the midpoint, so it bows slightly, by at most 0.7 or 4.5 % of its length, whichever is smaller. A ruled pencil line is never perfectly straight and rarely stops exactly where you aimed.</p>
<p><strong>Boxes cross at the corners.</strong> A rect isn't a closed path. It's four separate lines with a bigger overshoot (0.5 to 1.5), so every corner is a small cross, like a box drawn edge by edge.</p>
<p><strong>Circles overlap where the pen closes.</strong> A circle starts at a random angle and sweeps 388° to 418°, so the pen runs 28° to 58° past where it started. Over the sweep the radius drifts outward by 0.55 to 1, so the closing pass sits just outside the opening one instead of on top of it. Each point gets ±2.8 % radius noise, the whole ring is squashed by up to 4.5 %, and the points are joined with smooth cubic Béziers.</p>
<p><strong>Polylines keep sharp joints.</strong> Every vertex moves by up to ±0.2 and every segment bows on its own, but the joints stay sharp: a check mark still has a point at the bottom. Open polylines overshoot at both ends; closed ones run past their starting point along the first edge, the way you'd close a shape without lifting the pencil.</p>
<p><strong>Pressure varies per stroke.</strong> Every primitive gets its own stroke width, between 0.86 and 1.14 times the base 1.6.</p>
<p><strong>Dots are taps.</strong> A dot is a near-zero-length segment with a round cap, 1.55 times as heavy as a line.</p>
<p>None of this is noise for its own sake. Each rule is something your hand does when it draws with a ruler, and each one has a cap so the icon still reads at 16 px.</p>
<h2>Small sizes are the real test</h2>
<p>A hand-drawn style is easy at 96 px and hard at 16 px. Too much wobble and a 16 px icon turns to mush. The caps above are what keep it usable: at 24 px a line bows by less than a pixel and an endpoint moves by a fifth of one, and the stroke never goes below 1.38. At UI sizes the set reads like a regular line icon set; the pencil character shows from about 32 px up.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ac613744bba77490b391d2b/afb203fa-91a3-4d61-9d52-086c8c63caa1.png" alt="Four icons at 16, 20, 24, 32, 48 and 96 px, true pixels" style="display:block;margin:0 auto" />

<h2>The pencil variant</h2>
<p>Every icon also has a pencil version. The engine draws the glyph a second time with a different seed and lays that pass under the first, thinner (0.55×) and faint (32 % opacity). The main strokes drop to 80–95 % opacity, and a CSS mask built from two <code>feTurbulence</code> layers adds paper grain. It's all still SVG and CSS, no images.</p>
<pre><code class="language-jsx">&lt;SketchIcon name="ruler" pencil /&gt;
</code></pre>
<h2>Using it</h2>
<pre><code class="language-sh">npm i @matita/icons
</code></pre>
<pre><code class="language-jsx">import { ArrowRight, SketchIcon, SketchIconProvider } from '@matita/icons/react';

&lt;ArrowRight size={20} /&gt;
&lt;SketchIcon name="calendar" seed={2} /&gt;
&lt;SketchIconProvider size={24} strokeWidth={1.4}&gt;…&lt;/SketchIconProvider&gt;
</code></pre>
<p>Without React, <code>toSvg(icon)</code> returns a string, there's a script-tag build that swaps <code>&lt;i data-sketch-icon="…"&gt;</code> for SVGs, and plain <code>.svg</code> files and a sprite ship in the package.</p>
<p>The engine is public too, so you can draw your own glyphs in the same hand:</p>
<pre><code class="language-jsx">import { drawIcon } from '@matita/icons/engine';
import { createSketchIcon } from '@matita/icons/react';

const Kite = createSketchIcon(drawIcon('kite', {
  defs: { kite: 'Z 12 3 18 10 12 21 6 10; L 6 10 18 10; L 12 3 12 21' },
}));
</code></pre>
<h2>What's next</h2>
<p>Vue and Svelte packages. The whole set is already in Figma as a <a href="https://www.figma.com/community/file/1688850201209755442/matita-icons-freehand-pencil-icon-set">free Community file</a>, every icon a component. If an icon you need is missing, <a href="https://github.com/matita-dev/icons/issues/new/choose">open an icon request</a>; new glyphs are a line of primitives each, so they're quick to add.</p>
<ul>
<li><p>Site and icon browser: <a href="https://matita.dev">https://matita.dev</a></p>
</li>
<li><p>Code: <a href="https://github.com/matita-dev/icons">https://github.com/matita-dev/icons</a></p>
</li>
<li><p>npm: <a href="https://www.npmjs.com/package/@matita/icons">https://www.npmjs.com/package/@matita/icons</a></p>
</li>
<li><p>Figma: <a href="https://www.figma.com/community/file/1688850201209755442/matita-icons-freehand-pencil-icon-set">https://www.figma.com/community/file/1688850201209755442/matita-icons-freehand-pencil-icon-set</a></p>
</li>
</ul>
]]></content:encoded></item></channel></rss>