Early exit if no monospace fonts were found
This also provides a helpful log error message and avoids triggering a later panic as reported in #323. Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
This commit is contained in:
parent
3eec597ab1
commit
3f10b729dd
1 changed files with 7 additions and 0 deletions
|
|
@ -1415,6 +1415,13 @@ impl Application for App {
|
|||
});
|
||||
font_name_faces_map
|
||||
};
|
||||
|
||||
if font_name_faces_map.is_empty() {
|
||||
log::error!("at least one monospace font with normal/bold weights and default stretch is required");
|
||||
log::error!("no monospace fonts to select from, exiting");
|
||||
process::exit(1);
|
||||
}
|
||||
|
||||
let font_names = font_name_faces_map.keys().cloned().collect();
|
||||
|
||||
let mut font_size_names = Vec::new();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue