fix(spreadsheet): 도구 모음 글꼴·크기 빈칸 — 기본값 흐리게 표시

- 칸·행·열·시트 기본 어디에도 글꼴·크기가 없으면 통합문서 기본 → 앱 기본(굴림·10, 격자
  fontCss 와 같은 값)을 value 대신 placeholder 로 보여 흐리게(기본값임을 표시)
- 직접 지정하면 다시 실값으로
- ORCA 실 엔진 확인 — 굵게만 있는 칸·아무 서식 없는 칸 모두 글꼴 placeholder "굴림"·크기
  placeholder "10" 표시, 글꼴 Arial·크기 14 로 지정하면 value 로 바뀌고 placeholder 비워짐

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeeQRLknEpP4SFjVkjDWDs
This commit is contained in:
2026-09-27 23:56:40 +09:00
co-authored by Claude Sonnet 5
parent ede12fbc0e
commit cd7a81a4af
@@ -21,6 +21,11 @@ import "./spreadsheet_toolbar.css";
type Side = "위" | "아래" | "왼" | "오른";
type BorderPreset = "none" | "all" | "outer" | "top" | "bottom" | "left" | "right";
/** 앱 기본 글꼴 · 크기 — `spreadsheet_grid.ts`(C) 의 `fontCss` 가 쓰는 기본과 같은 값(거울) ·
* 칸 · 행 · 열 · 시트 기본 어디에도 없을 때 이 값을 흐리게(placeholder) 보임. */
const APP_DEFAULT_FONT = "굴림";
const APP_DEFAULT_SIZE = 10;
const FONTS = [
"굴림",
"굴림체",
@@ -344,7 +349,10 @@ export function mountToolbar(ctx: SpreadsheetContext): PartHandle {
const { r, c } = ctx.selection.활성;
const style = styleAt(ctx, r, c);
fontInput.value = style.글꼴 ?? "";
fontInput.placeholder = style.글꼴 ? "" : (ctx.book.기본?.글꼴 ?? APP_DEFAULT_FONT);
sizeInput.value = style.크기 != null ? String(style.크기) : "";
sizeInput.placeholder =
style.크기 != null ? "" : String(ctx.book.기본?.크기 ?? APP_DEFAULT_SIZE);
boldBtn.classList.toggle("is-on", !!style.굵게);
italicBtn.classList.toggle("is-on", !!style.기울임);
underlineBtn.classList.toggle("is-on", !!style.밑줄);