use super::GlyphOutlineCommand as Command;
pub(super) fn commands(fs: f64, baseline: f64) -> Vec<Command> {
let mut result = Vec::new();
let map = |(x, y): (f64, f64)| (x * fs, baseline - y * fs);
let mut polygon = |points: [(f64, f64); 4]| {
result.push(Command::Move(map(points[0])));
result.extend(points[1..].iter().map(|&p| Command::Line(map(p))));
result.push(Command::Close);
};
for center in [0.19, 0.39] {
polygon([
(0.18, center - 0.025),
(0.82, center - 0.025),
(0.82, center + 0.025),
(0.18, center + 0.025),
]);
}
polygon([(0.32, 0.014), (0.37, 0.014), (0.67, 0.568), (0.62, 0.568)]);
result
}