The study of the writing system of a language, including the rules governing spelling, punctuation and capitalization.