1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 21:00:03 -04:00
Files
egui/crates/epaint_default_fonts/README.md
Emil Ernerfeldt 08186f15d3 Switch the default egui font to Albert Sans
Follows the same approach as #8261: replaces Ubuntu-Light with a
variable font hinted via ttfautohint, updates fallback references,
loosens a couple of tests that hard-coded font-specific pixel values,
and regenerates all visual snapshots.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-22 11:56:29 +02:00

26 lines
1.2 KiB
Markdown

# `epaint_default_fonts` - fonts for epaint and egui
[![Latest version](https://img.shields.io/crates/v/epaint_default_fonts.svg)](https://crates.io/crates/epaint_default_fonts)
[![Documentation](https://docs.rs/epaint_default_fonts/badge.svg)](https://docs.rs/epaint_default_fonts)
[![unsafe forbidden](https://img.shields.io/badge/unsafe-forbidden-success.svg)](https://github.com/rust-secure-code/safety-dance/)
![MIT](https://img.shields.io/badge/license-MIT-blue.svg)
![Apache](https://img.shields.io/badge/license-Apache-blue.svg)
Default fonts that are used in `epaint` and `egui`. Not intended for use as a standalone library.
Made for [`egui`](https://github.com/emilk/egui/).
## Font hinting
`epaint` relies on embedded TrueType hinting instructions for crisp text on low-dpi
screens: skrifa only auto-hints a font that lacks an interpreter program, so a font with
no glyph instructions renders unhinted and blurry.
`Albert Sans` shipped without glyph instructions, so it was hinted with
[`ttfautohint`](https://www.freetype.org/ttfautohint/), which preserves its variable axis:
```sh
ttfautohint --windows-compatibility \
"AlbertSans-VariableFont_wght.ttf" "AlbertSans-VariableFont_wght.ttf"
```