Package Exports
- text2matrix
- text2matrix/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (text2matrix) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Text2Matrix
Introduction
Convert text strings into customizable pixel matrices with options for max height, letter spacing, and more. Ideal for LED displays and creative typographic applications.
Installation
npm install text2matrix
Usage
const text2matrix = require("text2matrix");
async function main() {
const text = "Hello World!";
const myFont = "myFont.ttf";
const key = await text2matrix.addFont(myFont);
const matrix = text2matrix.text2matrix(text, key, {
maxHeight: 10,
letterSpacing: 1,
});
}