-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsystem_fonts.py
More file actions
37 lines (32 loc) · 919 Bytes
/
Copy pathsystem_fonts.py
File metadata and controls
37 lines (32 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from abc import ABC, abstractmethod
from pathlib import Path
from typing import Optional, Set
class SystemFonts(ABC):
@staticmethod
@abstractmethod
def get_system_fonts_filename() -> Set[str]:
"""
Return an set of all the installed fonts filename.
"""
pass
@staticmethod
@abstractmethod
def install_font(font_filename: Path, add_font_to_registry: bool = False) -> None:
"""
Install a font from it's filename.
"""
pass
@staticmethod
@abstractmethod
def uninstall_font(font_filename: Path, remove_font_in_registry: bool) -> None:
"""
Uninstall a font from it's filename.
"""
pass
@staticmethod
@abstractmethod
def get_font_fallback(family_name: str, font_weight: int, is_italic: bool, characters: str) -> Optional[Path]:
"""
TODO.
"""
pass