FontProvider
Sub classes¶
| Name | Children | Inherits |
|---|---|---|
| FontAwesomeBase pycons.font_providers.providers Base class for all FontAwesome providers. |
||
| CommunityMaterialDesignProvider pycons.font_providers.providers Provider for Material Design icons. |
||
| CodiconsProvider pycons.font_providers.providers Provider for Microsoft's Codicons. |
||
| PhosphorProvider pycons.font_providers.providers Provider for Phosphor icons. |
||
| RemixProvider pycons.font_providers.providers Provider for Remix icons. |
||
| ElusiveIconsProvider pycons.font_providers.providers Provider for Elusive Icons. |
||
| BaseGoogleMaterialSymbolsProvider pycons.font_providers.providers Base provider for Google's official Material Symbols. |
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| ABC abc Helper class that provides a standard way to create an ABC using |
⋔ Inheritance diagram¶
graph TD
2987344157["base.FontProvider"]
925645236["abc.ABC"]
2751680898["builtins.object"]
925645236 --> 2987344157
2751680898 --> 925645236
🛈 DocStrings¶
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 |