1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 04:40:03 -04:00

Add snapshot test for text spacing/kerning (#7545)

This commit is contained in:
Emil Ernerfeldt
2025-09-16 13:30:28 +02:00
committed by GitHub
parent f2f00ef62a
commit 603dba29e6
6 changed files with 39 additions and 1 deletions

View File

@@ -259,7 +259,7 @@ impl FontImpl {
if let Some(space) = self.glyph_info(' ') {
let em = self.ab_glyph_font.units_per_em().unwrap_or(1.0);
let advance_width = f32::min(em / 6.0, space.advance_width_unscaled.0 * 0.5);
let advance_width = f32::min(em / 6.0, space.advance_width_unscaled.0 * 0.5); // TODO(emilk): make configurable
let glyph_info = GlyphInfo {
advance_width_unscaled: advance_width.into(),
..space