Skip to content

fix(chartcuterie): Use Rubik font for rendered charts#118104

Draft
DominikB2014 wants to merge 1 commit into
masterfrom
dominikbuszowiecki/dain-1710-chartcuterie-uses-incorrect-chart-fonts
Draft

fix(chartcuterie): Use Rubik font for rendered charts#118104
DominikB2014 wants to merge 1 commit into
masterfrom
dominikbuszowiecki/dain-1710-chartcuterie-uses-incorrect-chart-fonts

Conversation

@DominikB2014

Copy link
Copy Markdown
Contributor

Summary

Chartcuterie-rendered charts (Slack unfurls, etc.) use sans-serif instead of Rubik, so they don't match the Sentry UI.

DEFAULT_FONT_FAMILY was hardcoded to 'sans-serif' as a temporary workaround in #31554 (2022), back when the chartcuterie service wasn't loading fonts correctly. The service now registers Rubik with node-canvas (registerCanvasFonts in getsentry/chartcuterie, src/utils.ts, called at startup in src/render.ts), so every config has been overriding an already-available Rubik back to the built-in fallback.

Changes

  • slack.tsx: DEFAULT_FONT_FAMILY'Rubik'. Flows into timeseries, discover, performance, and all axis/legend labels.
  • Added FALLBACK_FONT_FAMILY = 'sans-serif' for the metric alert/detector incident marker labels that intentionally avoid Rubik — their behavior is unchanged.

Notes

  • The Rubik bundled with the chartcuterie service is Latin-only (rubik-regular.woff / rubik-medium.woff). Non-Latin glyphs in labels fall back per-glyph to node-canvas's default — strictly no worse than today's all-sans-serif rendering, and likely the original reason the incident marker labels were pinned off Rubik.
  • No deploy-ordering hazard: the font is already deployed service-side; this only takes effect once the new config bundle (versioned by COMMIT_SHA) rolls out.

Fixes DAIN-1710

DEFAULT_FONT_FAMILY was hardcoded to 'sans-serif' as a temporary
workaround in #31554 (2022) because the chartcuterie service wasn't
loading fonts correctly at the time. The service now registers Rubik
with node-canvas (registerCanvasFonts in getsentry/chartcuterie), so
every chart was overriding an already-available Rubik back to the
built-in fallback.

Switch DEFAULT_FONT_FAMILY to 'Rubik' so timeseries, discover,
performance, and all axis/legend labels render with the same typeface
as the Sentry UI. Add an explicit FALLBACK_FONT_FAMILY for the metric
alert/detector incident marker labels that intentionally avoid Rubik,
preserving their current behavior.

Fixes DAIN-1710
@linear-code

linear-code Bot commented Jun 19, 2026

Copy link
Copy Markdown

DAIN-1710

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant