niklauslee / simple-fonts

Simple bitmap fonts for Kaluma

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple Fonts for Kaluma

This module includes several bitmap fonts for Kaluma as below:

  • minimal : A minimal font (3x5 pixels).
  • leros : A monotype font (5x10 pixels).
  • yamaha : A monotype font (6x11 pixels).
  • lee-sans : A variable-width font (10x10 pixels).

Install

npm i https://github.com/niklauslee/simple-fonts

Usage

var font = require('simple-fonts/minimal');
// var font = require('simple-fonts/leros');
// var font = require('simple-fonts/yamaha');
// var font = require('simple-fonts/lee-sans');

// get graphic context 'gc' from a driver (e.g. 'ssd1306')
gc.setFont(font);
gc.drawText(0, 0, "LOREM IPSUM DOLOR SIT AMET...");
gc.display();

Glyphs

minimal

glyph-minimal

leros

glyph-leros

yamaha

glyph-yahama

lee-sans

glyph-lee-sans

License

MIT

About

Simple bitmap fonts for Kaluma

License:MIT License


Languages

Language:JavaScript 100.0%