Skip to content

XLSX: unstyled cells lose the workbook Normal font #462

Description

@developer0hye

Summary

An unstyled XLSX cell using the workbook's Normal font renders with the Typst serif default instead of the spreadsheet's sans-serif font.

Found while re-auditing the regression fixture in #434 at 150 DPI against a native Microsoft Excel export.

Reproduction

Convert tests/fixtures/xlsx/theme_color_drawing.xlsx from PR #434 and compare it with a native Excel PDF. Cell A1 contains Theme color drawing demo and has no explicit s attribute, so it uses the workbook's default cell style.

In this Excel-saved fixture, the first styles.xml font is 맑은 고딕, family 2, scheme minor. The theme's minor Latin font is Calibri. Both are sans-serif.

Expected

The A1 title uses the workbook Normal font, or a metric-compatible sans-serif fallback.

Actual

The title renders in a serif face. Its text, color, regular weight, and page position are otherwise present.

Root-cause evidence

The XLSX style path deliberately drops Calibri as a default by returning font_family: None, which hands font selection to Typst's serif default. This fixture also demonstrates that an unstyled cell does not reliably carry the workbook's first font through to the IR.

Visual checklist

  • Text content/color/weight/style: preserved.
  • Font family and resulting glyph metrics: incorrect.
  • Shape-label theme inheritance is tracked separately because it uses the DrawingML parser.
  • Page count, drawing position/size, and fills are independent findings.

Related: #329, #430, #434

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions