Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

mem-font

oidoid197AGPL-3.0-only11.0.0-2TypeScript support: included

Proportional and monospaced sans light pixel font family.

font, ttf, pixel, monospaced, fixed-width, proportional, 8-bit, retro, fontforge, aseprite, game, minimal, sans

readme

mem

Proportional and monospaced sans light pixel font family. See the demo or download the fonts as TTFs and sprite sheets. Developed in FontForge and Aseprite.

Install

npm install --save-prefix= mem-font

See the changelog for release notes.

Files

  • *.ttf: TrueType font file. The format is mem-<variable width>-<width>x<height> where "variable width" is prop for proportional or mono for monospaced, and width and height are cell width and height in pixels. Files containing "-aseprite" in their name have their kerning multiplied for correct rendering in Aseprite.
  • *.json: font metadata (kerning and other metrics for games).
  • *-sheet.png: 1x spritesheet (for games)
  • *-sheet.json: 1x Aseprite metadata (for games)
  • *.sfd: FontForge file (mostly for debugging the TTF).
  • *-10x-sheet.png: 10x spritesheet (mostly for demoing in the readme and easier diffing).
  • *-10x-sheet.json: Aseprite metadata for the 10x spritesheet.
  • *.ttfdump: True Type Font File Dumper dumps for each TTF (for debugging and tracking changes). Files containing "-aseprite" in their name have their kerning multiplied for correct rendering in Aseprite.

See also font metadata and Aseprite metadata sections below.

Fonts

All characters in each font set appear below. Blank cells are missing (undefined) characters. The fonts are ordered from greatest to least line height with tie-breakers going to greatest width then proportional font.

mem 5x6

mem 5x6 10x spritesheet

Download

mem 5x5

mem 5x5 10x spritesheet

Download

mem 3x5

mem 3x5 10x spritesheet

Download

mem 4x4

mem 4x4 10x spritesheet

Download

mem mono 4x4

mem mono 4x4 10x spritesheet

Download

mem mono 3x3

mem mono 3x3 10x spritesheet

Download

Font Metadata

Additional information for the font including name, kerning, and other layout metrics.

Aseprite Metadata

Additional information spritesheet interpretation. See the atlas-pack definition.

Known issues

See the to-do for more issues.

Design Principles

mem 5x6

  • Excellent high- and low-scale (compact) readability, smoothness (pixel clustering), and visual consistency of the whole character set at the expense of form adherence for individual characters. For example, the lowercase o could be rounder but this comes at the cost of making the font noisier and it is very legible square rather than round. As a counterexample, the lowercase g could be smoother but then it looks too similar to the lowercase o so some exceptions are made.
  • Favor 3x5 pixels for every capital character.
  • Favor 3x4 pixels for every lowercase character.
  • Every numeric is the same width and height, 3x5 pixels, so that countdowns don't shift.
  • The preferred inflection for lowercase is one pixel from the top, for the sake of the lowercase e. Everything else is two pixels from the top.
  • The font is sans so avoid serifs.
  • The font is light so avoid pixel doubling.

Development

Make targets

The development workflow is based around the watch make target:

make watch
  • watch: build, serve, and reload changes on-the-fly.
  • build: generate all artifacts.

Undocumented targets are considered internal utilities and not expressly supported workflows.

Aseprite

Aseprite is open-source and excellent for pixel graphics. A big chunk of this repo is making a workflow from Aseprite through FontForge.

System Prerequisites

You can install the first three on Debian with sudo apt install fontforge potrace texlive-binaries.

Image Diff

Image diffing with Git is useful for verifying changes but requires a custom configuration. One possible setup is described in git-diff-img

Testing the TTF

On Debian, symlink the TTFs in dist to ~/.fonts. You may need to regenerate your font cache depending on the change made: fc-cache -f -v. The latter seems necessary for GIMP (and takes effect on next any text layout change) but not Aseprite which references the TTF files directly.

Alternatives

To-Do

References

License

© oidoid.

AGPL-3.0-only

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

╭>°╮┬┌─╮╭─╮┬┌─╮
│  │││ ││ │││ │
╰──╯┴└─╯╰─╯┴└─╯

changelog

Changelog

Versions and bullets are arranged chronologically from latest to oldest.

v11.0.0

  • Migrate to NPM.

v10.0.0

  • [API][build] Move FontMeta to Font, add line-height, inline ooz build dependency

v9.0.0

  • [build] Revise Aseprite tag format

v8.0.2

  • [build] Add TypeScript build recipes; rename dev recipe to watch.

v8.0.1

  • [fix] Add correct versioning.

v8.0.0

  • [build] Use TitleCase tags.

v7.0.4

  • [docs] Rework readme for deno.land/x

v7.0.3

  • [build] Ignore ttfdumps for Deno size limits

v7.0.0

  • Migrate to Deno
  • [build] shish-kebab TypeScript filenames
  • [docs] Revise some comments
  • [mem prop 5x6] Fix q kerning
  • [mem prop 5x6] Improve many more kerning pairs
  • [mem prop 5x6] Remove % and obelus ambiguity
  • [mem prop 5x6] Improve many kerning pairs
  • [mem prop 5x6] Simplify %
  • [mem prop 5x6] Lighten %
  • [mem prop 5x6] Reduce kerning for Sj, Sz, and Zz
  • [mem prop 5x6] Reduce q and ? width and improve kerning
  • [docs] Rename oddoid to oidoid
  • [demo][fix] Fix link
  • [demo] Add Dracula example
  • [mem prop 5x6][mem prop 5x5][mem prop 3x5] straighten semicolon, lower colon and semicolon
  • [docs] Improve download link specificity
  • [mem prop 5x6][mem prop 5x5][mem prop 3x5] straighten comma
  • [build] Export TypeScript definitions
  • [build] Add copyright to font for deterministic builds
  • [build] Revise TypeScript config
  • [test][build] Upgrade TypeScript
  • [demo] Reduce horizontal page margin to match top
  • [docs] Add explicit license

