Closed tbejos closed 3 months ago
I can reproduce this. Maybe it's because of the "sans-serif" font being used? I don't have a font with that exact name installed
I see that in the README it has ttf-bitstream-vera
as a dependency but I can see that isn't the default font on my system
$ fc-match "sans-serif"
NotoSans-Regular.ttf: "Noto Sans" "Regular"
maybe that is related? Although maybe you can't just match based on font-family like you mention
I'll be honest, I don't know much about how fonts are selected/loaded. If fc-match
correctly represents the font selection done by the system, I'd honestly expect "sans-serif" to just work given that it also returns a font for me.
Okay so I was able to fix it by making the following change, however it made some changes to Cargo.lock
as well, I am not familiar with rust development, if I make a PR should I also include the changes to Cargo.lock
, or is that auto-generated/populated by something like GitHub Actions?
diff --git a/Cargo.toml b/Cargo.toml
index 6c2e003..55ee868 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -31,7 +31,7 @@ features = ["png", "jpeg", "webp", "hdr", "exr"]
[dependencies.plotters]
version = "0.3.4"
default-features = false
-features = ["bitmap_backend", "area_series"]
+features = ["bitmap_backend", "area_series", "ttf"]
optional = true
[profile.release]
Based on this change fixing it looks like the issue is that it might not support ttf
fonts by default, I wonder if setting the default to a bitmap font instead would work. I am not sure if this would break it for people using non-ttf fonts or not
if I make a PR should I also include the changes to Cargo.lock, or is that auto-generated/populated by something like GitHub Actions?
Yes, please add those aswell. There's no auto-updater on this repo, and the change to Cargo.lock
is directly caused by your change to the Cargo.toml
file, so it's part of the change.
Hello, I have been unable to get the graphing feature (
-g
) to work on Arch Linux. The command I used wasssimulacra2_rs video source.mkv encoded.mkv -g -f 20
. I have made sure install all the dependencies listed in the README but I run into a panic from the plotters library. I initially tried using the AUR package but when I ran into this issue I attempted to clone from GitHub and build manually. I usedcargo --frozen --release
to build, I made one change to theCargo.toml
to get more information in the backtrace.Here is the backtrace I got using
RUST_BACKTRACE=full
, it appears to be a font issue of some kind. I installed some additional fonts along the way (and rebuilt font cache and restarted a few times as well) but that did not seem to resolve the issue. I believe only stack frames 15-25 are relevant but I posted the full backtrace just in case.Is there a dependency that I am missing? From what I can tell I believe I have followed all of the steps to build as intended. Has anyone else been able to graph successfully recently, or is this not an issue for anyone else? Thanks!