base
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| FontProvider pycons.font_providers.base Base class for font providers. |
🛈 DocStrings¶
Base class for font providers.
FontProvider
¶
Bases: ABC
Base class for font providers.
Source code in src/pycons/font_providers/base.py
get_download_urls
abstractmethod
¶
Get URLs for the font file and mapping.
Returns:
| Type | Description |
|---|---|
tuple[str, str]
|
Tuple of (ttf_url, mapping_url) |
get_latest_version
abstractmethod
async
¶
process_mapping
abstractmethod
¶
Process the raw mapping data into a name->unicode dict.
Different fonts provide their mappings in different formats (JSON, CSS, etc). This method handles the font-specific processing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mapping_data
|
bytes
|
Raw bytes of the mapping file |
required |
Returns:
| Type | Description |
|---|---|
dict[str, str]
|
Dict mapping icon names to unicode points |