My most recent flag project was a silk pennoncel, with three gold sandglasses on a blue field. Modern fabric paint was the lowest layer of the sandglasses, with gold leaf burnished atop that with gum arabic.
Flags, coat armor and caparisons were often painted in the Middle Ages, and Cennino Cennini had much useful advice on painting cloth. Both silk and linen was used for surviving flags, and the Earl of Wawick owned standards of worsted. Cennini also described how to paint velvet, and woolen cloth for jousts or tournaments. Cennini generally sized the cloth where it would be painted, which is essential to protect the cloth if oil based paint or mordant for gilding is used.
I sewed the silk to a peripheral piece of cloth, shaped so it could be stretched over a modern canvas stretcher just like a canvas for easel painting.
Modern acrylic fabric paint can be applied to cloth directly, but has a gloss that is somewhat different from oil paint over size or tempera.
Note that medieval flag makers seem to have been more flexible in arranging charges than their modern emulators, as long as the number was correct. The crowns on Arthur’s pennoncel in the Nine Worthies Tapestry are arranged similarly to here, but those on his shield are two and one.
Using resist and dyes to paint silk seems to have been unknown in Europe before the 19th century.