chiark / gitweb /
usvg: Pass default options even during bundle processing.
[otter.git] / src / ui.rs
index b0411f9f3e7ca59ad3f93185dfc937d7c73c229c..017461f5b9afe58a218ac8692decf99bfed38baa 100644 (file)
--- a/src/ui.rs
+++ b/src/ui.rs
@@ -9,6 +9,8 @@ pub const HELD_SURROUND_COLOUR: &str = "black";
 const MONOSPACE: HtmlLit = Html::lit(
   r#"font-family="Latin Modern Mono, monospace" font-weight="700""#);
 
+const USVG_DEFAULT_ARGS_TEXT: &str = include_str!("USVG_DEFAULT_ARGS.txt");
+
 pub const DEFAULT_TABLE_SIZE: Pos = PosC::new( 300, 200 );
 pub const DEFAULT_TABLE_COLOUR: &str = "green";
 
@@ -148,3 +150,10 @@ impl TextOptions {
     }
   }
 }
+
+pub fn usvg_default_args() -> impl Iterator<Item=&'static str> {
+  USVG_DEFAULT_ARGS_TEXT
+    .lines()
+    .map(|l| l.trim())
+    .filter(|l| l.len() > 0 && ! l.starts_with('#'))
+}