dosubot[bot] commented on issue #37096:
URL: https://github.com/apache/superset/issues/37096#issuecomment-3743772188

   <!-- Greeting -->
   Hi @martinburch! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the 
superset team.
   
   <!-- Answer -->
   Including a generic `sans-serif` fallback in your font stack is important 
because, if none of the specified fonts are available, browsers like Firefox 
will otherwise default to a serif font—leading to inconsistent visuals in 
reports and screenshots.
   
   Superset now manages font stacks through theme configuration, not in 
`config.py`. The recommended approach is to update your theme’s `fontFamily` 
token to include `sans-serif` as the last fallback. For example:
   
   ```json
   {
     "token": {
       "fontFamily": "Inter, Helvetica, Arial, sans-serif"
     }
   }
   ```
   or, for broader compatibility:
   ```json
   {
     "token": {
       "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, sans-serif"
     }
   }
   ```
   If you’re using Superset 6.0 or later, custom fonts are loaded per-theme 
using the `fontUrls` token in your theme config, and the old `CUSTOM_FONT_URLS` 
setting is deprecated. Make sure your `fontFamily` always ends with 
`sans-serif` to avoid fallback to serif fonts when the preferred fonts aren’t 
available. See the [theming documentation and recent 
PRs](https://github.com/apache/superset/pull/34416) for more details and 
examples.
   
   If you still see serif fonts, double-check your theme’s `fontFamily` setting 
and ensure `sans-serif` is included at the end of the stack.
   
   
   <!-- 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/bac2fc76-f8e3-4273-90fe-da28341a1468?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/bac2fc76-f8e3-4273-90fe-da28341a1468?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/bac2fc76-f8e3-4273-90fe-da28341a1468?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/bac2fc76-f8e3-4273-90fe-da28341a1468?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/bac2fc76-f8e3-4273-90fe-da28341a1468?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/bac2fc76-f8e3-4273-90fe-da28341a1468?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/bac2fc76-f8e3-4273-90fe-da28341a1468?feedback_type=other)</sup>
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Including%20a%20generic%20%60sans-serif%60%20fallback%20in%20your%20font%20stack%20is%20important%20because%2C%20if%20none%20of%20the%20specified%20fonts%20are%20available%2C%20browsers%20like%20Firefox%20will%20otherwise%20default%20to%20a%20serif%20font%E2%80%94leading%20to%20inconsistent%20visuals%20in%20reports%20and%20screenshots.%0A%0ASuperset%20now%20manages%20font%20stacks%20through%20theme%20configuration%2C%20not%20in%20%60config.py%60.%20The%20recommended%20approach%20is%20to%20update%20your%20theme%E2%80%99s%20%60fontFamily%60%20token%20to%20include%20%60sans-serif%60%20as%20the%20last%20fallback.%20For%20example%3A%0A%0A%60%60%60json%0A%7B%0A%20%20%22token%22%3A%20%7B%0A%20%20%20%20%22fontFamily%22%3A%20%22Inter%2C%20Helvetica%2C%20Ari
 
al%2C%20sans-serif%22%0A%20%20%7D%0A%7D%0A%60%60%60%0Aor%2C%20for%20broader%20compatibility%3A%0A%60%60%60json%0A%7B%0A%20%20%22token%22%3A%20%7B%0A%20%20%20%20%22fontFamily%22%3A%20%22Inter%2C%20-apple-system%2C%20BlinkMacSystemFont%2C%20sans-serif%22%0A%20%20%7D%0A%7D%0A%60%60%60%0AIf%20you%E2%80%99re%20using%20Superset%206.0%20or%20later%2C%20custom%20fonts%20are%20loaded%20per-theme%20using%20the%20%60fontUrls%60%20token%20in%20your%20theme%20config%2C%20and%20the%20old%20%60CUSTOM_FONT_URLS%60%20setting%20is%20deprecated.%20Make%20sure%20your%20%60fontFamily%60%20always%20ends%20with%20%60sans-serif%60%20to%20avoid%20fallback%20to%20serif%20fonts%20when%20the%20preferred%20fonts%20aren%E2%80%99t%20available.%20See%20the%20%5Btheming%20documentation%20and%20recent%20PRs%5D%28https%3A//github.com/apache/superset/pull/34416%29%20for%20more%20details%20and%20examples.%0A%0AIf%20you%20still%20see%20serif%20fonts%2C%20double-check%20your%20theme%E2%80%99s%20%60fontFamily%60%20setting
 
%20and%20ensure%20%60sans-serif%60%20is%20included%20at%20the%20end%20of%20the%20stack.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/37096)


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