mooman219 / fontdue

The fastest font renderer in the world, written in pure rust.
Apache License 2.0
1.44k stars 72 forks source link

Missing font in test #101

Closed ghost closed 2 years ago

ghost commented 2 years ago

https://download.copr.fedorainfracloud.org/results/remilauzier/zemeroth/fedora-rawhide-x86_64/03258983-rust-fontdue/builder-live.log.gz

error: couldn't read tests/modules/../../resources/fonts/Roboto-Regular.ttf: No such file or directory (os error 2) --> tests/modules/mod.rs:15:5 15 include_bytes!("../../resources/fonts/Roboto-Regular.ttf"), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: this error originates in the macro include_bytes (in Nightly builds, run with -Z macro-backtrace for more info)

error: couldn't read tests/modules/../../resources/fonts/RobotoMono-Regular.ttf: No such file or directory (os error 2) --> tests/modules/mod.rs:16:5 16 include_bytes!("../../resources/fonts/RobotoMono-Regular.ttf"), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: this error originates in the macro include_bytes (in Nightly builds, run with -Z macro-backtrace for more info)

error: couldn't read tests/modules/../../resources/fonts/Comfortaa-Regular.ttf: No such file or directory (os error 2) --> tests/modules/mod.rs:17:5 17 include_bytes!("../../resources/fonts/Comfortaa-Regular.ttf"), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: this error originates in the macro include_bytes (in Nightly builds, run with -Z macro-backtrace for more info)

error: couldn't read tests/modules/../../resources/fonts/Inconsolata-Regular.ttf: No such file or directory (os error 2) --> tests/modules/mod.rs:18:5 18 include_bytes!("../../resources/fonts/Inconsolata-Regular.ttf"), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: this error originates in the macro include_bytes (in Nightly builds, run with -Z macro-backtrace for more info)

error: couldn't read tests/modules/../../resources/fonts/FasterOne-Regular.ttf: No such file or directory (os error 2) --> tests/modules/mod.rs:19:5 19 include_bytes!("../../resources/fonts/FasterOne-Regular.ttf"), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: this error originates in the macro include_bytes (in Nightly builds, run with -Z macro-backtrace for more info)

error: couldn't read tests/modules/../../resources/fonts/Exo2-Regular.otf: No such file or directory (os error 2) --> tests/modules/mod.rs:20:5 20 include_bytes!("../../resources/fonts/Exo2-Regular.otf"), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: this error originates in the macro include_bytes (in Nightly builds, run with -Z macro-backtrace for more info)

error: couldn't read tests/modules/../../resources/fonts/GreatVibes-Regular.otf: No such file or directory (os error 2) --> tests/modules/mod.rs:21:5 21 include_bytes!("../../resources/fonts/GreatVibes-Regular.otf"), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: this error originates in the macro include_bytes (in Nightly builds, run with -Z macro-backtrace for more info)

error: couldn't read tests/modules/../../resources/fonts/modernpics.otf: No such file or directory (os error 2) --> tests/modules/mod.rs:22:5 22 include_bytes!("../../resources/fonts/modernpics.otf"), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: this error originates in the macro include_bytes (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile fontdue due to 8 previous errors

mooman219 commented 2 years ago

Those fonts are definitely there, https://github.com/mooman219/fontdue/tree/master/resources/fonts

You should ask the package maintainer for why they're not included in their build. Fontdue builds correctly on clone, I don't support 3rd party distributions of Fontdue.

ghost commented 2 years ago

I am in the process of packaging fontdue for fedora and the font are not include in the crate. Fedora use the source on crate.io and not the source on github.

mooman219 commented 2 years ago

I can attempt to resolve this by removing the tests from the crates.io publish

ghost commented 2 years ago

Why not just include the necessary fonts?

mooman219 commented 2 years ago

It negatively impacts everyone pulling from crates.io by inflating the package size by a couple orders of magnitude.

The package on crates.io does build correctly on cargo build as is, but it seems the package manager is trying to run/build the tests? This is an error on the package manager's part, running the tests invokes various file operations and takes a considerable amount of time.

mooman219 commented 2 years ago

0.6.3 will probably behave better when imported into a package manager now, by omitting the tests on publish. I definitely believe you shouldn't be attempting to run tests though if you're the one maintaining the automatic package import infra.