Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when attempting to load font in the web + wasm_bindgen context #636

Open
Tracked by #552
Niedzwiedzw opened this issue Jul 5, 2020 · 0 comments
Open
Tracked by #552
Labels
bug Some API breaks the contract it establishes subsystem-util
Milestone

Comments

@Niedzwiedzw
Copy link

Niedzwiedzw commented Jul 5, 2020

Describe the bug
It crashes

To Reproduce

#[wasm_bindgen(start)]
pub fn main_js() -> Result<(), JsValue> {
    #[cfg(debug_assertions)]
    console_error_panic_hook::set_once();

    async fn app(window: Window, mut gfx: Graphics, mut input: Input) -> QsResult<()> {
        console_log!("trying to load font");
        let ttf = VectorFont::load("font.ttf").await?;
        console_log!("font loaded");  // <--- it never reaches this point
        // ...
    }
    run(
        Settings {
            title: "Square Example",
            size: render_size,
            ..Settings::default()
        },
        app,
    );
    Ok(())

When going to host:80/font.ttf it is present there. In the network tab I can see it being loaded
image
image

Environment and versions (please complete the following information):
manjaro linux 20.3
tested on firefox and chrome
quicksilver = "0.4.0-alpha0.5" + web-sys

@ryanisaacg ryanisaacg added bug Some API breaks the contract it establishes subsystem-util labels Jul 10, 2020
@ryanisaacg ryanisaacg added this to the v0.4 Alpha milestone Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Some API breaks the contract it establishes subsystem-util
Projects
None yet
Development

No branches or pull requests

2 participants