Consolidated text writing functions.