Skip to content

Instantly share code, notes, and snippets.

@bczhc
Last active December 20, 2025 10:24
Show Gist options
  • Select an option

  • Save bczhc/83aedd5e8ebc50bff0e2f0a5f31eb36f to your computer and use it in GitHub Desktop.

Select an option

Save bczhc/83aedd5e8ebc50bff0e2f0a5f31eb36f to your computer and use it in GitHub Desktop.
Inkscape masking bug
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Inkscape 1.4.2 (ebf0e940d0, 2025-05-08)

这三个问题都用到了masking。1.svg和3.svg是有问题的,在Inkscape里打开能正常显示,但保存成svg,无论是inkscape格式的svg还是plain svg,都不能正常显示,只显示一半。

2.svg是我通过一些workaround把1.svg折腾好了,操作大概是先把mask解除掉,再把所有组解除掉,再全按原样编组,最后再mask上。3.svg是一个缩减的复现版本,但它的症状又不相同。对于3.svg,使用Inkscape打开后,先解除mask,再选中“P”的path,再移动一下(比如按一下键盘右键再按一下左键,这样位置就不会变),然后再保存,这样保存出的svg就正常了。

对于2.svg,使用inkscape打开后,如果把页面大小减小一半,再选中最外部的“Logo”组,对它缩放减小一半,再保存,又会复现出来bug,即inkscape里显示正常,导出/保存的svg是正常的。

不想深究了,就此记录一下。真的无语了,浪费了我好多好多时间在上面。

(Palworld图标版权Pocketpair所有)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment