fixed 'empty text with spacing' utils.text_extents bug; improved border_pixels template