text layout and utility functions