The f-hole used to be a C-hole or S-hole
The openings on both sides of the body of the violin that are shaped like a lowercase "f" are appropriately called f-holes, and these serve to transmit to the outside air the vibrations within the body caused by the body's resonance, ringing out with a rich tone. The Viola da Gamba, which is older than the violin, has primarily C-shaped holes, and even after the violin appeared in the sixteenth century, half-moon, flame, S-shapes and other designs were also prevalent.
Standardizing on the current f-shape started about the beginning of the eighteenth century when the development of the violin was mostly complete. The f-hole is said to have been created when violin makers carved a section out of the middle of the S-hole to indicate the position of the bridge on the body.
(Source: Takatomo Kurosawa, World Instrument Dictionary, published by Yozankaku)