Skip to content

Devicon API

ttkbootstrap_icons_devicon.icon

DevStyles = Literal['plain', 'plain-wordmark', 'original', 'original-wordmark'] module-attribute

DevIcon

Bases: Icon

Convenience icon for the Devicon glyph set.

Resolves the provided name (optionally with a style) using DeviconProvider, 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. "anaconda") or a raw glyph (e.g. "anaconda-plain"). If you pass a conflicting style (e.g. name ends with "-plain" but you set style="original"), a ValueError is raised.

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 DevStyles | None

Optional style override: "plain", "original", "plain-wordmark", "original-wordmark". If omitted, the provider's default style is used. When name already encodes a style suffix (e.g. "-plain"), that suffix takes precedence.

None

Raises:

Type Description
ValueError

If the name cannot be resolved for the requested style.

DeviconFontProvider

Bases: BaseFontProvider

__init__()

Initialize the provider with style configuration.

Uses a single font file (devicon.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_devicon.provider

DeviconFontProvider

Bases: BaseFontProvider

__init__()

Initialize the provider with style configuration.

Uses a single font file (devicon.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