L4J562JRQTGQ3XRGDTTG7II5JBNG5OVRK4CGHIA2CB54YSRIF2WQC CPJZVCXFV3QLUATEXOAEHJT3KAJYNLQP4V7X2GHB37UNBKF54KUAC VOJUCGQODOHOCEKALUMKHQABZ4JZ5SDSSOJLAVGC5KLJNTZ2PVCQC 3E7ON5LK5KELT7NX7O2DRSVSQQGVW3HU3LFTQGGCJ5PIRZDWD56QC KLGRQAFUQPJP75NVLS5MZZ3CY4TGNVGB4K2YHQSLYVGAPKCLBLUAC 3MJHVTOTVPO6KYWXVKALETNOZBHQ3XSI3SDUWIPHGWP5ZITQL4KAC I3F42XELTBNGNFJGKEDBRYU75HHQX2CHMWPEIEMXAGU2FFHQVHKAC 2NFFH775XBXGXBJYGTGUAUH45T5ZI6FFJXHFGUQQS324XEAFKT7AC NOSXMSCMJV75LYKAIRD4FG4LFPYQ4CI5SIKGQC7MEYUEAB7X7NWAC R6SN37XV5NNVRRB7WYOW6BL4DPA4GAKPOFSX2OT7BR4Y36X532BQC LBHZM2SE7L7M7KML6DN5HP65HP2XRKJBOHHH3IRX4RCLRNYS7CWAC FJVNPRZD2CQHHDZMFTPW57J3QR3HOF7B5ONBDTPGRBGNJOXU36WAC TWBSX7IMMGO6G6CEEMPQZHBVDG4XHDMHL6FEAKOH34ILJJNMRUIQC NBT2QCONKZ2E5I7HIQJUNQAUNJA6RPYYTUVZQCT6Z6ABU42A277AC XTYFIHM6F5QCIGESYIWC5PLHKKA3JE5XZAXTPILYZTSGVMOU7BCAC 5S34ANJMEKYNSGROMFRDP22UA2FK2ENSGOBB4MPSHS7PG2BW6DLAC GUHXMDKNAOLJDBQ73FNQJDUHZ344S7P4FLFT2XCWGCKTCNYEZWKAC RBDTDLSVTRYZYKAVDPMBTDL6W45H4ZHRB3XZTXBASOI4VCOTRS6QC SDFC64IQZWAAG36UV4GVSAER5S3FISBQEE2NVGI4G6ODD6CCGBIAC YR6S4ANJ34M45KU6BU5RRJWI5AW5SSFPCDLH4KUO55DICUK5LQ4QC PTQ26KY65NDVZ35EG66SARWRGGYKDJ2BT3EVK4RJFS2J5AQUX6OQC 576YRB7XSKS6Q265TEJQS7HUGMKSGHGDRGVP6WBZS7XMK6RVJRNQC V2265WPBM2LBE4BGEFB3HYCZXA5C5MJKQ5IVPFWY3ARCVIAYBZGQC B66IOHMWFZINTWC57Q5OD4YPBVQNBN3YUM3ZKX4MTDKHYGH5JHFAC HKVKPIIWK6AB4DWCS6SB47RYEXTD4QAQIGDFNQGA3TDJEIAXBZKQC T5T2PZSJVBHIPHG7VRXZSH36WGSTR4I44BOI335X4F637E7GUWHAC AFZQUL4VKEEDRSA5CV6YXN7PMX6PQ2PMLECTG53S4HZKTNCAIMXQC L5ZNI6R53WDZIOXNECV262TURPIPWL522TVF25U5RYHOTSY7BHZAC DZSYKTTKQ6DUGPMCPS7FQRSE5FO4FEHY2L3UWB73A7Y7Y6GDHWCAC 4HTJHGHFPLGVXGAEKLBNPMTGWVVMYIL67JOTWB2DREGO6L3ENYMQC }fn shape(plans: &mut Plans,index: FontIndex,font: &rustybuzz::Face,mut ubuf: UnicodeBuffer,) -> GlyphBuffer {ubuf.guess_segment_properties();let direction = match ubuf.direction() {Direction::Invalid => Direction::LeftToRight,dir => dir,};let script = ubuf.script();let language = ubuf.language();let plan = plans.entry((index, direction, script, language.clone())).or_insert_with(|| ShapePlan::new(font, direction, Some(script), language.as_ref(), &[]));rustybuzz::shape_with_plan(font, plan, ubuf)
fn shape(plans: &mut Plans,index: FontIndex,font: &rustybuzz::Face,mut ubuf: UnicodeBuffer,) -> GlyphBuffer {ubuf.guess_segment_properties();let direction = match ubuf.direction() {Direction::Invalid => Direction::LeftToRight,dir => dir,};let script = ubuf.script();let language = ubuf.language();let plan = plans.entry((index, direction, script, language.clone())).or_insert_with(|| {ShapePlan::new(font, direction, Some(script), language.as_ref(), &[])});rustybuzz::shape_with_plan(font, plan, ubuf)}fn make_runs(&mut self, line: RcLine) -> Rc<[Run]> {
fn make_runs(&mut self, line: RcLine, config: &Config, default_fg: [u8; 4]) -> Rc<[Run]> {let font_size = config.font_size;
if curr_font != font {let rb_font = &self.fonts[curr_font].1;let glyph_buffer = Self::shape(&mut self.plans, curr_font, rb_font, ubuf);
if font != curr_font {let rb_font = &self.fonts[font].1;let glyph_buffer = shape(&mut self.plans, font, rb_font, ubuf);
impl Renderer {pub fn new() -> Result<Self, Box<dyn Error>> {let shaper = Shaper::default();let rasterizer = Rasterizer::default();Ok(Self {size: (0, 0),shaper,rasterizer,font_size: 14,})}pub fn configure(&mut self, config: &Config) -> Result<(), Box<dyn Error>> {self.font_size = config.mosham_font_size.parse().expect("Invalid font size");self.shaper.fonts.clear();self.rasterizer.fonts.clear();for font in &config.mosham_fonts {let property = if font == "monospace" {FontPropertyBuilder::new().monospace().build()} else {FontPropertyBuilder::new().family(font).build()};let (data, _) = system_fonts::get(&property).expect("Failed to load font");let rb_face =rustybuzz::Face::from_slice(unsafe { &*(data.as_slice() as *const [u8]) }, 0).ok_or("Failed to load rustybuzz font")?;let fd_face = fontdue::Font::from_bytes(data.as_slice(), FontSettings::default())?;self.shaper.fonts.push((data, rb_face));self.rasterizer.fonts.push(fd_face);
impl<'a> Target<'a> {pub fn new(buf: &'a mut [u32], width: usize, height: usize) -> Self {Self {buf,size: (width, height),
pub fn line_height(&self) -> u32 {(self.font_size as f32 * 1.5) as u32}fn draw_background(&mut self,buf: &mut [u32],x: usize,y: usize,w: usize,h: usize,color: [u8; 4],) {
#[inline]fn draw_rect(&mut self, x: usize, y: usize, w: usize, h: usize, color: [u8; 4]) {
fn rasterize_segment(&mut self,buf: &mut [u32],run: &Run,config: &Config,default_fg: [u8; 4],pos: &mut (usize, usize),) {let fs = self.font_size as i32;let bg = run.face.bg.to_rgba(config);let fg = run.face.fg.to_rgba(config).unwrap_or(default_fg);let line_height = self.line_height() as usize;
pub fn load_fonts(fonts: &[String],shaper: &mut Shaper,rasterizer: &mut Rasterizer,) -> Result<(), Box<dyn Error>> {shaper.fonts.clear();shaper.cache.clear();rasterizer.fonts.clear();rasterizer.cache.clear();for font in fonts {let property = if font == "monospace" {FontPropertyBuilder::new().monospace().build()} else {FontPropertyBuilder::new().family(font).build()};let (data, _) = system_fonts::get(&property).expect("Failed to load font");let rb_face = rustybuzz::Face::from_slice(unsafe { &*(data.as_slice() as *const [u8]) }, 0).ok_or("Failed to load rustybuzz font")?;let fd_face = fontdue::Font::from_bytes(data.as_slice(), FontSettings::default())?;shaper.fonts.push((data, rb_face));rasterizer.fonts.push(fd_face);}Ok(())}
if let Some(bg) = bg {self.draw_background(buf,pos.0,pos.1 - line_height + 4,run.length(self.font_size as i32),line_height,bg,);}
pub fn line_height(font_size: f32) -> f32 {font_size * 1.5}
let Run {upe,glyph_buffer,font,..} = run;
fn rasterize_segment(buf: &mut Target,pos: &mut (usize, usize),run: &Run,rasterizer: &mut Rasterizer,) {let Run {upe,glyph_buffer,font,font_size,..} = run;let line_height = line_height(*font_size as f32) as usize;if let Some(bg) = run.bg {buf.draw_rect(pos.0,pos.1 - line_height + 4,run.length(),line_height,bg,);}let fs = *font_size as i32;
for i in 0..glyph_buffer.len() {let ginfo = glyph_buffer.glyph_infos()[i];let gpos = glyph_buffer.glyph_positions()[i];let (metrics, data) =self.rasterizer.rasterize_glyph(*font, ginfo.glyph_id as u16, self.font_size);
for i in 0..glyph_buffer.len() {let ginfo = glyph_buffer.glyph_infos()[i];let gpos = glyph_buffer.glyph_positions()[i];let (metrics, data) = rasterizer.rasterize_glyph(*font, ginfo.glyph_id as u16, *font_size);
let x_off = gpos.x_offset * fs / upe + metrics.xmin;let y_off = gpos.y_offset * fs / upe - metrics.ymin - metrics.height as i32;
let x_off = gpos.x_offset * fs / upe + metrics.xmin;let y_off = gpos.y_offset * fs / upe - metrics.ymin - metrics.height as i32;
for row in 0..metrics.height {for column in 0..metrics.width {let x = (pos.0 as i32 + x_off) as usize + column;let y = (pos.1 as i32 + y_off) as usize + row;let bidx = x + y * self.size.0;let sidx = column + row * metrics.width;if bidx >= buf.len() {break;}if x > self.size.0 {break;}let mut pixel = u32::to_be_bytes(buf[bidx]);for i in 0..4 {let m = data[sidx] as u32;let d = pixel[i] as u32;let s = fg[i] as u32;pixel[i] = ((d * (255 - m) + s * m) / 255) as u8;}buf[bidx] = u32::from_be_bytes(pixel);
for row in 0..metrics.height {for column in 0..metrics.width {let x = (pos.0 as i32 + x_off) as usize + column;let y = (pos.1 as i32 + y_off) as usize + row;let bidx = x + y * buf.size.0;let sidx = column + row * metrics.width;if bidx >= buf.buf.len() {break;}if x > buf.size.0 {break;
pub fn render(&mut self,ui: &Ui,config: &Config,buf: &mut [u32],) -> Result<(), Box<dyn Error>> {let default_bg = ui.default_face.bg.to_rgba(config).unwrap_or(config.mosham_black.0);let default_fg = ui.default_face.fg.to_rgba(config).unwrap_or(config.mosham_white.0);self.draw_background(buf, 0, 0, self.size.0, self.size.1, default_bg);let line_height = self.line_height() as usize;
pub fn render(buf: &mut Target,shaper: &mut Shaper,rs: &mut Rasterizer,ui: &Ui,config: &Config,) -> Result<(), Box<dyn Error>> {let default_bg = ui.default_face.bg.to_rgba(config).unwrap_or(config.black.0);let default_fg = ui.default_face.fg.to_rgba(config).unwrap_or(config.white.0);buf.draw_rect(0, 0, buf.size.0, buf.size.1, default_bg);let line_height = line_height(config.font_size as f32) as usize;
let mut pos = (0, line_height);for line in &ui.lines {for run in self.shaper.make_runs(line.clone()).iter() {self.rasterize_segment(buf, run, config, default_fg, &mut pos);}pos.0 = 0;pos.1 += line_height;
let mut pos = (0, line_height);for line in &ui.lines {for run in shaper.make_runs(line.clone(), config, default_fg).iter() {rasterize_segment(buf, &mut pos, run, rs);
pos.1 = self.size.1 - status_padding;pos.0 = 0;
pos.1 = buf.size.1 - status_padding;pos.0 = 0;
if let Some(bg) = line_bg {self.draw_background(buf,0,pos.1 - line_height + 4,self.size.0,line_height,bg,);}
if let Some(bg) = ui.line_face.bg.to_rgba(config) {buf.draw_rect(0, pos.1 - line_height + 4, buf.size.0, line_height, bg);}let line_fg = ui.line_face.fg.to_rgba(config).unwrap_or(default_fg);
for run in self.shaper.make_runs(ui.prompt_line.clone()).iter() {let line_fg = ui.line_face.fg.to_rgba(config).unwrap_or(default_fg);self.rasterize_segment(buf, run, config, line_fg, &mut pos);}
for run in shaper.make_runs(ui.prompt_line.clone(), config, line_fg).iter(){rasterize_segment(buf, &mut pos, run, rs);}
let mode_line = self.shaper.make_runs(ui.mode_line.clone());let text_width: i32 = mode_line.iter().map(|run| run.length(self.font_size as i32) as i32).sum();
let mode_fg = ui.line_face.fg.to_rgba(config).unwrap_or(default_fg);let mode_line = shaper.make_runs(ui.mode_line.clone(), config, mode_fg);let text_width: i32 = mode_line.iter().map(|run| run.length() as i32).sum();
pos.0 = self.size.0.saturating_sub(text_width as usize);for run in mode_line.iter() {let mode_fg = ui.line_face.fg.to_rgba(config).unwrap_or(default_fg);self.rasterize_segment(buf, run, config, mode_fg, &mut pos);}
pos.0 = buf.size.0.saturating_sub(text_width as usize);for run in mode_line.iter() {rasterize_segment(buf, &mut pos, run, rs);}
let menu_padding_x: usize = 2;let menu_padding_y: usize = 2;let mut menu_space: usize = 0;for menu in &ui.menus {let lines: Vec<_> = menu.content.iter().map(|line| self.shaper.make_runs(line.clone())).collect();let menu_bg = menu.menu_face.bg.to_rgba(config).unwrap_or(default_bg);let menu_fg = menu.menu_face.fg.to_rgba(config).unwrap_or(default_fg);let selected_fg = menu.selected_face.fg.to_rgba(config).unwrap_or(default_fg);let selected_bg = menu.selected_face.bg.to_rgba(config).unwrap_or(default_bg);
let menu_padding_x: usize = 2;let menu_padding_y: usize = 2;let mut menu_space: usize = 0;for menu in &ui.menus {let menu_bg = menu.menu_face.bg.to_rgba(config).unwrap_or(default_bg);let menu_fg = menu.menu_face.fg.to_rgba(config).unwrap_or(default_fg);let selected_fg = menu.selected_face.fg.to_rgba(config).unwrap_or(default_fg);let selected_bg = menu.selected_face.bg.to_rgba(config).unwrap_or(default_bg);let lines = menu.content.iter().enumerate().map(|(i, line)| {if menu.selected == i {(i,selected_bg,shaper.make_runs(line.clone(), config, selected_fg),)} else {(i, menu_bg, shaper.make_runs(line.clone(), config, menu_fg))}});
match menu.style {MenuShowStyle::Prompt => {let width = self.font_size * 15;let num_width = self.size.0 / width as usize;let num_height = usize::min(menu.content.len() / num_width, 10);
match menu.style {MenuShowStyle::Prompt => {let width = config.font_size * 15;let num_width = buf.size.0 / width as usize;let num_height = usize::min(menu.content.len() / num_width, 10);
for (i, line) in lines.into_iter().enumerate() {let x = i % num_width;let y = i / num_width;if y >= num_height {break;}pos.0 = x * width + menu_padding_x;pos.1 = (self.size.1).saturating_sub(line_height * (y + 1) + menu_padding_y + status_padding,);let (fg, bg) = if menu.selected == i {(selected_fg, selected_bg)} else {(menu_fg, menu_bg)};
for (i, bg, line) in lines {let x = i % num_width;let y = i / num_width;if y >= num_height {break;}pos.0 = x * width + menu_padding_x;pos.1 = (buf.size.1).saturating_sub(line_height * (y + 1) + menu_padding_y + status_padding);
self.draw_background(buf,pos.0,pos.1 - line_height + 4,width,line_height,bg,);for run in line.iter() {self.rasterize_segment(buf, run, config, fg, &mut pos);}
buf.draw_rect(pos.0, pos.1 - line_height + 4, width, line_height, bg);for run in line.iter() {rasterize_segment(buf, &mut pos, run, rs);
let info_padding_x: usize = 5;let info_padding_y: usize = 5;for info in &ui.infos {let lines: Vec<_> = info.content.iter().map(|line| self.shaper.make_runs(line.clone())).collect();let width = lines.iter().map(|run| {run.iter().map(|run| run.length(self.font_size as i32) as i32).sum::<i32>()}).max().unwrap_or(0) as usize+ info_padding_x * 2;let height = line_height * info.content.len() + info_padding_y * 2;let info_bg = info.face.bg.to_rgba(config).unwrap_or(default_bg);
let info_padding_x: usize = 5;let info_padding_y: usize = 5;for info in &ui.infos {let info_fg = info.face.fg.to_rgba(config).unwrap_or(default_fg);
match info.style {InfoShowStyle::Prompt => {pos.0 = self.size.0.saturating_sub(width);pos.1 = self.size.1.saturating_sub(height + line_height + status_padding + menu_space);}InfoShowStyle::Modal => {pos.0 = (self.size.0.saturating_sub(width)) / 2;pos.1 = (self.size.1.saturating_sub(height)) / 2;}_ => {}}self.draw_background(buf, pos.0, pos.1, width, height, info_bg);
let lines: Vec<_> = info.content.iter().map(|line| shaper.make_runs(line.clone(), config, info_fg)).collect();let width = lines.iter().map(|run| run.iter().map(|run| run.length() as i32).sum::<i32>()).max().unwrap_or(0) as usize+ info_padding_x * 2;let height = line_height * info.content.len() + info_padding_y * 2;let info_bg = info.face.bg.to_rgba(config).unwrap_or(default_bg);
let start = pos.0 + info_padding_x;pos.1 += info_padding_y;for runs in lines {pos.0 = start;pos.1 += line_height;for run in runs.iter() {let info_fg = info.face.fg.to_rgba(config).unwrap_or(default_fg);self.rasterize_segment(buf, run, config, info_fg, &mut pos);}
match info.style {InfoShowStyle::Prompt => {pos.0 = buf.size.0.saturating_sub(width);pos.1 = buf.size.1.saturating_sub(height + line_height + status_padding + menu_space);}InfoShowStyle::Modal => {pos.0 = (buf.size.0.saturating_sub(width)) / 2;pos.1 = (buf.size.1.saturating_sub(height)) / 2;
self.shaper.clear_cache();Ok(())
let start = pos.0 + info_padding_x;pos.1 += info_padding_y;for runs in lines {pos.0 = start;pos.1 += line_height;for run in runs.iter() {rasterize_segment(buf, &mut pos, run, rs);}}
if let Some(render) = self.render_state.as_mut()&& let Some(config) = &self.config&& let Some((_, surface)) = self.pixels.as_mut(){
if let Some((_, surface)) = self.pixels.as_mut() {
render.render(&self.ui, config, &mut buf).unwrap();
let width = buf.width().get() as usize;let height = buf.height().get() as usize;let mut target = Target::new(&mut buf, width, height);render::render(&mut target,&mut self.render.shaper,&mut self.render.rasterizer,&self.ui,&self.config,).unwrap();
if let Some(render) = &mut self.render_state {render.configure(&config).expect("Failed to load fonts");let lines = (render.size.1 as u32 / render.line_height()) - 1;
render::load_fonts(&config.fonts,&mut self.render.shaper,&mut self.render.rasterizer,).expect("Failed to load font");if let Some((_, surface)) = &mut self.pixels {let buf = surface.buffer_mut().unwrap();let lines = (buf.height().get() as u32/ render::line_height(config.font_size as f32) as u32)- 1;
BuiltinColor::Black => Some(config.mosham_black.0),BuiltinColor::Red => Some(config.mosham_red.0),BuiltinColor::Green => Some(config.mosham_green.0),BuiltinColor::Yellow => Some(config.mosham_yellow.0),BuiltinColor::Blue => Some(config.mosham_blue.0),BuiltinColor::Magenta => Some(config.mosham_magenta.0),BuiltinColor::Cyan => Some(config.mosham_cyan.0),BuiltinColor::White => Some(config.mosham_white.0),BuiltinColor::BrightBlack => Some(config.mosham_bright_black.0),BuiltinColor::BrightRed => Some(config.mosham_bright_red.0),BuiltinColor::BrightGreen => Some(config.mosham_bright_green.0),BuiltinColor::BrightYellow => Some(config.mosham_bright_yellow.0),BuiltinColor::BrightBlue => Some(config.mosham_bright_blue.0),BuiltinColor::BrightMagenta => Some(config.mosham_bright_magenta.0),BuiltinColor::BrightCyan => Some(config.mosham_bright_cyan.0),BuiltinColor::BrightWhite => Some(config.mosham_bright_white.0),
BuiltinColor::Black => Some(config.black.0),BuiltinColor::Red => Some(config.red.0),BuiltinColor::Green => Some(config.green.0),BuiltinColor::Yellow => Some(config.yellow.0),BuiltinColor::Blue => Some(config.blue.0),BuiltinColor::Magenta => Some(config.magenta.0),BuiltinColor::Cyan => Some(config.cyan.0),BuiltinColor::White => Some(config.white.0),BuiltinColor::BrightBlack => Some(config.bright_black.0),BuiltinColor::BrightRed => Some(config.bright_red.0),BuiltinColor::BrightGreen => Some(config.bright_green.0),BuiltinColor::BrightYellow => Some(config.bright_yellow.0),BuiltinColor::BrightBlue => Some(config.bright_blue.0),BuiltinColor::BrightMagenta => Some(config.bright_magenta.0),BuiltinColor::BrightCyan => Some(config.bright_cyan.0),BuiltinColor::BrightWhite => Some(config.bright_white.0),
}struct StringIntegerVisitor;impl<'de> Visitor<'de> for StringIntegerVisitor {type Value = u32;fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {formatter.write_str("An integer")}fn visit_str<E>(self, v: &str) -> Result<Self::Value, E>whereE: serde::de::Error,{v.parse().map_err(|_| E::invalid_value(Unexpected::Other("Expected string"), &""))}}fn string_integer<'de, D>(deserializer: D) -> Result<u32, D::Error>whereD: Deserializer<'de>,{deserializer.deserialize_string(StringIntegerVisitor)
#[serde(default = "default_font", deserialize_with = "comma_list_deserialize")]pub mosham_fonts: Vec<String>,#[serde(default = "default_font_size")]pub mosham_font_size: String,#[serde(default = "black")]pub mosham_black: ArgbColor,#[serde(default = "red")]pub mosham_red: ArgbColor,#[serde(default = "green")]pub mosham_green: ArgbColor,#[serde(default = "yellow")]pub mosham_yellow: ArgbColor,#[serde(default = "blue")]pub mosham_blue: ArgbColor,#[serde(default = "magenta")]pub mosham_magenta: ArgbColor,#[serde(default = "cyan")]pub mosham_cyan: ArgbColor,#[serde(default = "white")]pub mosham_white: ArgbColor,#[serde(default = "bright_black")]pub mosham_bright_black: ArgbColor,#[serde(default = "bright_red")]pub mosham_bright_red: ArgbColor,#[serde(default = "bright_green")]pub mosham_bright_green: ArgbColor,#[serde(default = "bright_yellow")]pub mosham_bright_yellow: ArgbColor,#[serde(default = "bright_blue")]pub mosham_bright_blue: ArgbColor,#[serde(default = "bright_magenta")]pub mosham_bright_magenta: ArgbColor,#[serde(default = "bright_cyan")]pub mosham_bright_cyan: ArgbColor,#[serde(default = "bright_white")]pub mosham_bright_white: ArgbColor,
#[serde(default = "default_font",deserialize_with = "comma_list_deserialize",rename = "mosham_fonts")]pub fonts: Vec<String>,#[serde(default = "default_font_size",deserialize_with = "string_integer",rename = "mosham_font_size")]pub font_size: u32,#[serde(default = "black", rename = "mosham_black")]pub black: ArgbColor,#[serde(default = "red", rename = "mosham_red")]pub red: ArgbColor,#[serde(default = "green", rename = "mosham_green")]pub green: ArgbColor,#[serde(default = "yellow", rename = "mosham_yellow")]pub yellow: ArgbColor,#[serde(default = "blue", rename = "mosham_blue")]pub blue: ArgbColor,#[serde(default = "magenta", rename = "mosham_magenta")]pub magenta: ArgbColor,#[serde(default = "cyan", rename = "mosham_cyan")]pub cyan: ArgbColor,#[serde(default = "white", rename = "mosham_white")]pub white: ArgbColor,#[serde(default = "bright_black", rename = "mosham_bright_black")]pub bright_black: ArgbColor,#[serde(default = "bright_red", rename = "mosham_bright_red")]pub bright_red: ArgbColor,#[serde(default = "bright_green", rename = "mosham_bright_green")]pub bright_green: ArgbColor,#[serde(default = "bright_yellow", rename = "mosham_bright_yellow")]pub bright_yellow: ArgbColor,#[serde(default = "bright_blue", rename = "mosham_bright_blue")]pub bright_blue: ArgbColor,#[serde(default = "bright_magenta", rename = "mosham_bright_magenta")]pub bright_magenta: ArgbColor,#[serde(default = "bright_cyan", rename = "mosham_bright_cyan")]pub bright_cyan: ArgbColor,#[serde(default = "bright_white", rename = "mosham_bright_white")]pub bright_white: ArgbColor,}impl Default for Config {fn default() -> Self {Self {fonts: default_font(),font_size: default_font_size(),black: black(),red: red(),green: green(),yellow: yellow(),blue: blue(),magenta: magenta(),cyan: cyan(),white: white(),bright_black: bright_black(),bright_red: bright_red(),bright_green: bright_green(),bright_yellow: bright_yellow(),bright_blue: bright_blue(),bright_magenta: bright_magenta(),bright_cyan: bright_cyan(),bright_white: bright_white(),}}
divan = "0.1.21"[dev-dependencies]divan = "0.1.21"[[bench]]name = "render"harness = false
name = "clap_builder"version = "4.5.54"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00"dependencies = ["anstyle","clap_lex","terminal_size",][[package]]name = "clap_lex"version = "0.7.7"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32"[[package]]
name = "windows-targets"version = "0.53.5"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"dependencies = ["windows-link","windows_aarch64_gnullvm 0.53.1","windows_aarch64_msvc 0.53.1","windows_i686_gnu 0.53.1","windows_i686_gnullvm 0.53.1","windows_i686_msvc 0.53.1","windows_x86_64_gnu 0.53.1","windows_x86_64_gnullvm 0.53.1","windows_x86_64_msvc 0.53.1",][[package]]