v6.0.4

  • [build] Upgrade dependencies
  • [mem prop 5x6][update] reduce kerning for "s,"
  • [mem prop 5x6][update] reduce kerning for "T.", "r,", and "r."
  • [dev] upgrade dependencies
  • [dev] move the dashboard below the header
  • [dev] disable demo's sticky header on mobile

v6.0.3

  • [fix] workaround Aseprite kerning

v6.0.2

  • [mem prop 5x6][update] extend W and M
  • [mem mono 3x3][update] center ., :, and ~; widen c; raise n; smooth N
  • [update] rename all monospaced fonts
  • [mem prop 5x6][update] reduce all , kerning; trim & descender
  • [update] rename all proportional fonts
  • [dev] drop empty glyph ranges from demo
  • [dev] fix favicon for dark backgrounds
  • [mem prop 5x6][update] drop code page 437; make 9 a rotated 6; make W a flipped M; descend &
  • [mem prop 3x5][update] improve parity with 5x6

v6.0.1

  • [docs][fix] Changelog link

v6.0.0

  • [dev][fix] Chrome font rendering in demo
  • [dev] overhaul demo
  • [mem prop 5x6][update] smooth / and \
  • [dev][fix] NPM keywords
  • [dev] add GitHub banner
  • [mem prop 5x6][update] add CP437 glyphs; raise serif on 1; add leg to R; smooth b, d, i, j, q; improve x's proportions
  • [mem prop 5x6][update] smooth V, h, j, p, and v
  • [mem prop 5x6][update] shrink uppercase to 3px wide (A, B, C, D, E, F, G, H, J, K, L, N, O, P, Q, R, S, T, U, V, X, Y, and Z); make 0 angular
  • [dev] format with Prettier
  • [mem prop 5x6][update] smooth smileys and most caps (&, A, B, C, G, J, N, O, P, Q, S, T, U, and Y); widen r
  • [docs] update website
  • [build][dev] upgrade to Aseprite v1.2.20-x64
  • [dev] revise demo to be more presentable
  • [mem prop 5x6][update] emphasize % bowls
  • [dev][fix] increase live-server watch debounce duration
  • [mem prop 5x6][update] shrink ?
  • [dev] add start script
  • [dev] add CNAME record
  • [dev] move demo.html to index.html
  • [update] shrink V's width
  • [mem prop 5x6][docs] add design principles
  • [update] smooth c
  • [update] favor smoothing to rounding for M, W, m, n, u, w; drop serif on T; round U; drop y. and _f kerning
  • [update] round G, M, W, m, n, w; lighten J, j; raise W's tie; fix blurry favicon
  • [dev][fix] non-deterministic builds
  • [dev] add capital pangram to demo
  • [docs] note power of two sprite sheet size issue
  • [update] reduce kerning between s and j
  • [fix] font PostScript name
  • [dev] add ttfdumps
  • [update] round c; add definition to &
  • [dev] add favicon to demo
  • [update] round C and Y; smooth M and W
    • Reduce N from five to four pixels wide.
    • Increase T, Y, and Z from three to four pixels wide.
  • [update] improve capital width consistency
    • Build: lots of miscellaneous improvements
    • Fix: output missing character cels in 10x spritesheet
    • Fix: non-alphanumeric kerning
    • Update: bump out most 5x6 capitals to four pixels wide
    • Breaking: add -sheet suffix to Aseprite metadata JSON
  • [breaking][fix][update][dev][build] revise build scripts
  • [dev] add more examples to demo
  • [dev] test JSON types
  • [fix] use line height in demo
  • [update] include kern table for compatibility
  • [breaking] drop dashes in name

v5.0.0

  • [breaking] switch to Aseprite.

v4.0.0

  • [breaking] fix font name in .ttf

v3.1.3

  • [update] increase height of m

v3.1.2

  • [update] redesign 4x4 q, s
  • [update] lighten 4x4 Q

v3.1.1

  • [update] add and update 3x5 glyphs
  • [update] 4x4 glyphs
    • Redesign: *, 3, 6, @, E, K, M, S, W, e
    • Thicken: V, v
    • Lighten: 7, 9, B, C, Q, U, j, l, o, s, u, z, ~
  • [update] 4x4 mono
    • Thicken 4, G, a
    • Lighten e, r

v3.1.0

  • New: experimental 3x2, 3x3, and 3x5px sizes (not exported)
  • [update] r glyph

v3.0.4

  • [update] n and o glyphs

v3.0.3

  • [update] increase height of n to match u and m

v3.0.2

  • [update] kern L and l to T and t

v3.0.1

  • [fix] f geometry in proportional .fnt file
  • [update] improve glyphs for @, B, D, R
  • [update] recenter D, E, K, and guillemets («, »)

v3.0.0

  • [breaking] split font into mem mono and mem (proportional)
  • [fix] character codes 240 - 246
  • [update] improve glyphs for beamed eighth note (♫), one (1), lowercase f, uppercase G, uppercase J, uppercase M, lower and uppercase W

v2.0.1

  • [fix] add space character to FontForge and .ttf output

v2.0.0

  • [breaking](partial) implementation of Code Page 437

v1.1.0

  • New: sprite sheet and .fnt character map
  • [update] crop 1px padding
  • [update] thicken right leg of w's and push grave accent (`) right one pixel

v1.0.3

  • [fix] exclude intermediate build files from NPM package

v1.0.2

  • [fix] include build folder in Git version commit

v1.0.1

  • [fix] include binary in NPM package

v1.0.0

  • [new] initial release