intellicrack.ui.resources.font_manager
Font management for Intellicrack UI.
Provides custom font loading and application for the Intellicrack interface.
- class FontManager[source]
Bases:
objectSingleton font manager for custom font loading and management.
Handles loading custom fonts from the assets directory and provides font instances for code and UI elements.
- classmethod get_instance()[source]
Get the singleton instance of FontManager.
- Returns:
The FontManager singleton instance.
- Return type:
- classmethod reset_instance()[source]
Reset the singleton instance (primarily for testing).
- Return type:
None
- load_fonts()[source]
Load all custom fonts from the fonts directory.
- Returns:
True if at least one font was loaded successfully.
- Return type:
- get_code_font(size=None)[source]
Get a font suitable for code display.
- Parameters:
size (int | None) – Font size in points, or
Noneto use thefont_sizes.code_defaultvalue fromfont_config.json(falling back to10if unconfigured).- Returns:
QFont configured for code display.
- Return type:
QFont
- get_code_font_bold(size=None)[source]
Get a bold font suitable for code display.
- Parameters:
size (int | None) – Font size in points, or
Noneto use thefont_sizes.code_defaultvalue fromfont_config.json(falling back to10if unconfigured).- Returns:
QFont configured for bold code display.
- Return type:
QFont
- get_ui_font(size=None)[source]
Get a font suitable for UI elements.
- Parameters:
size (int | None) – Font size in points, or
Noneto use thefont_sizes.ui_defaultvalue fromfont_config.json(falling back to9if unconfigured).- Returns:
QFont configured for UI display.
- Return type:
QFont
- get_ui_font_bold(size=None)[source]
Get a bold font suitable for UI elements.
- Parameters:
size (int | None) – Font size in points, or
Noneto use thefont_sizes.ui_defaultvalue fromfont_config.json(falling back to9if unconfigured).- Returns:
QFont configured for bold UI display.
- Return type:
QFont
- get_heading_font(size=None)[source]
Get a font suitable for headings.
- Parameters:
size (int | None) – Font size in points, or
Noneto use thefont_sizes.ui_largevalue fromfont_config.json(falling back to12if unconfigured).- Returns:
QFont configured for heading display.
- Return type:
QFont
- property code_font_family: str
The current code font family name.
- Returns:
Code font family name.
- Return type:
- property ui_font_family: str
The current UI font family name.
- Returns:
UI font family name.
- Return type: