Giter Club home page Giter Club logo

bevy_text_mesh's Introduction

Hello world!

bevy_text_mesh's People

Contributors

blaind avatar cyannide avatar vav-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bevy_text_mesh's Issues

Interoperability with bevy `.ttf` AssetLoader

Currently crate uses its own asset loader for a font.

This may be desired eventually too, but it may overlap with bevy standard loader. It could not be used, since there is no way to expose the font-bytes (needed for ttf2mesh).

WASM support

Is there any chance WASM will be supported? Thanks.

Panics on mesh generation

thread 'Compute Task Pool (15)' panicked at C:\Users\Johan\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_text_mesh-0.9.0\src\mesh_data_generator.rs:95:26:
called `Result::unwrap()` on an `Err` value: Glyph2MeshError
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `bevy_text_mesh::mesh_system::text_mesh`!
Encountered a panic in system `bevy_app::main_schedule::Main::run_main`!

I used the bold version of https://fonts.google.com/specimen/Playpen+Sans/about?preview.text=score%201234

    let font = asset_server.load("fonts/playpen_sans_extrabold.ttf#mesh");
    commands.spawn((
        Name::new("ScoreText"),
        TextMeshBundle {
            text_mesh: TextMesh {
                // text: "0".into(), // does not panic
                text: "1".into(), // panics
                style: TextMeshStyle {
                    font: font.clone(),
                    font_size: SizeUnit::NonStandard(36.),
                    color: Color::rgb(0.0, 1.0, 0.0),
                    mesh_quality: Quality::Low,
                    ..default()
                },
                ..default()
            },
            ..default()
        },
    ));

Not all fonts function

Some fonts produce a Glyph2MeshError when you attempt to load them. For example, Inter.

Other fonts, like Courier, don't seem to render at all, even though they load properly.

Correct font sizing

Currently, the size unit is just an arbitrary number (SizeUnit::NonStandard) - some standardized way should be defined.

Mesh cache purging

The crate uses a global mesh cache.

It is not being cleaned up at all, resulting to polluted cache, when:

  • user does not render with a specific font anymore
  • user creates glyphs with varying depths (maybe generate mesh with constant depth, and change vertice depths at runtime?)

Warning or message when `#mesh` suffix is missing

Not sure what type of asset ends up getting loaded in this case, but Res<Assets<TextMeshFont>>::get yields None without #mesh, so of course nothing would be displayed.

This is the result of me misreading the docs/examples but I feel like something should blow up or yell at me for this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.