The size 40 pixel not work.
(https://forum.simutrans.com/index.php?action=dlattach;topic=21267.0;attach=30005;image)
40 is a multiple of 8. So I'm surprised that this size doesn't work. 42 works, however.
The zoom routine used the same scaling steps as for the display 2:1, 3.2, 4:3, 1:1, 3:4, 5:8, 1:8, 3:8, 1:4, 1:8
With 32 pixel this gives the possbile sizes of 64, 48, 42 (actually 42.6667, but it will be trucated to 42), 32 (and smaller like 24 ...).