diff --git a/ansi2/src/css.rs b/ansi2/src/css.rs index 8f4df46..56486ac 100644 --- a/ansi2/src/css.rs +++ b/ansi2/src/css.rs @@ -267,3 +267,6 @@ impl Style { css } } + +// pub const DEFAULT_FONTS: &str = "SFMono-Regular,Menlo,Monaco,'Segoe UI Mono',Consolas,'Liberation Mono','DejaVu Sans Mono','Roboto Mono','Courier New',monospace"; +pub const DEFAULT_FONTS: &str = "Consolas,Courier New,Monaco,monospace"; diff --git a/ansi2/src/html.rs b/ansi2/src/html.rs index 4febe4f..6ddaa12 100644 --- a/ansi2/src/html.rs +++ b/ansi2/src/html.rs @@ -1,6 +1,6 @@ use crate::{ canvas::Canvas, - css::{CssType, Mode, NodeStyle, Style}, + css::{CssType, DEFAULT_FONTS, Mode, NodeStyle, Style}, theme::ColorTable, }; @@ -24,7 +24,7 @@ pub fn to_html>( let mut style = Style::default(); let mut font_style = "".into(); - let mut font_family = "Consolas,Courier New,Monaco".into(); + let mut font_family = DEFAULT_FONTS.into(); if let Some(url) = font { if url.starts_with("http") || url.starts_with("data:font;base64") { diff --git a/ansi2/src/svg.rs b/ansi2/src/svg.rs index 287c9c4..fa54cd1 100644 --- a/ansi2/src/svg.rs +++ b/ansi2/src/svg.rs @@ -1,6 +1,6 @@ use crate::{ canvas::Canvas, - css::{CssType, Mode, NodeStyle, Style}, + css::{CssType, Mode, NodeStyle, Style,DEFAULT_FONTS}, theme::ColorTable, }; #[allow(clippy::too_many_arguments)] @@ -31,7 +31,7 @@ pub fn to_svg, T: ColorTable>( let mut cur_y = 0; let mut style = Style::default(); let mut font_style = "".into(); - let mut font_family = "Consolas,Courier New,Monaco".into(); + let mut font_family = DEFAULT_FONTS.into(); if let Some(url) = font { if url.starts_with("http") || url.starts_with("data:font;base64") { diff --git a/assets/vite.ans b/assets/vite.ans new file mode 100644 index 0000000..6d9c0af --- /dev/null +++ b/assets/vite.ans @@ -0,0 +1,5 @@ + + VITE v7.0.0 ready in 331 ms + + ➜ Local: http://localhost:1420/ + ➜ press h + enter to show help