Hi Nikita,
You’re right, this is a problem currently. If you search this group for "icon", you’ll find lots of ideas and attempts, but no solutions so far.
In the past, keyboard layout icons were images, but now they are created on the fly, so the whole situation has changed.
I’m sure John is keeping an eye on any developments on Apple’s side, but for now, we have to be satisfied with the old-fashioned icons.
Personally, I don’t mind, because I like those colorful pictures better :-)
Also, the custom layouts I use are not linked to 1 language in
particular, so a text-based icon wouldn’t even make much sense in my
case.
From my own experiments with Icon Composer 2x, I can confirm that only
square images are accepted, so this may be dictated by the .icns format.