PR: add support for 3rd-party font providers - #312
Open
o-murphy wants to merge 1 commit into
Open
Conversation
o-murphy
force-pushed
the
feat/font_providers
branch
from
July 17, 2026 20:53
cb63a2e to
f1cecd1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a plugin system that lets third-party packages register extra iconic fonts with qtawesome, without needing changes on the qtawesome side.
qtawesome/__init__.py:_get_external_fonts()discovers packages that expose an entry point in theqtawesome.font_providersgroup (viaimportlib.metadata.entry_points), calls each one, and loads the returned fonts alongside the bundled ones. Falls back to the pre-3.10entry_points()API for Python 3.9 compatibility.font_provider_template/: reference implementation showing how to build a provider package - entry point registration inpyproject.toml, aget_fonts()callable returning(prefix, ttf_filename, charmap_filename, directory)tuples, and a working example bundling the Simple Icons font (siprefix) under its own CC0 1.0 license, separate from the template's MIT license.Note: this is a proposal for the concept. The project's main documentation has not been updated yet - it will only be updated once the approach is agreed upon, to avoid documenting an API that might still change during review.
font_provider_template/currently lives inside this repo for review convenience; once the concept is agreed upon, it could be moved out to its own repository (or a dedicated branch) so that anyone wanting to build a font provider can start from it directly, without cloning qtawesome itself.Test plan
Relative to: #310