def _trim_whitespace(self, char):  # For loading text assets only
        """
        Internal. Trims white space pixels from the front and back of loaded
        text characters
        """

        psum = lambda x: sum(sum(x, []))
        if psum(char) > 0:
            is_empty = True
            while is_empty:  # From front
                row = char[0:8]
                is_empty = psum(row) == 0
                if is_empty:
                    del char[0:8]
            is_empty = True
            while is_empty:  # From back
                row = char[-8:]
                is_empty = psum(row) == 0
                if is_empty:
                    del char[-8:]
        return char
def _trim_whitespace ( self , char ) : psum = lambda x : sum ( sum ( x , [ ] ) ) if psum ( char ) > 0 : is_empty = True while is_empty : row = char [ 0 : 8 ] is_empty = psum ( row ) == 0 if is_empty : del char [ 0 : 8 ] is_empty = True while is_empty : row = char [ - 8 : ] is_empty = psum ( row ) == 0 if is_empty : del char [ - 8 : ] return char
Internal. Trims white space pixels from the front and back of loaded
        text characters