Closed frankrolf closed 9 months ago
How do you run nanoemoji? The --clip_to_viewbox option should already be enabled by default, unless you set --noclip_to_viewbox CLI flag, or equivalent clip_to_viebox = false in the config.toml that your may feed nanoemoji.
Also maybe upload the source .SVG file and the exact command to reproduce, thank you!
I do use the raw .svg files provided in this repo, and wrap them into a SVG-in-OT font (repo and workflow here: https://github.com/adobe-fonts/noto-emoji-svg)
At this moment I donβt use nanoemoji β but perhaps I could extract a method to understand how the clipping works. Thanks for the pointer!
Ah so you are not using nanoemoji! I misunderstood then. The clipping happens in picosvg actually, nanoemoji simply calls picosvg with that option.
Sorry I was confused when I read the repository title "noto-emoji" I misread and thought you had posted this on the nanoemoji GitHub repo.. π
Thanks again for the pointers here!
For anyone reading this, the necessary command is picosvg --clip_to_viewbox file.svg
π
Rather late +1 to use picosvg. My understanding is these surprising off-board assets are very helpful to the designers so we wouldn't want to alter the source.
I am working on a SVG-in-OT version of NotoEmoji, and I notice that many SVGs contain leftover artwork beyond the art board (or viewBox). For example, all the glyphs containing 1F485:
Using the SVG font, the result ends up looking like this:
I realize that cleaning up the SVGs might not be a high priority, but I would appreciate such work (rather than doing the same downstream on my end). There must be a programmatic way to find outlines outside the view box, but unfortunately I have not found anything yet β pointers are welcome!
Thanks!