This is a very in-depth article about how Pinyin is written, focusing mainly on the letters used, the typeface, arrangement on the page, and so on. It probably contains more about this topic than you ever thought you wanted to know, but I highly recommend it! The article is in Chinese and not very beginner-friendly at all.
Thanks to NFSL2001 on Reddit who recommend the article.