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

Invisible Bold Text on WASM #2636

Open
4 tasks done
JL710 opened this issue Oct 13, 2024 · 0 comments
Open
4 tasks done

Invisible Bold Text on WASM #2636

JL710 opened this issue Oct 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@JL710
Copy link
Contributor

JL710 commented Oct 13, 2024

Is your issue REALLY a bug?

  • My issue is indeed a bug!
  • I am not crazy! I will not fill out this form just to ask a question or request a feature. Pinky promise.

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

I have this code that should show some text on wasm:

fn view(_: &u8) -> iced::Element<()> {
    {
        iced::widget::text("test")
            .font(iced::Font {
                weight: iced::font::Weight::Bold,
                ..Default::default()
            })
            .into()
    }
}

fn main() {
    iced::run("", |_: &mut u8, _: ()| iced::Task::none(), view).unwrap();
}

But the text is invisible.

With just the default font it is visible.

What is the expected behavior?

I expect the text to be visible and bold.

Version

crates.io release

Operating System

Linux

Do you have any log output?

index.html

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>NAME OF THE WEBSITE</title>
    <base data-trunk-public-url />
</head>

<body style="margin: 0; padding: 0; width:100%; height:100svh">
    <link data-trunk rel="rust" href="Cargo.toml" data-wasm-opt="z" data-bin="iced_wasm_invisible_font_bug" />
</body>

</html>


Cargo.toml
```toml
[package]
name = "iced_wasm_invisible_font_bug"
version = "0.1.0"
edition = "2021"

[dependencies]
iced = { version = "0.13.1", features = ["webgl"] }
@JL710 JL710 added the bug Something isn't working label Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant