# letter-bitmap

> Generate a single-channel bitmap for an individual character of a given font

Latest version **1.0.0** (published 2014-09-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install letter-bitmap
pnpm add letter-bitmap
yarn add letter-bitmap
bun add letter-bitmap
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2014-09-18 |
| First published | 2014-09-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Hugh Kennedy |
| Maintainers | hughsk |
| Keywords | font, letter, data, generate, canvas, array, bitmap, image, mask |

## Links

- npm: https://www.npmjs.com/package/letter-bitmap
- Repository: https://github.com/hughsk/letter-bitmap
- Issues: https://github.com/hughsk/letter-bitmap/issues
- npm.io page: https://npm.io/package/letter-bitmap

## Dependencies (2)

- [assert](https://npm.io/package/assert.md) ^1.1.2
- [canvas-pixels](https://npm.io/package/canvas-pixels.md) 0.0.0

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2014-09-18

## README

# letter-bitmap [![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)

Generate a single-channel bitmap for an individual character of a given font.

## Usage

[![NPM](https://nodei.co/npm/letter-bitmap.png)](https://nodei.co/npm/letter-bitmap/)

### `data = letter(char, font, size, [context])`

Returns a 2D `Float32Array` containing the font data, on a scale from 0 (empty)
to 255 (solid).

* `char` is the character you want to render.
* `font` is the font family you'd like to use.
* `size` is the total width/height of the canvas, in pixels. The final data
  length will be `size * size`.
* `context` is an optional 2D canvas context to use. Note that this will mess
  with the canvas itself.

[![letter-bitmap](http://imgur.com/5W9XirT.png)](http://hughsk.io/letter-bitmap)

## License

MIT. See [LICENSE.md](http://github.com/hughsk/letter-bitmap/blob/master/LICENSE.md) for details.

---
_Source: https://npm.io/package/letter-bitmap · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
