Both my daughters did this. My first one actually projectile vomited. The second one just was fussy and spit up a lot. Both turned out to have acid reflux (docs tried zantac first with both, wasnt strong enough, switched to Prevacid and problem solved- though its not approved for babies under one, it was the only solution and both were just fine). The first one also needed an additional medication to help push food through her stomach and into her small intestines, but that doesnt seem to be your baby's problem so I wont go further into that.
The antacid stopped some of it but not enough. The next solution was devastating to me both times. It turned out they were both lactose intolerant. They could not have my milk. The first needed hypoallergenic formula, the second just lactose free formula. Soy formula didnt help, we dont know why, perhaps they had an intolerance to soy protien too.
It may also be something you are eating, that's what I was told and tried both times because I wanted to nurse (and was blessed with tons of milk, something many women struggle with- it was really truly a shame). I eliminated all dairy from my diet, nothing. But that was just my own expirience.
Being lactose intolerant is extremely common, so is acid reflux. In fact with the reflux one peditrician told me almost all newborns have it to some degree or another, but many not enough to warrant medication. My nephew had it and was on medication for only a couple months and he grew out of the problem, which is very often the case.
One note, if your doctor dismisses your baby's problem, find a new doctor. It took SIX doctors with my first one before one took me seriously. I persisted because my mommy-instincts told me something was wrong. Again, projectile vomiting isnt your baby's problem, but would you believe that the first five docs simply didnt believe me? The vomit could fly 4-5 feet, hit the wall, but they thought I was just being an over protective over reacting new mother. I remember one said "Have you ever knocked over a 6 oz bottle? Its a LOT of liquid!" to which I replied "Yes I know, I clean that much up off my floor and walls five times a day.", but no, she dismissed me. Still makes me mad, making my baby suffer for 6 months... Anyways! :-)
Hope you find the solution, whatever it ends up being.
p.s. Both my babies gained ample weight. Both were near 30 lbs by their first birthday (which #2 will have in 3 weeks). Does not mean something isnt wrong, just means that whatever it is isnt extremely serioud/deadly.