README.md 569 Bytes
Newer Older
Máté Kovács's avatar
Máté Kovács committed
1
2
# unifont-rs

Máté Kovács's avatar
Máté Kovács committed
3
[Unifont](https://en.wikipedia.org/wiki/GNU_Unifont) for Rust
Máté Kovács's avatar
Máté Kovács committed
4

Máté Kovács's avatar
Máté Kovács committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Provides a monochrome bitmap font that covers the entire Unicode Basic Multilingual Plane.
Halfwidth glyphs are 8x16, fullwidth are 16x16 pixels.

## Goals

- easy to use
- small memory footprint

## How it Works

The `build.rs` script parses the `data/unifont-*.hex` file and emits Rust code.
The generated data relies on a `Glyph` type that gives easy access to pixels. 

```
impl Glyph {
    pub fn get_pixel(&self, x: usize, y: usize) -> bool,
    pub fn get_width(&self) -> usize,
}
```