Expand description
Provides pre-rasterized characters from the “Noto Sans Mono” font in different sizes and font
weights for multiple unicode ranges. This crate is no_std
and needs no allocations or floating
point operations. Useful in kernels and bootloaders when only “soft-float” is available. Strictly
speaking, this crate is more than a basic bitmap font, because it encodes each pixel as a byte
and not as a bit, which results in a much nicer result on the screen.
- Original font files taken from: https://fonts.google.com/noto/specimen/Noto+Sans+Mono
- License: SIL Open Font License (OFL) https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL
§TL;DR
- ✅
no_std
, zero allocations, no floating point operations - ✅ most important symbols, numbers, and letters as pre-rasterized constant. Unicode-ranges are selectable.
- ✅ Noto Sans Mono font as base
- ✅ different sizes and font weights (light, normal, bold)
- ✅ nice anti-aliasing/smoothing and better looking than legacy bitmap fonts
- ✅ every pixel is encoded in a byte (0-255) and not a bit, which results in a much nicer result on the screen.
- ✅ relevant font sizes, such as 14, 18, 22, and 32px (as optional build time features)
- ✅ zero dependencies
- ✅ All characters are aligned in their box/raster. If they are printed next to each other, the result looks nice.
Please check README.md for more details.
Structs§
- Describes the relevant information for a rendered char of the font.
Enums§
- Supported font weights.
- The height of the pre-rasterized font.
Functions§
- Returns the width in pixels a char will occupy on the screen.