Skip to content

Latest commit

 

History

History
219 lines (154 loc) · 7.4 KB

readme.md

File metadata and controls

219 lines (154 loc) · 7.4 KB

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.

Links

Alternatives

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/.

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