Skip to content

fix(xlsx): draw icon-set arrows as Excel's filled shapes#457

Merged
developer0hye merged 1 commit into
mainfrom
fix/xlsx-icon-set-glyphs
Jul 25, 2026
Merged

fix(xlsx): draw icon-set arrows as Excel's filled shapes#457
developer0hye merged 1 commit into
mainfrom
fix/xlsx-icon-set-glyphs

Conversation

@developer0hye

@developer0hye developer0hye commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Draw XLSX icon-set arrows as Excel's filled shapes — a shaft with a triangular head, in the band color with a darker outline — instead of triangle characters roughly a third their size.
  • Diagonal arrows are the same shape rotated 45 degrees.
  • Icon sets that are not arrows (traffic lights, flags, symbols) keep their character rendering.
  • The arrow codepoints moved into the IR so the parser and renderer share one vocabulary for TableCell::icon_text.

Related issue

Fixes #377

Testing

  • cargo test --workspace (1823 tests, all pass)
  • cargo clippy --workspace --all-targets (clean)
  • cargo fmt --check
  • pdftoppm -r 150 on 10_kpi_tracker_en page 1 for all three PDFs
  • Matched-region crops of the Achievement column at 280% scale
  • magick compare -metric AE -fuzz 5% on the size-normalized page

Visual impact

  • No rendered PDF change
  • Rendered PDF change or visual evidence added
  • Reason:

Visual audit

  • Issue: XLSX: icon set glyphs render thin text arrows instead of Excel's solid icons #377
  • Fixture: tests/golden_mocks/business/sources/xlsx/10_kpi_tracker_en.xlsx
  • Page(s): 1
  • Renderer and DPI: pdftoppm, 150 DPI
  • Evidence mode: fix
  • New follow-up issues found in this audit: None
  • GT: assets/bugfixes/issue-377/gt.jpg
  • Before: assets/bugfixes/issue-377/before.jpg
  • After: assets/bugfixes/issue-377/after.jpg
  • Compare: assets/bugfixes/issue-377/compare.jpg

Visual comparison

GT Before After
GT Before After

Required inspection

  • Rendered all evidence at 150 DPI or higher
  • Stored progressive JPEG quality 86 assets with metadata stripped
  • Inspected matched region crops at full resolution
  • Ran the 5% fuzz pixel-difference sweep
  • Inventoried hairlines and border dash styles
  • Inventoried font weight, italic, and underline emphasis

Deviation audit

Check Result
Page count/order Matches GT: one page
Element presence Matches GT: every icon, value, and header cell is present
Position/size Fixed: arrows now fill the row the way Excel's icons do instead of rendering at a third the size
Rotation/flip Matches GT: up, right, and down bands point the way Excel draws them
Fill Fixed: arrows are filled in the band color with a darker outline
Stroke/border Matches GT: the cell grid rules are present at matching positions
Text content Matches GT
Font family/weight/style Matches GT
Text color Matches GT: the red 84% value keeps its conditional font color
Alignment Matches GT: icons stay at the cell's left edge with the value on the same line
Line/paragraph spacing Matches GT: the row tracks are unchanged
Clipping/overflow No deviation observed

Checklist

  • Commits include a Signed-off-by line
  • PR scope contains one root cause
  • Remaining visual deviations each reference an open issue

@developer0hye
developer0hye force-pushed the fix/xlsx-icon-set-glyphs branch from 6f1aa7c to 476cb44 Compare July 25, 2026 10:16
Excel's arrow icon sets are drawn shapes, not characters: a shaft with a
triangular head, filled in the band color and outlined a shade darker,
about 10 pt tall in a 14 pt row. office2pdf rendered them as triangle
characters roughly a third that size.

Draw the five arrow bands as Typst polygons at Excel's proportions, with
the diagonals rotated 45 degrees. Icon sets that are not arrows — traffic
lights, flags, symbols — keep their character rendering. The arrow
codepoints move to the IR so the parser and renderer share one vocabulary
for the glyph field.

Fixes #377

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
@developer0hye
developer0hye force-pushed the fix/xlsx-icon-set-glyphs branch from 476cb44 to 464bc0b Compare July 25, 2026 10:52
@developer0hye
developer0hye merged commit e3b8fe4 into main Jul 25, 2026
33 checks passed
@developer0hye
developer0hye deleted the fix/xlsx-icon-set-glyphs branch July 25, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

XLSX: icon set glyphs render thin text arrows instead of Excel's solid icons

1 participant