dfrg / swash

Font introspection, complex text shaping and glyph rendering.
Apache License 2.0
584 stars 34 forks source link

Is it possiable using [png](https://lib.rs/crates/png) for decode emoji png? #48

Open declantsien opened 4 months ago

declantsien commented 4 months ago

I am having an issue using swash with WebRender glyph rasterizer. The swash-demo works just fine. So I guess it's that webrender using different gl shader when rendering font glyphs.

Without any changes to swash this is output of emojis using wr_glyph_rasterizer

swappy-20240305_122521

My fork using png crate's decode

swappy-20240305_122140

notgull commented 4 months ago

Agreed on this count. swash shouldn't try to re-invent the wheel.

declantsien commented 4 months ago

Also resizing the emoji pngs is not necessary in my case. wr_glyph_rasterizer just need to know the scale of the Image