From 693426d9c656035806836a9a1f56b4e34222a8d2 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Thu, 26 Aug 2021 18:50:30 +0200 Subject: [PATCH] Layout fixes (#651) * Fix incorrect max_width/height of panels * Fix set_width/set_min_width/set_height/set_min_height Closes https://github.com/emilk/egui/issues/647 Broke in https://github.com/emilk/egui/pull/629 * Fix expand_to_include_x/expand_to_include_y * Make minimum grid column width propagate properly * Expand cursor when max_rect expands * Add ui.expand_to_include_y * Only expand cursor in advance * demo: clean up font_book code * Fix: Make sure `TextEdit` contents expand to fill width if applicable * ProgressBar: minimum width and fix for having it in an infinite layout * clippy fix --- CHANGELOG.md | 6 + egui/src/containers/panel.rs | 4 +- egui/src/grid.rs | 11 +- egui/src/layout.rs | 11 + egui/src/placer.rs | 13 +- egui/src/ui.rs | 6 + egui/src/widgets/progress_bar.rs | 3 +- egui/src/widgets/text_edit.rs | 23 +- egui_demo_lib/src/apps/demo/font_book.rs | 283 ++++++++++++----------- 9 files changed, 201 insertions(+), 159 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9fabe86..d68f3af7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ NOTE: [`eframe`](eframe/CHANGELOG.md), [`egui_web`](egui_web/CHANGELOG.md) and [ ## Unreleased +### Fixed 🐛 +* Fix `set_width/set_min_width/set_height/set_min_height/expand_to_include_x/expand_to_include_y`. +* Make minimum grid column width propagate properly. +* Make sure `TextEdit` contents expand to fill width if applicable. +* `ProgressBar`: add a minimum width and fix for having it in an infinite layout. + ## 0.14.0 - 2021-08-24 - Ui panels and bug fixes diff --git a/egui/src/containers/panel.rs b/egui/src/containers/panel.rs index ab336355..f404ae4a 100644 --- a/egui/src/containers/panel.rs +++ b/egui/src/containers/panel.rs @@ -213,7 +213,7 @@ impl SidePanel { let frame = frame.unwrap_or_else(|| Frame::side_top_panel(ui.style())); let inner_response = frame.show(&mut panel_ui, |ui| { ui.set_min_height(ui.max_rect_finite().height()); // Make sure the frame fills the full height - ui.set_width_range(width_range); + ui.set_min_width(*width_range.start()); add_contents(ui) }); @@ -474,7 +474,7 @@ impl TopBottomPanel { let frame = frame.unwrap_or_else(|| Frame::side_top_panel(ui.style())); let inner_response = frame.show(&mut panel_ui, |ui| { ui.set_min_width(ui.max_rect_finite().width()); // Make the frame fill full width - ui.set_height_range(height_range); + ui.set_min_height(*height_range.start()); add_contents(ui) }); diff --git a/egui/src/grid.rs b/egui/src/grid.rs index b8a71f7e..2c0644e8 100644 --- a/egui/src/grid.rs +++ b/egui/src/grid.rs @@ -130,6 +130,9 @@ impl GridLayout { .unwrap_or(self.min_cell_size.x) }; + // If something above was wider, we can be wider: + let width = width.max(self.curr_state.col_width(self.col).unwrap_or(0.0)); + let available = region.max_rect.intersect(region.cursor); let height = region.max_rect_finite().max.y - available.top(); @@ -181,11 +184,9 @@ impl GridLayout { } self.curr_state - .set_min_col_width(self.col, widget_rect.width().at_least(self.min_cell_size.x)); - self.curr_state.set_min_row_height( - self.row, - widget_rect.height().at_least(self.min_cell_size.y), - ); + .set_min_col_width(self.col, widget_rect.width().max(self.min_cell_size.x)); + self.curr_state + .set_min_row_height(self.row, widget_rect.height().max(self.min_cell_size.y)); cursor.min.x += self.prev_col_width(self.col) + self.spacing.x; self.col += 1; diff --git a/egui/src/layout.rs b/egui/src/layout.rs index dc59f34b..1f82ed9a 100644 --- a/egui/src/layout.rs +++ b/egui/src/layout.rs @@ -74,6 +74,7 @@ impl Region { pub fn expand_to_include_x(&mut self, x: f32) { self.min_rect.extend_with_x(x); self.max_rect.extend_with_x(x); + self.cursor.extend_with_x(x); } /// Ensure we are big enough to contain the given Y-coordinate. @@ -81,6 +82,7 @@ impl Region { pub fn expand_to_include_y(&mut self, y: f32) { self.min_rect.extend_with_y(y); self.max_rect.extend_with_y(y); + self.cursor.extend_with_y(y); } } @@ -680,6 +682,15 @@ impl Layout { } }; } + } else { + // Make sure we also expand where we consider adding things (the cursor): + if self.is_horizontal() { + cursor.min.y = cursor.min.y.min(frame_rect.min.y); + cursor.max.y = cursor.max.y.max(frame_rect.max.y); + } else { + cursor.min.x = cursor.min.x.min(frame_rect.min.x); + cursor.max.x = cursor.max.x.max(frame_rect.max.x); + } } match self.main_dir { diff --git a/egui/src/placer.rs b/egui/src/placer.rs index c490a9f2..d58bf845 100644 --- a/egui/src/placer.rs +++ b/egui/src/placer.rs @@ -180,7 +180,7 @@ impl Placer { ) } - self.region.expand_to_include_rect(frame_rect); // e.g. for centered layouts: pretend we used whole frame + self.expand_to_include_rect(frame_rect); // e.g. for centered layouts: pretend we used whole frame } /// Move to the next row in a grid layout or wrapping layout. @@ -210,6 +210,11 @@ impl Placer { self.region.expand_to_include_x(x); } + /// Expand the `min_rect` and `max_rect` of this ui to include a child at the given y-coordinate. + pub(crate) fn expand_to_include_y(&mut self, y: f32) { + self.region.expand_to_include_y(y); + } + fn next_widget_space_ignore_wrap_justify(&self, size: Vec2) -> Rect { self.layout .next_widget_space_ignore_wrap_justify(&self.region, size) @@ -223,6 +228,9 @@ impl Placer { region.max_rect.min.x = rect.min.x; region.max_rect.max.x = rect.max.x; region.max_rect = region.max_rect.union(region.min_rect); // make sure we didn't shrink too much + + region.cursor.min.x = region.max_rect.min.x; + region.cursor.max.x = region.max_rect.max.x; } /// Set the maximum height of the ui. @@ -233,6 +241,9 @@ impl Placer { region.max_rect.min.y = rect.min.y; region.max_rect.max.y = rect.max.y; region.max_rect = region.max_rect.union(region.min_rect); // make sure we didn't shrink too much + + region.cursor.min.y = region.max_rect.min.y; + region.cursor.max.y = region.max_rect.max.y; } /// Set the minimum width of the ui. diff --git a/egui/src/ui.rs b/egui/src/ui.rs index 048534f0..3f65ff5c 100644 --- a/egui/src/ui.rs +++ b/egui/src/ui.rs @@ -470,6 +470,12 @@ impl Ui { self.placer.expand_to_include_x(x); } + /// Ensure we are big enough to contain the given y-coordinate. + /// This is sometimes useful to expand an ui to stretch to a certain place. + pub fn expand_to_include_y(&mut self, y: f32) { + self.placer.expand_to_include_y(y); + } + // ------------------------------------------------------------------------ // Layout related measures: diff --git a/egui/src/widgets/progress_bar.rs b/egui/src/widgets/progress_bar.rs index 0346d430..a42dd385 100644 --- a/egui/src/widgets/progress_bar.rs +++ b/egui/src/widgets/progress_bar.rs @@ -67,7 +67,8 @@ impl Widget for ProgressBar { ui.ctx().request_repaint(); } - let desired_width = desired_width.unwrap_or(ui.available_size_before_wrap().x); + let desired_width = desired_width + .unwrap_or_else(|| ui.available_size_before_wrap_finite().x.at_least(96.0)); let height = ui.spacing().interact_size.y; let (outer_rect, response) = ui.allocate_exact_size(vec2(desired_width, height), Sense::hover()); diff --git a/egui/src/widgets/text_edit.rs b/egui/src/widgets/text_edit.rs index b2c42250..25443dac 100644 --- a/egui/src/widgets/text_edit.rs +++ b/egui/src/widgets/text_edit.rs @@ -461,12 +461,12 @@ impl<'t, S: TextBuffer> TextEdit<'t, S> { const MIN_WIDTH: f32 = 24.0; // Never make a `TextEdit` more narrow than this. let available_width = ui.available_width().at_least(MIN_WIDTH); let desired_width = desired_width.unwrap_or_else(|| ui.spacing().text_edit_width); + let mut wrap_width = desired_width.min(available_width); - let make_galley = |ui: &Ui, text: &str| { + let make_galley = |ui: &Ui, wrap_width: f32, text: &str| { let text = mask_if_password(text); if multiline { - ui.fonts() - .layout_multiline(text_style, text, desired_width.min(available_width)) + ui.fonts().layout_multiline(text_style, text, wrap_width) } else { ui.fonts().layout_single_line(text_style, text) } @@ -478,15 +478,18 @@ impl<'t, S: TextBuffer> TextEdit<'t, S> { } }; - let mut galley = make_galley(ui, text.as_ref()); + let mut galley = make_galley(ui, wrap_width, text.as_ref()); let desired_height = (desired_height_rows.at_least(1) as f32) * line_spacing; - let desired_size = vec2( - desired_width.min(available_width), - galley.size.y.max(desired_height), - ); + let desired_size = vec2(wrap_width, galley.size.y.max(desired_height)); let (auto_id, rect) = ui.allocate_space(desired_size); + if (rect.width() - desired_size.x).abs() > 0.5 { + // We didn't get what we asked for. Likely we are in a justified layout, and got enlarged. + wrap_width = rect.width(); + galley = make_galley(ui, wrap_width, text.as_ref()) + } + let id = id.unwrap_or_else(|| { if let Some(id_source) = id_source { ui.make_persistent_id(id_source) @@ -502,7 +505,7 @@ impl<'t, S: TextBuffer> TextEdit<'t, S> { Sense::hover() }; let mut response = ui.interact(rect, id, sense); - let painter = ui.painter_at(Rect::from_min_size(response.rect.min, desired_size)); + let painter = ui.painter_at(rect); if enabled { if let Some(pointer_pos) = ui.input().pointer.interact_pos() { @@ -715,7 +718,7 @@ impl<'t, S: TextBuffer> TextEdit<'t, S> { response.mark_changed(); // Layout again to avoid frame delay, and to keep `text` and `galley` in sync. - galley = make_galley(ui, text.as_ref()); + galley = make_galley(ui, wrap_width, text.as_ref()); // Set cursorp using new galley: cursorp = CursorPair { diff --git a/egui_demo_lib/src/apps/demo/font_book.rs b/egui_demo_lib/src/apps/demo/font_book.rs index 7e76d9df..0601b4ed 100644 --- a/egui_demo_lib/src/apps/demo/font_book.rs +++ b/egui_demo_lib/src/apps/demo/font_book.rs @@ -108,144 +108,147 @@ impl super::View for FontBook { } fn char_name(chr: char) -> String { - unicode_names2::name(chr) - .map(|name| name.to_string().to_lowercase()) - .unwrap_or_else(|| { - #[allow(clippy::match_same_arms)] - match chr { - // Special private-use-area extensions found in `emoji-icon-font.ttf`: - // Private use area extensions: - '\u{FE4E5}' => "flag japan".to_owned(), - '\u{FE4E6}' => "flag usa".to_owned(), - '\u{FE4E7}' => "flag".to_owned(), - '\u{FE4E8}' => "flag".to_owned(), - '\u{FE4E9}' => "flag".to_owned(), - '\u{FE4EA}' => "flag great britain".to_owned(), - '\u{FE4EB}' => "flag".to_owned(), - '\u{FE4EC}' => "flag".to_owned(), - '\u{FE4ED}' => "flag".to_owned(), - '\u{FE4EE}' => "flag south korea".to_owned(), - '\u{FE82C}' => "number sign in square".to_owned(), - '\u{FE82E}' => "digit one in square".to_owned(), - '\u{FE82F}' => "digit two in square".to_owned(), - '\u{FE830}' => "digit three in square".to_owned(), - '\u{FE831}' => "digit four in square".to_owned(), - '\u{FE832}' => "digit five in square".to_owned(), - '\u{FE833}' => "digit six in square".to_owned(), - '\u{FE834}' => "digit seven in square".to_owned(), - '\u{FE835}' => "digit eight in square".to_owned(), - '\u{FE836}' => "digit nine in square".to_owned(), - '\u{FE837}' => "digit zero in square".to_owned(), - - // Special private-use-area extensions found in `emoji-icon-font.ttf`: - // Web services / operating systems / browsers - '\u{E600}' => "web-dribbble".to_owned(), - '\u{E601}' => "web-stackoverflow".to_owned(), - '\u{E602}' => "web-vimeo".to_owned(), - '\u{E603}' => "web-twitter".to_owned(), - '\u{E604}' => "web-facebook".to_owned(), - '\u{E605}' => "web-googleplus".to_owned(), - '\u{E606}' => "web-pinterest".to_owned(), - '\u{E607}' => "web-tumblr".to_owned(), - '\u{E608}' => "web-linkedin".to_owned(), - '\u{E60A}' => "web-stumbleupon".to_owned(), - '\u{E60B}' => "web-lastfm".to_owned(), - '\u{E60C}' => "web-rdio".to_owned(), - '\u{E60D}' => "web-spotify".to_owned(), - '\u{E60E}' => "web-qq".to_owned(), - '\u{E60F}' => "web-instagram".to_owned(), - '\u{E610}' => "web-dropbox".to_owned(), - '\u{E611}' => "web-evernote".to_owned(), - '\u{E612}' => "web-flattr".to_owned(), - '\u{E613}' => "web-skype".to_owned(), - '\u{E614}' => "web-renren".to_owned(), - '\u{E615}' => "web-sina-weibo".to_owned(), - '\u{E616}' => "web-paypal".to_owned(), - '\u{E617}' => "web-picasa".to_owned(), - '\u{E618}' => "os-android".to_owned(), - '\u{E619}' => "web-mixi".to_owned(), - '\u{E61A}' => "web-behance".to_owned(), - '\u{E61B}' => "web-circles".to_owned(), - '\u{E61C}' => "web-vk".to_owned(), - '\u{E61D}' => "web-smashing".to_owned(), - '\u{E61E}' => "web-forrst".to_owned(), - '\u{E61F}' => "os-windows".to_owned(), - '\u{E620}' => "web-flickr".to_owned(), - '\u{E621}' => "web-picassa".to_owned(), - '\u{E622}' => "web-deviantart".to_owned(), - '\u{E623}' => "web-steam".to_owned(), - '\u{E624}' => "web-github".to_owned(), - '\u{E625}' => "web-git".to_owned(), - '\u{E626}' => "web-blogger".to_owned(), - '\u{E627}' => "web-soundcloud".to_owned(), - '\u{E628}' => "web-reddit".to_owned(), - '\u{E629}' => "web-delicious".to_owned(), - '\u{E62A}' => "browser-chrome".to_owned(), - '\u{E62B}' => "browser-firefox".to_owned(), - '\u{E62C}' => "browser-ie".to_owned(), - '\u{E62D}' => "browser-opera".to_owned(), - '\u{E62E}' => "browser-safari".to_owned(), - '\u{E62F}' => "web-google-drive".to_owned(), - '\u{E630}' => "web-wordpress".to_owned(), - '\u{E631}' => "web-joomla".to_owned(), - '\u{E632}' => "lastfm".to_owned(), - '\u{E633}' => "web-foursquare".to_owned(), - '\u{E634}' => "web-yelp".to_owned(), - '\u{E635}' => "web-drupal".to_owned(), - '\u{E636}' => "youtube".to_owned(), - '\u{F189}' => "vk".to_owned(), - '\u{F1A6}' => "digg".to_owned(), - '\u{F1CA}' => "web-vine".to_owned(), - '\u{F8FF}' => "os-apple".to_owned(), - - // Special private-use-area extensions found in `Ubuntu-Light.ttf` - '\u{F000}' => "uniF000".to_owned(), - '\u{F001}' => "fi".to_owned(), - '\u{F002}' => "fl".to_owned(), - '\u{F506}' => "one seventh".to_owned(), - '\u{F507}' => "two sevenths".to_owned(), - '\u{F508}' => "three sevenths".to_owned(), - '\u{F509}' => "four sevenths".to_owned(), - '\u{F50A}' => "fiv esevenths".to_owned(), - '\u{F50B}' => "six sevenths".to_owned(), - '\u{F50C}' => "one ninth".to_owned(), - '\u{F50D}' => "two ninths".to_owned(), - '\u{F50E}' => "four ninths".to_owned(), - '\u{F50F}' => "five ninths".to_owned(), - '\u{F510}' => "seven ninths".to_owned(), - '\u{F511}' => "eight ninths".to_owned(), - '\u{F800}' => "zero.alt".to_owned(), - '\u{F801}' => "one.alt".to_owned(), - '\u{F802}' => "two.alt".to_owned(), - '\u{F803}' => "three.alt".to_owned(), - '\u{F804}' => "four.alt".to_owned(), - '\u{F805}' => "five.alt".to_owned(), - '\u{F806}' => "six.alt".to_owned(), - '\u{F807}' => "seven.alt".to_owned(), - '\u{F808}' => "eight.alt".to_owned(), - '\u{F809}' => "nine.alt".to_owned(), - '\u{F80A}' => "zero.sups".to_owned(), - '\u{F80B}' => "one.sups".to_owned(), - '\u{F80C}' => "two.sups".to_owned(), - '\u{F80D}' => "three.sups".to_owned(), - '\u{F80E}' => "four.sups".to_owned(), - '\u{F80F}' => "five.sups".to_owned(), - '\u{F810}' => "six.sups".to_owned(), - '\u{F811}' => "seven.sups".to_owned(), - '\u{F812}' => "eight.sups".to_owned(), - '\u{F813}' => "nine.sups".to_owned(), - '\u{F814}' => "zero.sinf".to_owned(), - '\u{F815}' => "one.sinf".to_owned(), - '\u{F816}' => "two.sinf".to_owned(), - '\u{F817}' => "three.sinf".to_owned(), - '\u{F818}' => "four.sinf".to_owned(), - '\u{F819}' => "five.sinf".to_owned(), - '\u{F81A}' => "six.sinf".to_owned(), - '\u{F81B}' => "seven.sinf".to_owned(), - '\u{F81C}' => "eight.sinf".to_owned(), - '\u{F81D}' => "nine.sinf".to_owned(), - - _ => "unknown".to_owned(), - } - }) + special_char_name(chr) + .map(|s| s.to_owned()) + .or_else(|| unicode_names2::name(chr).map(|name| name.to_string().to_lowercase())) + .unwrap_or_else(|| "unknown".to_owned()) +} + +fn special_char_name(chr: char) -> Option<&'static str> { + #[allow(clippy::match_same_arms)] // many "flag" + match chr { + // Special private-use-area extensions found in `emoji-icon-font.ttf`: + // Private use area extensions: + '\u{FE4E5}' => Some("flag japan"), + '\u{FE4E6}' => Some("flag usa"), + '\u{FE4E7}' => Some("flag"), + '\u{FE4E8}' => Some("flag"), + '\u{FE4E9}' => Some("flag"), + '\u{FE4EA}' => Some("flag great britain"), + '\u{FE4EB}' => Some("flag"), + '\u{FE4EC}' => Some("flag"), + '\u{FE4ED}' => Some("flag"), + '\u{FE4EE}' => Some("flag south korea"), + '\u{FE82C}' => Some("number sign in square"), + '\u{FE82E}' => Some("digit one in square"), + '\u{FE82F}' => Some("digit two in square"), + '\u{FE830}' => Some("digit three in square"), + '\u{FE831}' => Some("digit four in square"), + '\u{FE832}' => Some("digit five in square"), + '\u{FE833}' => Some("digit six in square"), + '\u{FE834}' => Some("digit seven in square"), + '\u{FE835}' => Some("digit eight in square"), + '\u{FE836}' => Some("digit nine in square"), + '\u{FE837}' => Some("digit zero in square"), + + // Special private-use-area extensions found in `emoji-icon-font.ttf`: + // Web services / operating systems / browsers + '\u{E600}' => Some("web-dribbble"), + '\u{E601}' => Some("web-stackoverflow"), + '\u{E602}' => Some("web-vimeo"), + '\u{E603}' => Some("web-twitter"), + '\u{E604}' => Some("web-facebook"), + '\u{E605}' => Some("web-googleplus"), + '\u{E606}' => Some("web-pinterest"), + '\u{E607}' => Some("web-tumblr"), + '\u{E608}' => Some("web-linkedin"), + '\u{E60A}' => Some("web-stumbleupon"), + '\u{E60B}' => Some("web-lastfm"), + '\u{E60C}' => Some("web-rdio"), + '\u{E60D}' => Some("web-spotify"), + '\u{E60E}' => Some("web-qq"), + '\u{E60F}' => Some("web-instagram"), + '\u{E610}' => Some("web-dropbox"), + '\u{E611}' => Some("web-evernote"), + '\u{E612}' => Some("web-flattr"), + '\u{E613}' => Some("web-skype"), + '\u{E614}' => Some("web-renren"), + '\u{E615}' => Some("web-sina-weibo"), + '\u{E616}' => Some("web-paypal"), + '\u{E617}' => Some("web-picasa"), + '\u{E618}' => Some("os-android"), + '\u{E619}' => Some("web-mixi"), + '\u{E61A}' => Some("web-behance"), + '\u{E61B}' => Some("web-circles"), + '\u{E61C}' => Some("web-vk"), + '\u{E61D}' => Some("web-smashing"), + '\u{E61E}' => Some("web-forrst"), + '\u{E61F}' => Some("os-windows"), + '\u{E620}' => Some("web-flickr"), + '\u{E621}' => Some("web-picassa"), + '\u{E622}' => Some("web-deviantart"), + '\u{E623}' => Some("web-steam"), + '\u{E624}' => Some("web-github"), + '\u{E625}' => Some("web-git"), + '\u{E626}' => Some("web-blogger"), + '\u{E627}' => Some("web-soundcloud"), + '\u{E628}' => Some("web-reddit"), + '\u{E629}' => Some("web-delicious"), + '\u{E62A}' => Some("browser-chrome"), + '\u{E62B}' => Some("browser-firefox"), + '\u{E62C}' => Some("browser-ie"), + '\u{E62D}' => Some("browser-opera"), + '\u{E62E}' => Some("browser-safari"), + '\u{E62F}' => Some("web-google-drive"), + '\u{E630}' => Some("web-wordpress"), + '\u{E631}' => Some("web-joomla"), + '\u{E632}' => Some("lastfm"), + '\u{E633}' => Some("web-foursquare"), + '\u{E634}' => Some("web-yelp"), + '\u{E635}' => Some("web-drupal"), + '\u{E636}' => Some("youtube"), + '\u{F189}' => Some("vk"), + '\u{F1A6}' => Some("digg"), + '\u{F1CA}' => Some("web-vine"), + '\u{F8FF}' => Some("os-apple"), + + // Special private-use-area extensions found in `Ubuntu-Light.ttf` + '\u{F000}' => Some("uniF000"), + '\u{F001}' => Some("fi"), + '\u{F002}' => Some("fl"), + '\u{F506}' => Some("one seventh"), + '\u{F507}' => Some("two sevenths"), + '\u{F508}' => Some("three sevenths"), + '\u{F509}' => Some("four sevenths"), + '\u{F50A}' => Some("five sevenths"), + '\u{F50B}' => Some("six sevenths"), + '\u{F50C}' => Some("one ninth"), + '\u{F50D}' => Some("two ninths"), + '\u{F50E}' => Some("four ninths"), + '\u{F50F}' => Some("five ninths"), + '\u{F510}' => Some("seven ninths"), + '\u{F511}' => Some("eight ninths"), + '\u{F800}' => Some("zero.alt"), + '\u{F801}' => Some("one.alt"), + '\u{F802}' => Some("two.alt"), + '\u{F803}' => Some("three.alt"), + '\u{F804}' => Some("four.alt"), + '\u{F805}' => Some("five.alt"), + '\u{F806}' => Some("six.alt"), + '\u{F807}' => Some("seven.alt"), + '\u{F808}' => Some("eight.alt"), + '\u{F809}' => Some("nine.alt"), + '\u{F80A}' => Some("zero.sups"), + '\u{F80B}' => Some("one.sups"), + '\u{F80C}' => Some("two.sups"), + '\u{F80D}' => Some("three.sups"), + '\u{F80E}' => Some("four.sups"), + '\u{F80F}' => Some("five.sups"), + '\u{F810}' => Some("six.sups"), + '\u{F811}' => Some("seven.sups"), + '\u{F812}' => Some("eight.sups"), + '\u{F813}' => Some("nine.sups"), + '\u{F814}' => Some("zero.sinf"), + '\u{F815}' => Some("one.sinf"), + '\u{F816}' => Some("two.sinf"), + '\u{F817}' => Some("three.sinf"), + '\u{F818}' => Some("four.sinf"), + '\u{F819}' => Some("five.sinf"), + '\u{F81A}' => Some("six.sinf"), + '\u{F81B}' => Some("seven.sinf"), + '\u{F81C}' => Some("eight.sinf"), + '\u{F81D}' => Some("nine.sinf"), + + _ => None, + } }