mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
@@ -5,7 +5,8 @@ All notable changes to the epaint crate will be documented in this file.
|
||||
## Unreleased
|
||||
* ⚠️ BREAKING: Fix text being too small ([#2069](https://github.com/emilk/egui/pull/2069)).
|
||||
* ⚠️ BREAKING: epaint now expects integrations to do all color blending in gamma space ([#2071](https://github.com/emilk/egui/pull/2071)).
|
||||
* Add `Fonts::has_glyph(s)` for querying if a glyph is supported ([#2202](https://github.com/emilk/egui/pull/2202)).
|
||||
* Added `Fonts::has_glyph(s)` for querying if a glyph is supported ([#2202](https://github.com/emilk/egui/pull/2202)).
|
||||
* Added support for [thin space](https://en.wikipedia.org/wiki/Thin_space).
|
||||
|
||||
|
||||
## 0.19.0 - 2022-08-20
|
||||
|
||||
@@ -156,6 +156,23 @@ impl FontImpl {
|
||||
}
|
||||
}
|
||||
|
||||
if c == '\u{2009}' {
|
||||
// Thin space, often used as thousands deliminator: 1 234 567 890
|
||||
// https://www.compart.com/en/unicode/U+2009
|
||||
// https://en.wikipedia.org/wiki/Thin_space
|
||||
|
||||
if let Some(space) = self.glyph_info(' ') {
|
||||
let em = self.height_in_points; // TODO(emilk): is this right?
|
||||
let advance_width = f32::min(em / 6.0, space.advance_width * 0.5);
|
||||
let glyph_info = GlyphInfo {
|
||||
advance_width,
|
||||
..GlyphInfo::default()
|
||||
};
|
||||
self.glyph_info_cache.write().insert(c, glyph_info);
|
||||
return Some(glyph_info);
|
||||
}
|
||||
}
|
||||
|
||||
// Add new character:
|
||||
use ab_glyph::Font as _;
|
||||
let glyph_id = self.ab_glyph_font.glyph_id(c);
|
||||
|
||||
Reference in New Issue
Block a user