Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ansi2/src/css.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
4 changes: 2 additions & 2 deletions ansi2/src/html.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
canvas::Canvas,
css::{CssType, Mode, NodeStyle, Style},
css::{CssType, DEFAULT_FONTS, Mode, NodeStyle, Style},
theme::ColorTable,
};

Expand All @@ -24,7 +24,7 @@ pub fn to_html<S: AsRef<str>>(
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") {
Expand Down
4 changes: 2 additions & 2 deletions ansi2/src/svg.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down Expand Up @@ -31,7 +31,7 @@ pub fn to_svg<S: AsRef<str>, 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") {
Expand Down
5 changes: 5 additions & 0 deletions assets/vite.ans
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

VITE v7.0.0 ready in 331 ms

➜ Local: http://localhost:1420/
 ➜ press h + enter to show help