I don't recommend these colors: they are thickened with cellulose derivatives and can cause massive clogging in your printhead.
Good printer safe food dyes:
yellow: riboflavine (it's a vitamine B)
magenta: erythrosine (cherry red), carmoisin
cyan/blue: indigotine mixed with fast green fcf (the reason is indigotine is too blue and fast green more greenish, so mixing these two dyes will yield a more true cyan).
black: a mix of above to make a composite black.
Note: some people will react allergically to one of the aforementioned dyes.
I don't recommend glycerin. The amount needed for a good preservative action will make the ink becoming too thick to be printed properly from the printer. Propylene glycol is to be used.
regarding Fast Green FCF according to wiki Its use as a food dye is prohibited in European Union and some other countries
indigotine is E 132 and okay to use
erythrosine E 127 also okay but as you stated could cause allegical reactions at least
carmoisin E 122 also okay to use
Some of the colorants are not cheap, or difficult to obtain on the web (I'll have to ask my pharmacist, he already suspects I am a drug addict because of the syringes and needles I buy there ).
Maybe it will be less costly and easier to buy the ink (found 4x100ml for about €30, enough to make a lot of cakes).