Dataface Tasks

Implement Inter as primary sans in Dataface charts

IDGRAPH_LIBRARY-IMPLEMENT_INTER_AS_PRIMARY_SANS_IN_DATAFACE_CHARTS
Statuscompleted
Priorityp1
Milestonem1-ft-analytics-analyst-pilot
Ownerdata-viz-designer-engineer
Completed byrj
Completed2026-03-23

Problem

Apply Inter as the primary sans-serif typeface for Dataface chart and data-dense UI surfaces, including numeric defaults, fallback behavior, and render/export consistency.

Context

  • Dataface has chosen Inter as its primary sans-serif typeface for UI and chart surfaces.
  • The rationale is documented in ai_notes/considerations/INTER_AS_PRIMARY_SANS.md.
  • The implementation target is: Inter everywhere unless a theme intentionally opts out.
  • Opinionated themes and structures should not be rewritten just to force Inter.
  • Relevant implementation seams already exist:
  • dataface/core/render/chart/presentation.py centralizes chart font family access.
  • dataface/core/compile/chart_defaults.yml carries Vega/Vega-Lite font defaults.
  • dataface/core/render/chart/kpi.py, spark_bar.py, and table.py consume the shared chart font family.
  • dataface/core/render/templates/controls/_styles.css already uses font-variant-numeric: tabular-nums for some control surfaces.
  • Rendering/export compatibility matters:
  • Vega/Vega-Lite charts render through vl-convert.
  • SVG-to-PNG/PDF export uses svglib and reportlab.
  • This task should implement the product default, not just document the decision.
  • Numeric policy for this task:
  • Use tabular-nums lining-nums for most numeric chart/UI surfaces, especially tables, accounting layouts, numeric controls, multi-value tooltips, axes, tick labels, numeric legends, timestamps, metadata rows, and other dense numeric displays.
  • Keep KPIs as proportional lining numerals by default because they are usually standalone display values rather than vertically aligned numeric columns.
  • Narrative numbers in prose and annotation can remain proportional unless alignment pressure makes tabular figures clearly better.

Possible Solutions

  • Recommended: Set Inter as the default sans-serif family through the shared chart/style configuration, vendor/register the font centrally for renderers, and tighten numeric defaults where aligned values need tabular figures. Trade-offs: delivers the chosen visual language through the main rendering path and keeps typographic behavior centralized, but requires careful validation across SVG, HTML, and export surfaces.
  • Change only a few visible templates or CSS files without updating shared defaults. Trade-offs: faster initially, but risks inconsistent typography between chart internals, KPI/table renderers, and exported outputs.
  • Leave global defaults untouched and require explicit per-face font overrides. Trade-offs: lowest implementation risk, but defeats the goal of a coherent product-level type system.

Plan

  • Audit the current default font-family path across chart config, render helpers, and exported surfaces.
  • Update shared defaults so Inter becomes the default sans-serif family for chart and data-dense UI surfaces unless a theme intentionally sets its own font choices.
  • Vendor/register Inter so the render pipeline can resolve it consistently.
  • Apply the numeric policy for this task:
  • tabular lining numerals for most numeric chart/UI surfaces
  • proportional lining numerals for KPIs by default
  • Verify the change in rendered examples and exports so Inter appears consistently without breaking fallback behavior.
  • Confirm rendering behavior across SVG, HTML, PNG, and PDF paths.
  • Document any remaining follow-ups separately if broader typography controls are still needed.

Implementation Progress

  • Task created after the primary sans-serif decision was completed.
  • Initial codebase scan found the main font-family integration points in compile defaults, chart presentation helpers, render templates, and converter paths.
  • Numeric direction is now explicitly defined: broad tabular usage for dense numeric surfaces, but KPI displays remain proportional by default.
  • Vendored InterVariable.ttf under the render package so chart/export code does not depend on host-installed fonts.
  • Switched shared default typography config from Liberation Sans to Inter in both default_config.yml and chart_defaults.yml.
  • Added central font registration for vl-convert and moved SVG-to-PNG/PDF export onto vl-convert so SVG, Vega, PNG, and PDF all share the same font-aware conversion path.
  • Updated remaining hardcoded system-font render paths in HTML wrapper, variable controls, placeholder overlays, chart tooltips, timestamps, and spark/table numeric surfaces.
  • Added focused tests covering default config, rendered SVG/HTML output, tooltip and placeholder font pickup, and Inter-backed SVG export to PNG/PDF.

QA Exploration

  • Visual review completed on rendered example faces via the local Dataface server:
  • /faces/sales_dashboard
  • /faces/product_performance
  • /faces/customer_analytics
  • /faces/general/analytics-dashboard
  • Visual check outcome: approved; Inter looked satisfactory across charts, tables, controls, and supporting UI text.
  • [x] QA exploration completed (or N/A for non-UI tasks)

Review Feedback

  • [ ] Review cleared