Beispiel #1
0
    def size(self):
        """
        Read/write |Length| value or |None|, indicating the font height in
        English Metric Units (EMU). |None| indicates the font size should be
        inherited from its style hierarchy, such as a placeholder or document
        defaults (usually 18pt). |Length| is a subclass of |int| having
        properties for convenient conversion into points or other length
        units. Likewise, the :class:`pptx.util.Pt` class allows convenient
        specification of point values::

            >> font.size = Pt(24)
            >> font.size
            304800
            >> font.size.pt
            24.0
        """
        sz = self._rPr.sz
        if sz is None:
            return None
        return Centipoints(sz)
Beispiel #2
0
 def convert_from_xml(cls, str_value):
     """
     Reads string integer centipoints, returns |Length| value.
     """
     return Centipoints(int(str_value))