Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sinclair ZX Spectrum-derived Espruino font
/* Glyphs copyright (c) 1982 Sinclair Research Ltd/Amstrad plc/Sky plc. Non-commercial use approved. */
/* Made with ❤ by Steve Anderson/Irregular Shed, 2018. */
/*
Classic 8x8 Sinclair font, taken from a ZX Spectrum, with
* added backtick and Euro symbols
* pounds sterling and copyright symbols moved to standard ISO/IEC 8859-1 locations
Created using http://ebfc.mattbrailsford.com/
Usage:
```
require("FontSinclair").add(Graphics);
g.setFontSinclair();
g.drawString("© 1982 Sinclair Research Ltd", 0, 0);
```
*/
const font = atob("AAAAAAAAAAAAAAB6AAAAAAAAYAAAYAAAACR+JCR+JAAAADoqfyouAABiZAgQJkYAAAQqUioECgAAAAAgQAAAAAAAAAA8QgAAAABCPAAAAAAAAAgqHCoIAAAACAg+CAgAAAAAAQYAAAAAAAgICAgIAAAAAAYGAAAAAAACBAgQIAAAPEZKUmI8AAAAIkJ+AgIAACZKSkpKMgAAJEJCUlIsAAAMFCR+BAQAAHRSUlJSTAAAPFJSUlIMAABAQEZIUGAAACxSUlJSLAAAMEpKSko8AAAAABIAAAAAAAABJgAAAAAAAAAIFCIAAAAAFBQUFBQAAAAAIhQIAAAAIEBASlAgAAA8QlpqWjgAAD5ISEhIPgAAflJSUlIsAAA8QkJCQiQAAH5CQkIkGAAAflJSUlJCAAB+UFBQUEAAADxCQkpKLAAAfhAQEBB+AAAAQkJ+QkIAAAwCAgICfAAAfhAQKEQCAAB+AgICAgIAAH4gEBAgfgAAfiAQCAR+AAA8QkJCQjwAAH5ISEhIMAAAPEJKRkI8AAB+SEhITDIAACRSUlJSDABAQEB+QEBAAAB8AgICAnwAAHgEAgIEeAAAfAIEBAJ8AABCJBgYJEIAQCAQDhAgQAAAQkZKUmJCAAAAAAB+QkIAACAQCAQCAAAAQkJ+AAAAAAAQIH4gEAAAAQEBAQEBAQEAAABAIAAAAAAEKioqHgAAAAB+EhISDAAAABwiIiIAAAAMEhISfgAAABwqKioSAAAAAAA+UEAAAAAYJSUlPgAAAH4QEBAOAAAAABJeAgAAAAAAAgEBXgAAAAB+GCQCAAAAAAB8AgIAAAA+IB4gHgAAAD4gICAeAAAAHCIiIhwAAAA/JCQkGAAAABgkJCQ/AQAAAB4gICAAAAASKioqBAAAAAAgfCICAAAAPAICAjwAAAAwDAIMMAAAADwCHAI8AAAAIhQIFCIAAAA4BQUFPgAAACImKjIiAAAAABAQbkJCAAAAAAB+AAAAAEJCbhAQAAAAACBAIEAAAAAAAAAAAAAAABg8WlpCJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASPlJSQiIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADxCmaWlgUI8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
exports.add = function(graphics) {
graphics.prototype.setFontSinclair = function() {
g.setFontCustom(font, 32, 8, 8);
}
}
@IrregularShed

This comment has been minimized.

Copy link
Owner Author

IrregularShed commented Dec 10, 2018

The source image I fed into http://ebfc.mattbrailsford.com/
spectrum font

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.