Skip to content

Commit

Permalink
Load fonts from system dir to make it work local and on reMarkable
Browse files Browse the repository at this point in the history
  • Loading branch information
awwaiid committed Dec 23, 2024
1 parent 87805ca commit 877feda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ use std::sync::Arc;
pub fn svg_to_bitmap(svg_data: &str, width: u32, height: u32) -> Result<Vec<Vec<bool>>> {
let mut opt = Options::default();
let mut fontdb = fontdb::Database::new();
fontdb.load_fonts_dir("/usr/share/fonts/ttf/noto");
fontdb.load_system_fonts();

opt.fontdb = Arc::new(fontdb);

let tree = match Tree::from_str(svg_data, &opt) {
Expand Down

0 comments on commit 877feda

Please sign in to comment.