dei-layborer / fauxreilly

A typst package for creating O'Reilly-style cover pages
GNU General Public License v3.0
5 stars 0 forks source link

`pic` should take an image and not a path. #1

Open Dherse opened 2 weeks ago

Dherse commented 2 weeks ago

Due to the way typst handles paths, if you use a string for the path, it will always try and get an image within the local copy of the package instead of inside of the user's project. This can be fixed by making pic an image or a byte array (i.e read("my_file.png") and using image.decode)

dei-layborer commented 1 week ago

Good catch, as unfortunately there's not really any way to test how something will behave before it's uploaded to universe. However, changing to read() wouldn't resolve the issue, as according to the docs, paths work the same way with that function as they do with image().

I'm submitting a change using what should be an absolute path to the project root, so we'll see how that goes.