@staticmethod
def size_to_points(css_value):
    """
        Transform a pixel string into points (used by word).

        :param css_value: string optionally ending in px/pt
        :return: an integer point representation
        """
    if isinstance(css_value, str):
        is_pt = css_value.endswith('pt')
        if css_value.endswith('px') or is_pt:
            css_value = css_value[:-2]
        try:
            css_value = float(css_value)
        except ValueError:
            return None
        if is_pt:
            return css_value
        css_value = round(css_value)
    return css_value * 0.75
