def bold_system_font_of_size(cls, size: float) -> Font: """ Returns the font object used for standard interface items that are rendered in boldface type in the specified size :param size: The size (in points) for the font. This value must be greater than 0.0. :rtype: pyto_ui.Font """ check(size, "size", [float, int]) font = cls(None, None) font.__ui_font__ = __UIFont__.boldSystemFontOfSize(CGFloat(size)) return font
def with_size(self, size: float) -> Font: """ Returns a font object that is the same as the receiver but which has the specified size instead. :param size: The desired size (in points) of the new font object. This value must be greater than 0.0. :rtype: pyto_ui.Font """ check(size, "size", [float, int]) font = self.__class__(None, None) font.__ui_font__ = self.__ui_font__.fontWithSize(CGFloat(size)) return font
def system_font_of_size(cls, size: float) -> Font: """ Returns the font object used for standard interface items in the specified size. :param size: The size (in points) to which the font is scaled. This value must be greater than 0.0. :rtype: pyto_ui.Font """ check(size, "size", [float, int]) font = cls(None, None) font.__ui_font__ = __UIFont__.systemFontOfSize(CGFloat(size)) return font
def __init__(self, name: str, size: float): """ Initializes a font with given name and size. :pram name: The fully specified name of the font. This name incorporates both the font family name and the specific style information for the font. :param size: The size (in points) to which the font is scaled. This value must be greater than 0.0. """ check(name, "name", [str, None]) check(size, "size", [float, int, None]) if name is None and size is None: return self.__ui_font__ = __UIFont__.fontWithName(name, size=CGFloat(size))