Material Design Icons API¶
ttkbootstrap_icons_mat.icon
¶
MatStyles = Literal['fill', 'outline']
module-attribute
¶
MatIcon
¶
Bases: Icon
Convenience icon for the Mat Icon glyph set.
Resolves the provided name (optionally with a style) using MatProvider,
then initializes the base Icon with the resolved glyph.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Glyph name. May be a friendly name (e.g. "bell") or a raw glyph
(e.g. "bell-outline"). If you pass a conflicting style (e.g. name ends
with "-outline" but you set |
required |
size
|
int
|
Pixel size of the rasterized image (default: 24). |
24
|
color
|
str
|
Foreground color used to render the glyph (default: "black"). |
'black'
|
style
|
MatStyles | None
|
Optional style override: "fill", "outline". If omitted, the provider's default style is used.
When |
None
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If the name cannot be resolved for the requested style. |
MaterialDesignFontProvider
¶
Bases: BaseFontProvider
Initialize the provider with style configuration.
Uses a single font file (materialdesignicons-webfont.ttf) for all styles.
Style selection is performed by predicates that test for the suffix.
format_glyph_name(glyph_name)
staticmethod
¶
Display friendly name for font name
ttkbootstrap_icons_mat.provider
¶
MaterialDesignFontProvider
¶
Bases: BaseFontProvider
Initialize the provider with style configuration.
Uses a single font file (materialdesignicons-webfont.ttf) for all styles.
Style selection is performed by predicates that test for the suffix.
format_glyph_name(glyph_name)
staticmethod
¶
Display friendly name for font name