Hmm, you're right, I haven't noticed that before. I had a look at the original shield icons and they seem to have the same issue. It's barely noticeable with them though, as they have rather large gaps on both sides.
You'd have to scale the icons down a bit and maybe shift them to the left to compensate. It seems to be a 2 pixel shift (took a screenshot and measured it '> )
I have a theory on where the shift comes from:
A single tile/slot in the inventory is 32x32 pixels wide. But there are also those grey lines, which are one pixel wide and there lies the issue. If an item stretches over multiple slots it would need to be scaled up or at least moved a little to compensate for those grey lines. The engine doesn't do that and this causes a slight shift.
So we have to do that ourselves. I think all icons need to be shifted to the left by 1 pixel for every slot it takes, i.e. 1 pixel for 32x32, 2 pixels for 64x64, etc. It may be necessary to do that vertically too, but I'd argue it's barely noticeable there.
As for icon sizes:
I also noticed that only large shield icons have that small unused area under them:
- Small shields use 64x64
- Large shield use 64x128 with 28 pixels unused (or maybe it's 32, who knows)
- Tower shields use 64x128 (with everything used)
Like large shields cloaks too use 64x128 icons with a small area under them unused.