Improve typography code

Signed-off-by: Aniket Pant <me@aniketpant.com>