googlefonts / noto-emoji

Noto Emoji fonts
SIL Open Font License 1.1
3.74k stars 451 forks source link

Off-artboard artwork for many SVGs #394

Closed frankrolf closed 9 months ago

frankrolf commented 2 years ago

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:

Screen Shot 2022-06-29 at 22 41 34

Using the SVG font, the result ends up looking like this:

Screen Shot 2022-06-29 at 22 42 50

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!

anthrotype commented 2 years 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.

anthrotype commented 2 years ago

Also maybe upload the source .SVG file and the exact command to reproduce, thank you!

frankrolf commented 2 years ago

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!

anthrotype commented 2 years ago

Ah so you are not using nanoemoji! I misunderstood then. The clipping happens in picosvg actually, nanoemoji simply calls picosvg with that option.

anthrotype commented 2 years ago

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.. πŸ˜…

frankrolf commented 2 years ago

Thanks again for the pointers here! For anyone reading this, the necessary command is picosvg --clip_to_viewbox file.svg πŸ‘

rsheeter commented 9 months ago

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.