Hacker News new | past | comments | ask | show | jobs | submit login

Stunning. Already supports all popular font types, image types, and SVG.



It’s really great work. The font support is a bit behind the times though, and text shaping is non-existent. I see so many libraries fall at that hurdle, they think they can do it themselves then when they realise it’s hard and requires a team of people they either abandon it or tell you to use harfbuzz without the necessary integration points. Hopefully that won’t be the case here!


Rust managed to get text shaping (https://github.com/RazrFalcon/rustybuzz), you can certainly do it yourself but it's just a lot of work...


I agree shaping is hard. But so is a lot of other things we have done. We will just take it one setup at a time. I am sure with time we will conquer shaping as well.


I don't think treeform and guzba will have much trouble, honestly.


Not to mention operations like "complex blends: Darken, Multiply, Color Dodge, Hue, Luminosity... etc" and many SIMD accelerations. It also has Node, Python, and C interfaces. Though I haven't found an excuse to use it yet. Surely there's got to be some excuse... ;)


If you're looking for a small, fast CPU-based 2D library, you might be interested in https://github.com/RazrFalcon/tiny-skia

Just like Skia, all pixel accesses is SIMD accelerated.

It doesn't have C bindings, but they can be trivially implemented.


Ah, that's the thing.. I don't have a reason/need for using a fast 2d library. It's that Pixie's Nim API makes me want to have a reason. Like maybe it'd be fun to write a modern plotting backend with it! Currently even one of Julia-lang's best plot backends uses a C-based plotting library, GR [1]. It's a pain to use from raw C bindings though. :/ Also while Rust is great, I'm too lazy to program in it. All them `& mut<RC<box<mything>>` things. ;) (Yes I know that's not real Rust code...) Though tiny-skia does look like a well done library!

1: https://gr.readthedocs.io/


Dug into the source for the GIF decoder a bit and it looks like it only supports the most basic features- no windowing, animation, local colortables, or background colors. I suspect many optimized static GIFs won't decode correctly. Still, everything has to start somewhere!


We did not really "need" a GIF decoder but it was a fun thing to make. It can decode many many gifs, but yes its still missing features. I hope to get to them though eventually.


SVG support has been really helpful for me to see a diverse and "real world" set of rendering results when working on Pixie. And for testing it's great to be able to grab huge sets of open source SVG files and check our results.

For example, I have a few "megatests" where I render entire icon sets or emoji sets such as https://raw.githubusercontent.com/treeform/pixie/master/test... and https://raw.githubusercontent.com/treeform/pixie/master/test...

Running these tests helps me feel more confident that changes I'm making are not breaking things.


I'm sure you will be interested in https://github.com/RazrFalcon/resvg-test-suite

From a quick glance, pixie should pass 10-20% of those tests. Yes, SVG is that complex.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: