GitHub user VasilijeBursac added a comment to the discussion: Recommended 
approach to add custom fonts with the new theming system and frontend structure

@mistercrunch Thank you for this amazing work! It’s a very useful feature, and 
I really appreciate the flexibility it provides.

I've been experimenting with custom fonts and successfully tested using Google 
Fonts. I have a few follow-up questions related to the self-hosted font setup 
and best practices for integration:

### 1. Self-hosted fonts setup

**The documentation states:**
> "Self-hosted: Place font files in /static/assets/fonts/ and reference via 
> CSS. This feature works with the stock Docker image - no custom build 
> required!"

Could you please provide a minimal working example of this setup? Specifically:
- What is the recommended CSS entry point for loading the font in a generic and 
upgrade-safe way (i.e., without maintaining custom frontend code)?
- Can a separate CSS file be created to handle font declarations, and then be 
loaded via `superset_config.py`?

### 2. Required font weights

What font weights need to be included to completely replace all Superset UI 
fonts (including the code editor)?
Are the weights imported in 
[GlobalStyles.tsx](https://github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-core/src/theme/GlobalStyles.tsx#L22-L28)
 sufficient? From what I saw, these are:
- 200, 400, 500, 600 for general UI elements
- 400, 500, 600 for the code editor fonts

### 3. Support for variable fonts
Does Superset currently support variable fonts? If so, are there any known 
limitations or considerations when using them?

Thanks again for your time and support!

Best regards,

GitHub link: 
https://github.com/apache/superset/discussions/34397#discussioncomment-14608996

----
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]

Reply via email to