diff --git a/Cargo.toml b/Cargo.toml index bc0f991..d73faad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,10 @@ license = "EPL-2.0" [dependencies] anyhow = "1.0" camino = "1.1" +console = "0.15" clap = { version = "4.4", features = ["derive"] } +fontconfig = "0.8" +harfbuzz_rs = "2.0" indexmap = "2.2" rational = "1.5" serde = { version = "1.0.188", features = ["derive"] } diff --git a/question.png b/question.png new file mode 100644 index 0000000..4172624 Binary files /dev/null and b/question.png differ diff --git a/src/iotro.rs b/src/iotro.rs index 94eca89..98b5a50 100644 --- a/src/iotro.rs +++ b/src/iotro.rs @@ -7,7 +7,7 @@ use std::{ str::FromStr }; use svgwriter::{ - tags::{Group, Rect, TagWithPresentationAttributes, Text}, + tags::{Group, Rect, TagWithPresentationAttributes as _, Text}, Graphic }; @@ -134,14 +134,14 @@ impl Debug for Language<'_> { } #[repr(u16)] -enum FontSize { +pub(crate) enum FontSize { Huge = 72, Large = 56, Big = 44 } #[repr(u16)] -enum FontWeight { +pub(crate) enum FontWeight { Normal = 400, SemiBold = 500, Bold = 700 diff --git a/src/main.rs b/src/main.rs index 6c9a7ee..5b163f2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,16 +3,19 @@ #![forbid(elided_lifetimes_in_paths, unsafe_code)] mod iotro; +mod question; mod render; mod time; -use crate::{ +use self::{ + iotro::Language, + question::Question, render::{ffmpeg::FfmpegOutputFormat, Renderer}, time::{parse_date, parse_time, Date, Time} }; use camino::Utf8PathBuf as PathBuf; use clap::Parser; -use iotro::Language; +use console::style; use rational::Rational; use serde::{Deserialize, Serialize}; use serde_with::{serde_as, DisplayFromStr}; @@ -169,9 +172,15 @@ struct ProjectSource { start: Option