From cd7a81a4af77f884ba12421dc67fb48f404c7e0a Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sun, 27 Sep 2026 23:56:40 +0900 Subject: [PATCH] =?UTF-8?q?fix(spreadsheet):=20=EB=8F=84=EA=B5=AC=20?= =?UTF-8?q?=EB=AA=A8=EC=9D=8C=20=EA=B8=80=EA=BC=B4=C2=B7=ED=81=AC=EA=B8=B0?= =?UTF-8?q?=20=EB=B9=88=EC=B9=B8=20=E2=80=94=20=EA=B8=B0=EB=B3=B8=EA=B0=92?= =?UTF-8?q?=20=ED=9D=90=EB=A6=AC=EA=B2=8C=20=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 칸·행·열·시트 기본 어디에도 글꼴·크기가 없으면 통합문서 기본 → 앱 기본(굴림·10, 격자 fontCss 와 같은 값)을 value 대신 placeholder 로 보여 흐리게(기본값임을 표시) - 직접 지정하면 다시 실값으로 - ORCA 실 엔진 확인 — 굵게만 있는 칸·아무 서식 없는 칸 모두 글꼴 placeholder "굴림"·크기 placeholder "10" 표시, 글꼴 Arial·크기 14 로 지정하면 value 로 바뀌고 placeholder 비워짐 Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01AeeQRLknEpP4SFjVkjDWDs --- A00_Common/spreadsheet/spreadsheet_toolbar.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/A00_Common/spreadsheet/spreadsheet_toolbar.ts b/A00_Common/spreadsheet/spreadsheet_toolbar.ts index 21d20b15..e5ffd09c 100644 --- a/A00_Common/spreadsheet/spreadsheet_toolbar.ts +++ b/A00_Common/spreadsheet/spreadsheet_toolbar.ts @@ -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.밑줄);