__init__ constructor

On this page

init

Initializes a new FolderFontSource instance.

def __init__(self, folder_path, search_option):
    ...
Parameter Type Description
folder_path str Path to the folder that contains TrueType fonts.
search_option SearchOption Specifies whether to search the current folder, or the current folder and all sub‑folders.
Raises Description
ValueError When folder_path is None.
FileNotFoundError When the path specified in folder_path can’t be located.

See Also

On this page