Adding TextToPixels static function