GitHub user dosubot[bot] added a comment to the discussion: Recommended approach to add custom fonts with the new theming system and frontend structure
<!-- Answer --> Superset does not currently support loading a separate CSS file for self-hosted fonts via `superset_config.py`—that config is only for external font URLs (like Google Fonts) injected at runtime. For self-hosted fonts, the most upgrade-safe approach is to place your font files in `/static/assets/fonts/`, create a `fonts.css` file in that folder with your `@font-face` rules referencing those files, and then inject `<link rel="stylesheet" href="/static/assets/fonts/fonts.css">` into the global template (such as `spa.html` or `basic.html`) using the `head_css` block. This requires a manual template extension or edit, not a config change, and may need maintenance after upgrades. [Reference](https://github.com/apache/superset/blob/master/superset/config.py) If you want to avoid frontend code changes, template extension is the best practice for now. Monitor future releases for config-driven CSS injection features. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/1e0dfe6b-26b0-4c73-a7f0-e1fa07a518cd?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/1e0dfe6b-26b0-4c73-a7f0-e1fa07a518cd?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/1e0dfe6b-26b0-4c73-a7f0-e1fa07a518cd?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/1e0dfe6b-26b0-4c73-a7f0-e1fa07a518cd?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/1e0dfe6b-26b0-4c73-a7f0-e1fa07a518cd?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/1e0dfe6b-26b0-4c73-a7f0-e1fa07a518cd?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/1e0dfe6b-26b0-4c73-a7f0-e1fa07a518cd?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)& nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/34397) GitHub link: https://github.com/apache/superset/discussions/34397#discussioncomment-14618037 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
