acolgecen opened a new issue, #30901:
URL: https://github.com/apache/superset/issues/30901

   ### Bug description
   
   I'm experiencing issues with applying custom fonts to the Superset UI using 
THEME_OVERRIDES in the `superset_config.py` file. The configuration settings 
seem to be recognized, as other aspects of the theme (such as colors and border 
radius) apply successfully. However, custom fonts (e.g., Roboto from Google 
Fonts or a local URL) do not render in the UI.
   
   Steps to Reproduce:
   **1. Add the following configuration to superset_config.py to enable custom 
theming:**
   
   ```
   ENABLE_CSS = True
   CUSTOM_CSS = True
   
   THEME_OVERRIDES = {
       "typography": {
           "families": {
               "sansSerif": "Roboto, sans-serif",
               "monospace": "Roboto, monospace"
           },
           "weights": {
               "normal": 400,
               "bold": 700
           }
       },
       "importFonts": [
           
"https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap";
       ],
       "css": [
           """
           @font-face {
               font-family: 'Roboto';
               src: 
url('https://fonts.googleapis.com/css2?family=Roboto:wght@700&display=swap') 
format('woff2');
               font-weight: 700;
               font-style: normal;
           }
           body, .ant-typography, .ant-typography-title, 
.ant-typography-paragraph { 
               font-family: 'Roboto', sans-serif !important; 
           }
           """
       ]
   }
   ```
   **2. Restart Superset.**
   
   **3. Perform a hard refresh in the browser to clear cache.**
   
   **4. Inspect the UI text elements (using browser Developer Tools) to verify 
if Roboto is applied.**
   
   
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   3.10
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [X] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [X] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [X] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to