Skip to content

feat(sheets): support font_family in cell styles#1549

Open
zhengzhijiej-tech wants to merge 1 commit into
feat/lark-sheets-developfrom
feat/sheets-font-family
Open

feat(sheets): support font_family in cell styles#1549
zhengzhijiej-tech wants to merge 1 commit into
feat/lark-sheets-developfrom
feat/sheets-font-family

Conversation

@zhengzhijiej-tech

Copy link
Copy Markdown
Collaborator

What

Add a font_family field to cell_styles so a cell's font name (e.g. Arial, Microsoft YaHei) can be set and read back. Until now cell_styles supported font size / weight / style / color / line but not the font family itself.

Coverage

font_family flows through every entry point that sets a cell style:

  • +cells-set (--cells JSON) — passes through to set_cell_range
  • +cells-set-style / +cells-batch-set-style — new --font-family flat flag
  • +workbook-create / +table-put (--styles) — font_family allowed in cell_styles
  • +cells-get returns font_family

Changes

  • shortcuts/sheets/helpers.go: buildCellStyleFromFlags reads the --font-family flag
  • shortcuts/sheets/lark_sheet_workbook.go: allow font_family in the --styles cell_styles field whitelist
  • shortcuts/sheets/data/{flag-defs,flag-schemas}.json + skills/lark-sheets/references/*: synced from the spec (font_family in schema + docs)
  • flag_defs_gen.go: regenerated

The backend (set_cell_range / get_cell_ranges) reads/writes the font name on the in-memory style model; this PR is the CLI surface.

Test

  • go test ./shortcuts/sheets/... green
  • End-to-end on PPE: set via all three CLI paths + read back via +cells-get, font_family round-trips (English and CJK font names).

Add a font_family field to cell_styles so a cell's font name can be set
and read back through every style entry point:

- +cells-set (--cells JSON) and +cells-set-style / +cells-batch-set-style
  gain a font_family field / --font-family flat flag
- +workbook-create / +table-put --styles accept font_family in cell_styles
- +cells-get returns font_family

helpers.go buildCellStyleFromFlags reads the --font-family flag;
lark_sheet_workbook.go allows font_family in the --styles cell_styles
whitelist; data/ + skills/ are synced from sheet-skill-spec.
@github-actions github-actions Bot added domain/ccm PR touches the ccm domain size/L Large or sensitive change across domains or core paths labels Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/ccm PR touches the ccm domain size/L Large or sensitive change across domains or core paths

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant