Closed Jasper-Bekkers closed 1 year ago
Examples of this rendered in cosmic-text;
Thanks! This looks good but I did notice that Outline
already has a bounds
method (https://docs.rs/swash/latest/swash/scale/outline/struct.Outline.html#method.bounds) that computes the full bounding box. I assume this will return the same result as your code without requiring the change to zeno though I’m happy to accept that one as well.
This is what I'm using, however, Bounds didn't have a way to grow yet; which is what I PR'd to Zeno.
Right, but Outline::bounds
should already return the union of all layer bboxes so there’s no need to calculate it manually.
Right, but
Outline::bounds
should already return the union of all layer bboxes so there’s no need to calculate it manually.
Thanks for the heads up! I've update the code to just call this instead and that seems to work fine as well (re-ran my tests for it).
Thanks for fixing this! I’ll bump the version and publish a new release to crates later today.
Thanks! A release would be quite welcome 👍
Released 0.1.5!
Addresses incorrect emoji rendering as reported in #26
Previously the
placement
of the very first colored outline was used to calculate image dimensions, however this is incorrect. One should use the full bounds of all outlines for calculating this size.Notice that this also needs a tiny PR on zeno https://github.com/dfrg/zeno/pull/4
Attached are correctly rendered 🤖 and 🪵 emoji's as per the issue file.