support svgs with currentColor

This commit is contained in:
galister
2025-12-20 19:32:24 +09:00
parent 796fdcbc01
commit 4c06fef35d
72 changed files with 78 additions and 73 deletions

View File

@@ -1,8 +1,8 @@
use std::{
f32,
sync::{
Arc,
atomic::{AtomicUsize, Ordering},
Arc,
},
};
@@ -23,7 +23,12 @@ pub enum CustomGlyphContent {
impl CustomGlyphContent {
pub fn from_bin_svg(data: &[u8]) -> anyhow::Result<Self> {
let tree = Tree::from_data(data, &Options::default())?;
let options = Options {
style_sheet: Some("svg { color: white }".into()),
..Options::default()
};
let tree = Tree::from_data(data, &options)?;
Ok(Self::Svg(Box::new(tree)))
}