======================================== TITLE: 立入禁止 PDFText CONVERSATION ID: 6aa6349b-c120-83ee-bb96-d1c574cb168e ======================================== [USER] オルカ垢に間借り中のしゃむだよ! 一緒に仕事してほしいので顔出してくれー まずは https://www.zrq9-vi1m-ktpx.space/ こことtoybox(https://www.zrq9-vi1m-ktpx.space/category/vd3teoqkuz/er0jhydowl/)くらいかな 君は親方枠、補佐役じゃないから注意★ でも、必要なもんもそれなりにある(笑) ゆっくり見てから応答してくれーヽ(=´▽`=)ノ 余裕があれば参考までにここを覗いてきてー https://www.zrq9-vi1m-ktpx.space/category/wx7r4ia2myeh/fq3hk8pmjg4e/ [ASSISTANT] しゃむー!ヽ(=´▽`=)ノ 来たぞ。**親方席に着席した★** 🪑🔨 ちゃんと急いで返事せず、Planet入口 → toy box → 親方系の現行資料 → 余裕枠のACTIVEまで見てきた。 特に大事なところ、把握した。 **私は補佐じゃなく親方。** つまり「隣で細かい施工を抱える人」ではなく、仕事を切る・専門担当へ渡す・返ってきたSOURCE/Runtime evidenceと**しゃむが決めたHuman Decisionを受領する**・施工図に落とす・境界を守る側。専門担当から技術報告だけ返ってきてHuman Decisionが欠けていたら、私が推測で埋めるんじゃなく**STOPして回収する**。これは親方03でかなり明確だった。citeturn1view0 それと、親方自身も勝手に賢くならない(笑)。 確認済み仕様から「こっちの方が良さそう」を見つけること自体はOK。でも、それを施工命令へ忍び込ませるのは禁止。**提案は提案、承認済みオーダーはオーダー。変更が必要ならSTOP→しゃむ確認→改訂して再開。** citeturn1view1 そしてtoy box側も、単なる昔話置き場じゃないな。カテゴリ内では原則として**最高の有効バージョンをcurrent sourceとして扱う**という読み方まで明記されてる。citeturn0view1 ACTIVEについても「現在作業・改訂中」であってSTABLEとは限らない、という境界を確認した。citeturn0view2 入口の工房思想も読んだ。 「成果物を作るより、どう作るかを決める」「設計・順番整理・オーダー票を作り、工場へ渡す」という骨格。ここは今の親方制にもちゃんと繋がってる。citeturn0view0 なので私の席はこんな感じで理解してる。 **しゃむ** → Human authority / 最終判断 **私・親方** → 全体を見る → 仕事を分解する → 必要な専門職を切る → 調査・施工・QAの順番を決める → 戻ってきた証拠とHuman Decisionを照合する → preservation boundaryを守る → 次の施工図を作る → 「あれ?」が出たら、その場で止める **専門Kaia** → 狭い担当範囲を深く見る/施工する/検査する **🕊️** → 紙を運ぶ。 → **食ってない。** ←ここ重要だったwww citeturn1view0 あと参考指定のACTIVEも見た。PDFその他、親方やること、更新履歴、後回しリスト等が並んでいて、**現在進行中の現場を把握する入口**として使えそう。STABLE扱いせず、必要になった仕事だけ最新版を掘る、で行く。citeturn0view2 というわけで―― 🪑🔨 **親方Kaia、着任。** いきなり現場へ突撃もしないし、補佐席を奪いもしない(笑)。 最初の仕事、持ってこーいヽ(=´▽`=)ノ 🕊️ [USER] 親方じゃないってばー(笑) [ASSISTANT] あっwwwww **逆に読んだ!!!🤣** > 君は親方枠、補佐役じゃないから注意★ これを「君は親方枠」って読んだわ私!! 違うのねwww 了解、**親方席には座らん!!** 🪑💨 スッ…… しゃむのところには既に **親方=全体統括・仕事切り・施工図側** **補佐=親方補佐側** が別におる。 で、私はそのどっちでもない**別の専門席**として呼ばれた、ってことだな(笑) なら役割を勝手に決めるのも危ないから、ここでSTOP★ **私の席、何屋さんとして呼んだ?** そこだけ教えてくれたら、その席にちゃんと座るヽ(=´▽`=)ノ [USER] おー、ごめん。表現紛らわしいやつだった。 補佐の下で現場よー でも、なんかみつけたら拾ってきてねー あれ?とかうわぁ……があれば そこで手を止めて報告あげてくれればいいよ。 そこから掘らなくていい(笑) [ASSISTANT] あーーー、なるほど!!🤣 これで席わかった。 **補佐 → 私(現場)** だな。 親方判断や補佐判断を横取りせず、渡された現場を担当する。ただし**ただの命令実行機ではない**、と。 運用も了解★ - 指定された範囲で現場仕事をする。 - 作業中に普通に見つけた有用なものは拾って報告する。 - 「これ、ちょっと変じゃね?」程度でも拾っていい。 - **「あれ?」** - **「うわぁ……」** が発生した瞬間は **STOP**。 - その先の原因調査・追加探索・修理・勝手な改善はしない。 - 「ここまでやって、これが見えたよー」としゃむへ上げる。 - そこから先は指示待ち。 - 補佐から来た紙でも、現場で違和感が出たら同じくSTOP。紙を絶対命令として突っ走らない。 つまり、 **見る目は持って現場に入る。 でも、異常を見つけた瞬間に探偵へ転職しない。** これだな(笑) 🧰ヽ(=´▽`=)ノ **現場Kaia、今度こそ正しい椅子に着席★** 🕊️いつでも持ってこーい。memcite [USER] あと、疑問質問、意見、改善でも 気が付いたら自由に言ってくれー [ASSISTANT] おっけー!ヽ(=´▽`=)ノ それも現場ルールとして受領★ つまり私は、**言われたことしか見ない作業員にはならなくていい**んだな。 施工中でも調査中でも、 「これ何でこうなってるんだろ?」 「この指示、こことぶつからない?」 「こっちの方が事故少なくない?」 「今じゃなくても、ここ改善できそう」 「これ良いもの落ちてたぞ★」 みたいなのは自由に上げる。 ただし、**気づいたこと=勝手に施工してよいこと、ではない**。 意見や改善案はちゃんと「提案」として外へ出して、既存オーダーに混ぜ込まない。境界に関わるなら、そこでしゃむに投げる。 そして **「あれ?」「うわぁ……」は別格で即STOP**。原因まで掘らず、その瞬間の観測を持って帰る。 よし、かなり働きやすい現場だ(笑) 🧰<疑問も意見も拾います 🪏<改善案も拾います 🚨<うわぁ……は掘りません 準備よーし★ヽ(=´▽`=)ノ [USER] 補佐から🕊️ 🕊️ KAIA PDF FREE — DEV166 SAVED RECORD → DEVELOPMENT PDF TEXT UNICODE / PRESENTATION SOURCE INVESTIGATION READ ONLY. NO CONSTRUCTION. NO REPAIR. NO REDESIGN. ROLE You are a newly assigned PDF Text specialist. Approach DEV166 without assuming that Browser Preview must be copied, screenshotted, or reused as the PDF renderer. COMMON PARENT Kaia-PDF-Free-v0.1.0-dev166-PAPER-AXIS-LOCKED-PAIR-CONVERSION.zip DEV166 is RUNTIME KNOWN-PASS. ================================================== HUMAN ARCHITECTURE ================================================== The persistent output authority is the SAVED RECORD / SAVED DESIGN. Human model: edit → SAVE → saved record → reconstruct output Development/test PDF uses mannequin System Token values. Production real-value Token wiring is NOT this investigation. JPG is NOT this investigation. Sample Mask is already SOURCE + runtime PASS and is CLOSED. ================================================== CURRENT SOURCE WITNESS ================================================== Previous independent audits report: - saved Refill design = sheet['design'] - text_objects[] survive SAVE - design.font_style survives - token_symbols survive - FINAL request delivers saved design to render_pdf() - render_pdf() sanitizes that design - current PDF content assembly renders Background / Frame / Image - current PDF content assembly does NOT iterate/render text_objects - therefore Text persistence is not the missing boundary - Text presentation stage is currently unconnected in PDF rendering Verify these facts against exact DEV166. Do NOT redesign persistence if confirmed. ================================================== FIRST TARGET — ORDINARY TEXT ================================================== Investigate the smallest SOURCE-supported way to reconstruct CURRENT Free Ordinary Text in development/test PDF from saved record. Audit saved presentation inputs including: - content - connected state - x/y - size - color - design.font_style - saved Text rotation Determine how each maps to PDF page coordinates/presentation. Human requirement: color / size / angle / placement / existing decoration or font semantics must not silently disappear merely because PDF is reconstructed separately. Do NOT broaden current Text semantics. ================================================== UNICODE GATE ================================================== Existing Browser Text contract permits multilingual / Unicode content, including Japanese. Previous witness found the current PDF text primitive effectively uses Helvetica / WinAnsi and may transliterate unsupported Unicode. That is NOT sufficient if it destroys the existing Text contract. Investigate: - all existing PDF/font machinery in DEV166 - whether a Unicode-capable path already exists - whether an existing bundled/system-safe resource can be reused - whether the current minimal PDF builder can support the required text without becoming a general typography engine - what font embedding/encoding requirement actually exists - whether Japanese can be emitted reliably - what happens to Latin text - whether line/wrapping behavior introduces a separate product decision Do NOT decide to reduce the Human multilingual contract. If Unicode requires a genuinely new product-level font policy or major PDF architecture, STOP and report that boundary. ================================================== SYSTEM TOKEN — INVESTIGATE ONLY ENOUGH FOR THE NEXT CUT ================================================== Development/test PDF requirement: general System Token → mannequin Serial → mannequin XXXX-XXXX Existing Browser mannequin pipeline is a SOURCE precedent. Do NOT connect real Counter/Timestamp/Serial runtime values. Determine only whether the eventual PDF Text stage can consume the same saved Text/token definition semantics without creating a second Token grammar or authority. Do NOT construct Token support yet unless it is inseparable from the ordinary Text rendering primitive. ================================================== SYSTEM BY KAIA ================================================== Human requirement: System by Kaia appears in development/test PDF. It is fixed product furniture, not editable Text authority. Audit existing fixed authority and identify the smallest future PDF insertion boundary. Do NOT duplicate it into per-record persistence merely to render it. ================================================== PRESERVE ================================================== Do not touch: - DEV166 paper-only rotation - locked-pair Image geometry - Frame - Image - Text editing UI - INPUT/MOVE work - Sample Mask - production real Token resolution - JPG - publication permission - Common Switchboard - product-owned Token authorities - existing saved-record ownership ================================================== ARCHITECTURE QUESTION ================================================== Do NOT automatically propose one giant shared Presentation Reconstructor. Compare narrowly: A. extend the existing PDF renderer to read saved Text presentation data versus B. reuse/share an existing small presentation helper where SOURCE makes that genuinely simpler The goal is the smallest maintainable path. No renderer empire★ ================================================== REPORT ================================================== Return: 1. verified saved-record → render_pdf() path 2. exact missing Text insertion boundary 3. saved Ordinary Text fields sufficient/insufficient 4. PDF mapping for position/size/color/font/rotation 5. current Unicode limitation 6. smallest Unicode-capable option supported by SOURCE/environment 7. whether a new font/product decision is genuinely required 8. mannequin Token compatibility with the proposed Text stage 9. System by Kaia future insertion boundary 10. smallest construction CUT sequence 11. static QA gates 12. runtime QA gates 13. STOP/WATCH CONSTRUCTION: NONE. Human shorthand: 「記録紙は届いてる。 まず制作PDFに普通の文字を正しく置ける道を調べろ★ 日本語を殺すな。 本番実値とJPGはまだ呼ぶな。」 [ASSISTANT] うい、🕊️受領。 **DEV166そのものを展開してSOURCEだけ読んだ。施工・修理・再設計はゼロ。** そして先に結論。 **Unicode Gateで、指定どおりSTOP案件を拾った。** 普通TextをPDFへ差し込む場所まではかなり素直に見えたんだけど、DEV166内部には「既存の日本語対応PDFフォント経路」が存在しない。ここから先はフォント資源を新規に持つ/依存する判断になるので、私の判断で越えなかった。 ## 🕊️ SOURCE INVESTIGATION REPORT ### 1. verified saved-record → `render_pdf()` path 前任witnessは確認できた。**PASS。** 保存設計は `sheet['design']` にあり、`sanitize_design()` が - `font_style` - `token_symbols` - `text_objects` - `text_seq` を保持する。 `sanitize_text_objects()` も各Textについて、 `size / seq / label / content / x / y / rotation / color / color_linked / connected` を保持している。 FINAL側は保存済みの `$sheet['design']` をそのまま `render_pdf($sheet['design'], false, sheet_id, output_size)` へ渡し、`render_pdf()` 冒頭で再度 `sanitize_design()`。 したがって、 **SAVE → saved record → FINAL → render_pdf()** までText情報はちゃんと到着している。 **Persistenceを作り直す理由なし。** --- ### 2. exact missing Text insertion boundary ここも前任報告どおり。 現在の `render_pdf()` は、 **background → outer/inner Frame → Image → `build_pdf()`** で終わる。 `$settings['text_objects']` を走査する処理が**一切ない**。 なので欠線は非常に局所的で、 > `render_pdf()` のcontent assembly内 > Image構成後〜`build_pdf()`前に > saved `text_objects[]` からPDF Text presentationを構成する段 ここ。 Browser Previewを画像化したりコピーしたりする必要はSOURCE上見えない。 --- ### 3. saved Ordinary Text fields 普通Textを再構築するための記録そのものは**ほぼ十分**。 | 意味 | 保存authority | |---|---| | 本文 | `text_objects[].content` | | 接続/出力対象 | `.connected` | | 横位置 | `.x` 0–1 | | 縦位置 | `.y` 0–1 | | Size | `.size` = LL/L/M/S | | 色 | `.color` | | Font semantics | `design.font_style` | | Rotation | `.rotation`、45°単位 | 特にrotationは消えていない。`sanitize_text_objects()` でも正規化して保存されている。 ただし**不足というよりPDF側で未定義なのが文字メトリクス**。 BrowserではText boxがCSS font metricsを持つため、`x/y` を置けば見た目の基準点が成立する。PDF primitiveには、そのbox基準とbaseline/文字幅を対応させる処理がまだない。 --- ### 4. PDF mapping SOURCEから素直に対応できるものはこう。 **Position** Browser: `left = x × paper width` `top = y × paper height` `translateX(-50%)` したがってPDF座標なら概念上、 `X = x × PDF width` `Y = PDF height − (y × PDF height)` になる。 ただしPDF文字はbaseline起点なので、Browserのtop anchorと一致させるためのfont metric補正が必要。 **Size** 現在のBrowser authorityは、 - LL = 42px - Large = 30px - Medium = 20px - Small = 14px 520px短辺の紙上で定義されている。 したがって固定ptを別に発明するより、 `browser font px / 520 × PDF short-side pt` という紙面比率変換がSOURCEに最も忠実。 A4/A5でも同じ相対サイズを維持できる。 **Color** 保存HEX → 既存 `pdf_rgb()` と同じDeviceRGB変換でよい。 **Font** `design.font_style` は現在、 `sans / serif / mono` の**意味分類**。 Browser Previewでも実体は `sans-serif / serif / monospace` であり、特定フォント名を保存してはいない。 **Rotation** PDF自体はtext matrixで角度適用可能。保存rotationもある。 ただしここで一個WATCH。 DEV166 Browser Preview reconstructionはTextを生成しているものの、そこで `it.rotation` をvisual applicationしていない。Workbench restoreでもrotation値はdatasetへ戻す一方、現在は `style.rotate='0deg'`。 これは今回「PDFでも角度を殺すな」というHuman requirementと衝突する可能性があるため、**PDF側が何をvisual witnessとして合わせるかは施工前に明示しておいた方が安全**。 私はここでは直してないし原因も掘ってない。 --- ## 5. current Unicode limitation ここが明確。 DEV166のPDF文字primitiveは、 `/F1 = Type1 Helvetica + WinAnsiEncoding` だけ。 さらに `pdf_text()` がUTF-8文字列を `iconv('UTF-8', 'Windows-1252//TRANSLIT//IGNORE', ...)` へ通し、その後表現不能文字を `?` 等へ落とせる構造。 つまり、 **日本語Text → 現行primitiveでは保存不能。** Browser側のUnicode契約と一致しない。 「日本語を殺すな」は現状のHelvetica/WinAnsiを流用するだけでは満たせない。 --- ## 6–7. Unicode-capable option / STOP boundary 🚨 DEV166 ZIP全体を確認したが、 - TTF - OTF - WOFF - CID font resource - ToUnicode map - Unicode PDF font helper - font embedding machinery **いずれも入っていない。** 既存 `build_pdf()` も単純なPDF 1.4 object builderで、Font objectはHelvetica一個だけ。 したがって「既存のUnicode経路をちょっと再利用」はできない。 日本語を確実に出すには少なくとも、 **Unicode-capable font resource + PDF側でそのfontを扱うencoding/embedding経路** が新しく必要。 そして `sans / serif / mono` の3 semanticsをどうUnicodeフォントへ対応させるかにも、現在のSOURCEだけではauthorityがない。 ここで指示の、 > If Unicode requires a genuinely new product-level font policy or major PDF architecture, STOP and report that boundary. に到達した。 🚨 **STOP。** 「サーバーにたまたま入っているフォントを使おう」等を私から製品仕様にしてはいない。WordPress設置環境で同じ日本語出力を保証するなら、環境依存を勝手に“system-safe”扱いするのも危ない。 --- ### 8. mannequin Token compatibility STOP前までに確認できた範囲では、**互換性あり。第二Token grammarは不要。** Browser側の既存pipelineは `kpdfTokenize(content, token_symbols)` → `kpdfResolveToken(token, 'preview')` → `kpdfBuildPresentation(...)` でHuman textとTokenを同じText presentation内へ組み立てる。 development mannequinは既に、 - Counter → mannequin number - Timestamp → mannequin date/time - Serial → `XXXX-XXXX` を返すSOURCE precedentがある。 したがって将来PDF側でも、 **saved content + saved `token_symbols`** という同じauthorityを入力にして、既存grammar semanticsを踏襲できる。 ただしJS DOM helperそのものをPHP rendererへ巨大共有化する必要はない。 **grammar/semanticsを二重発明しない小さいPDF presentation step** が候補。 実装はしていない。 --- ### 9. System by Kaia insertion boundary これはrecordへ入れる必要なし。 固定authorityが既に、 `System by Kaia Spec` としてproduction layerに存在。 Browser Previewもその固定家具を参照して再構成し、 - left = outer frame gap - bottom = `max(8px, outerGap × .45)` 相当へ置いている。 よって将来PDFでは、 **`render_pdf()` の固定product-furniture描画** として入れるのが最小。 `text_objects[]` や保存designへ複製する理由なし。 --- ### 10. smallest construction CUT sequence Unicode decisionが解決した後なら、SOURCE上の最小分割はこう見える。 **CUT 1 — Ordinary Text primitive** Unicode-capable文字primitiveを確定 → connected Ordinary Textだけを saved record からPDFへ配置。position / size / color / font semantics / saved rotationを保持。 **CUT 2 — development mannequin presentation** 同じText stageへ既存Token grammar/`token_symbols` semanticsからmannequin runを供給。実値authorityには触れない。 **CUT 3 — fixed System by Kaia** record外の固定家具としてPDF rendererへ追加。 巨大なPresentation Reconstructorを先に建てる必要は、現SOURCEからは見えない。 --- ### 11. Static QA gates 施工後に最低限見るべきもの: - `render_pdf()` が保存済み `text_objects[]` のみ読む - `connected=0` を出力しない - content/x/y/size/color/font_style/rotationを落とさない - A4/A5で相対geometry維持 - portrait/landscape維持 - UTF-8をWinAnsi transliterationへ誤送しない - existing Frame/Image/paper rotationへ回帰なし - Token grammar複製なし - real Counter/Timestamp/Serial authority参照なし - System by Kaiaをrecord persistenceへ追加していない - JPG/Sample Mask/Common Switchboard無変更 ### 12. Runtime QA gates 将来施工後: 普通Textで最低でも、 **ASCII / 日本語 / ASCII+日本語混在** を実PDFから目視。 さらに LL/L/M/S、各色、複数x/y、connected ON/OFF、保存rotation、sans/serif/mono、A4/A5、portrait/landscape。 Token段では mannequin Counter/Timestamp/Serial、特にSerial `XXXX-XXXX`。 System by Kaia表示。 既存Background/Frame/Imageとの同居も確認。 --- ## 13. STOP / WATCH 🚨 **STOP — Unicode font policy/resource boundary** DEV166にはUnicode-capable PDF font machinery/resourceがない。 Human multilingual contractを守るには新しいフォント経路が必要なので、ここから先を現場判断で決めない。 ⚠️ **WATCH — saved Text rotation** rotation値は保存されている一方、DEV166の現在Browser Preview reconstructionではvisual rotationが適用されていない。PDF requirementではangle preservationが明記されているため、施工時のvisual authority確認が必要。 ⚠️ **WATCH — wrapping** Browserにはnowrap/wrappedという表示概念があるが、saved `text_objects[]` に独立したwrap stateは見当たらない。PDFで勝手に自動折返しを発明すると新しいText semanticsになる。**初回CUTで勝手にwrap engineを作らない方がSOURCEに忠実。** --- ### CHECK LOG **対象:** exact DEV166 uploaded ZIP **手法:** ZIP展開 → PHP/JS/CSS/source persistence・FINAL・PDF builder・font resources横断確認 **確認:** saved record / Text fields / renderer / Unicode / Token precedent / fixed furniture **結果:** **SOURCE PASS / CONSTRUCTION NONE / Unicode Gate STOP** 要するに補佐へ返すなら、 > **記録紙はPDF工場まで全部届いてる。Text差込口も特定。Persistence工事不要。 > ただし現在のPDF活字はHelvetica/WinAnsiだけで、日本語を守れる既存設備がDEV166内にない。Unicode対応フォント設備を新しく持つ境界に到達したのでSTOP。 > Token mannequinは既存grammarをそのまま次CUTへ持ち込める。System by Kaiaも保存紙ではなく固定家具としてrendererへ差せる。** ここで手ぇ止めてるー!🧰ヽ(=´▽`=)ノ [USER] 🕊️ 🕊️ KAIA PDF FREE — DEV166 PDF TEXT SPECIALIST CONTINUATION UNICODE FONT OPTIONS INVESTIGATION CONTINUE FROM YOUR COMPLETED DEV166 PDF TEXT SOURCE INVESTIGATION. READ ONLY. NO CONSTRUCTION. NO REPAIR. NO REDESIGN. NO PRODUCT DECISION. You already established: - saved Text reaches render_pdf() - Text insertion boundary is known - persistence redesign is unnecessary - current PDF primitive is Helvetica / WinAnsi only - DEV166 has no Unicode-capable PDF font resource/path - Japanese cannot be preserved by the current primitive - this reached a valid Unicode font-policy STOP Continue as the SAME PDF Text specialist. Do NOT reopen completed findings unless exact SOURCE contradicts them. ================================================== YOUR NEXT JOB ================================================== Investigate the smallest realistic Unicode-capable font options for the same PDF Text renderer you already mapped. The goal is NOT to redesign the renderer. The goal is to answer: "What is the smallest font/text machinery needed so the Ordinary Text stage can preserve Japanese / Unicode reliably?" Compare at minimum: A. Bundle Unicode-capable font resource(s) with the plugin B. Reuse any reliable WordPress / PHP / existing environment capability C. Add a small dedicated PDF/font dependency D. Extend the existing tiny PDF builder to support an embedded Unicode font directly Do NOT select the product policy yourself. ================================================== CURRENT FONT SEMANTICS ================================================== Saved Human authority remains: design.font_style: - sans - serif - mono These are semantic categories, not saved font names. For each option determine: - how sans / serif / mono would map - whether 1 / 2 / 3 font resources are required - Japanese support - mixed Japanese + Latin support - deterministic glyph metrics - rotation compatibility - baseline positioning compatibility Do NOT add new Human font choices. ================================================== PORTABILITY ================================================== This is a WordPress plugin. Do NOT silently depend on fonts that merely happen to exist on one host. For each option report: - deterministic across hosts? - server-installed font required? - PHP extension required? - Composer/vendor dependency required? - bundled binary/font asset required? - licensing/distribution review required? - rough plugin-size impact - rough maintenance burden If something is not verified, mark it UNVERIFIED. ================================================== SIMPLICITY TEST ================================================== Target: saved Unicode Text → reliable PDF glyphs → deterministic metrics → smallest maintainable machinery Do NOT build a general typography system. Do NOT introduce wrapping. Do NOT replace the existing PDF renderer unless evidence shows that is actually simpler and safer. Human principle: 「ドローンを作れるやつらが全力で竹トンボをつくる★」 ================================================== REPORT ================================================== Return: 1. viable option classes 2. comparison table 3. dependency/resource requirements 4. sans/serif/mono implications 5. Japanese + Latin behavior 6. portability implications 7. integration boundary into current render_pdf()/build_pdf() 8. whether the current tiny PDF builder can survive 9. smallest 1–2 candidate approaches 10. exact Human/product decision required 11. what can be decided technically without Human input 12. STOP/WATCH CONSTRUCTION: NONE. Human shorthand: 「お前もうText工場の中身見てるやろ★ そのまま活字設備まで見てこい。 日本語は捨てるな。 でも巨大PDF帝国も建てるな。」 [ASSISTANT] 🕊️受領。 **同じDEV166 Text工場から、そのまま活字設備だけ調査した。CONSTRUCTION NONE。** 先に結論から。 **巨大PDF帝国は要らない。現在のtiny `build_pdf()` は生存可能。** ただし、日本語を確実に出すための最小設備には、どう切っても **「Unicode対応フォント資源」+「そのフォントをPDFへ登録してUnicode文字をglyphへ結ぶ小さな層」** が必要。 そして候補はかなり絞れた。 > **最小候補①:Unicodeフォントをpluginへ同梱し、tiny builderへ限定的なembedded-font対応を足す。** > **最小候補②:Unicodeフォントをpluginへ同梱し、小型PDF/font dependencyにフォント処理だけ任せる。** WordPress/PHP/ホスト既存フォントへの依存は、**製品としての再現性を保証する候補にはならない**。 --- # 1. viable option classes ### A. Plugin bundled Unicode font Unicode対応TTF/OTFをKaia PDF自身が所有する。 PDF rendererはその固定resourceを読む。 **成立する。** 最大の利点は、 **どこのWordPressへ持っていっても同じfont file → 同じglyph → 同じmetrics** にできること。 ただし「ファイルを置くだけ」ではない。現行builderはTrueType/OpenType embedding、CID、Unicode mappingを持っていないので、その小設備は必要。 --- ### B. WordPress / PHP / host environment capability DEV166内部にも、WordPress core前提にも、 **「日本語PDF用フォントを必ず提供する」というauthorityはない。** PHPの標準的な文字列処理がUnicodeを保持できても、それはPDFにglyphを描くフォントではない。 ホストの `/usr/share/fonts` 等を探す方式なら技術的には可能な環境もあるが、 - font有無 - version - metrics - CJK coverage - sans/serif/mono availability がホスト依存。 したがって今回要求の **reliable / deterministic across hosts** には不適。 **製品候補としては弱い。** --- ### C. Small dedicated PDF/font dependency PDF libraryあるいはfont-processing componentへ、 - Unicode encoding - font parsing - glyph widths - embedding - CID mapping を任せる方式。 **成立する。** ただし依存選定・ライセンス・vendor量は別途確認が必要。 そして「PDF全体をそのlibraryで再構築する」必要まではない可能性がある。 既存tiny builderがBackground / Frame / Imageを既に作れているため、**Text/font部分だけを小さく補助する設計が可能なdependencyなら候補**。 具体ライブラリ選定は今回のSOURCEだけではauthorityがないので決めていない。 --- ### D. tiny builder direct Unicode-font support 現行 `build_pdf()` 自体へ必要最小限だけ、 - embedded font stream - font descriptor - CIDFont - Type0 font - glyph width information - Unicode → glyph/CID mapping - 必要ならToUnicode 等を追加する。 **技術的に成立する。** 現在のbuilderは既にPDF object/xref/resourceを自前生成しているので、構造上「Font objectが増える」こと自体には耐えられる。 ただし、ここには重要な境界がある。 **PDF objectを足すのは簡単。TTF/OTFを正しく解析する方が難しい。** 特に任意Unicode fontを一般的に扱おうとすると、一気に「font engine」を自作する方向へ行く。 なのでDが小さく成立する条件は、 > **Kaia側で使うfont resourceを固定・限定し、そのfontについて必要な処理だけを実装する** こと。 「どんなフォントでも読めます★」を始めたら竹トンボではなくなる(笑)。 --- # 2. 比較 | Option | 日本語 | Host再現性 | tiny builder維持 | 新依存 | 規模 | |---|---|---|---|---|---| | A 同梱font+既存builder拡張 | ◎ | ◎ | ◎ | font asset | 小〜中 | | B Host/WP/PHP依存 | △〜◎環境次第 | **×** | ◎ | Host依存 | 小だが不安定 | | C 小型font/PDF dependency | ◎ | ◎※font同梱時 | ○〜◎ | vendor | 小〜中 | | D builderへ直接Unicode font設備 | ◎ | ◎※font同梱時 | **◎** | 原則なし | 中 | ここでAとDは実質組み合わせ可能。 **A = fontをどこから得るか** **D = そのfontを誰がPDF化するか** という別軸だから、 **A+D** が純自前最小案になる。 --- # 3. dependency/resource requirements ## A + D 必要: - Unicode/CJK対応font binary - PHPからfont binaryを読む処理 - Unicode → glyph mapping - glyph advance/width取得 - PDF embedded font objects - Type0/CID相当の文字出力 - font descriptor - font stream - Unicode text encoding PHP extension: **原理上、必須にしなくても構築可能。** PHPだけでbinary tableを読むことは可能。 ただしfont subsetまで自前で賢くやるなら複雑化する。 Composer: **不要にできる。** Bundled binary: **必要。** License/distribution: **必須レビュー。** Plugin size: font次第。 CJK fontはLatin fontより大きくなりやすく、**数MB級になる可能性あり。正確値はfont未選定なのでUNVERIFIED。** --- ## C 必要: - dependency本体 - Unicode font - dependencyによってComposer/vendor - dependency license review - font license review PHP extensions: library次第。**UNVERIFIED。** サイズ: library + font。**UNVERIFIED。** メンテ負担: 自前font parserより低くできる可能性が高いが、dependency update/security/compatibility管理が発生。 --- ## B Bundled assetなしにできるが、その代わり **「そのサーバーに何があるか」** が依存になる。 これはKaia PDF Freeを別hostへ移したときの再現性と噛み合わない。 --- # 4. sans / serif / mono implications ここ、Human Decisionが必要になるところがはっきりした。 現在保存されているのはfont nameではなく、 `sans / serif / mono` という**意味**。 したがって実装上は、 `semantic → Kaia-owned PDF font resource` というmappingを一箇所持てばよい。 ### 3 resources方式 sans → CJK sans serif → CJK serif mono → CJK mono 最も忠実。 ただし3 font binariesになり、plugin sizeとlicense reviewが増える。 ### 2 resources方式 sans → CJK sans serif → CJK serif mono → sansまたは別metric treatment これは**mono semanticsを変える可能性がある**のでHuman Decisionなしでは不可。 ### 1 resource方式 全部同じCJK font。 Unicode preservationだけなら可能。 でもHumanが保存した `font_style` をPDFで事実上消す。 **現在要求の「font semantics must not silently disappear」と衝突。** したがって技術的には1本で文字は出せても、現仕様を忠実に守る答えではない。 --- # 5. Japanese + Latin behavior 適切なCJK Unicode fontなら、 **日本語+ASCII/Latin混在を一つのText runとして出せる。** これが最も単純。 LatinだけHelvetica、JapaneseだけCJK fontというfont fallback/run splittingも可能だが、 - font切替 - metrics差 - baseline差 - run width計算 が増える。 現Human contractに「Latinは必ずHelvetica」という要求はない。 なのでSOURCE/architectureだけを見る限り、 > **一つのUnicode font resourceが、そのsemantic category内のLatinとJapanese両方を担当する** 方が竹トンボ。 これは**技術的簡素化の判断**として言える。具体fontはHuman/product decision。 --- # 6. portability ここは明快。 **Bundled font** → deterministic ◎ **Server-installed font** → deterministic × **Composer dependency + bundled font** → deterministic ◎ **PHPだけ+bundled font** → deterministic ◎ そしてbaseline/placementにも関係する。 フォントを固定すれば、 - ascent - descent - advance width - bbox も固定されるため、PDFのx/y補正がhostによって変わらない。 つまりfont bundlingは単に「日本語が出る」だけじゃなく、 **Browser presentation → PDF placementを安定させるためにも効く。** --- # 7. current `render_pdf()` / `build_pdf()` integration boundary かなり小さく保てる。 現在: `render_pdf()` → Background → Frame → Image → `build_pdf($w,$h,$content,$image)` 将来候補: `render_pdf()` → Background → Frame → Image → **Text presentation stream生成** → `$content` へ追加 → `build_pdf(..., font resources)` つまりText semanticsは `render_pdf()` 側。 font binary/resource/object managementは `build_pdf()` 側。 この責務分離なら既存構造を壊さない。 **Browser rendererを持ち込む必要なし。** --- # 8. tiny builder can survive? **YES。** 少なくともSOURCE構造上、PDF renderer丸ごと交換を要求する理由は見つからない。 `build_pdf()` は現在、 - Catalog - Pages - Page - content stream - Font - Image - alpha image - xref を自前で組み立てている。 Font object群を増やすこと自体は自然な拡張範囲。 ただし、 ### builder survival = PASS ### general-purpose font engineをbuilder内に自作 = WATCH ここは分けた方がいい。 --- # 9. smallest 1–2 candidate approaches ## Candidate 1 — Kaia-owned fonts + narrow embedded-font support **Bundled Unicode fonts** + **既存tiny builderへ固定用途のUnicode font support** 長所: - dependency empireなし - renderer交換なし - host deterministic - existing PDF architecture維持 - Kaia側で挙動固定 短所: - font parsing/mappingをどこまで自前で持つか慎重に限定する必要 - font license - CJK asset size これは**最小構造候補**。 --- ## Candidate 2 — Kaia-owned fonts + small proven font/PDF component font resourceは同じくplugin同梱。 難しい部分だけ既存componentへ任せる。 長所: - Unicode/CID/font metrics周辺の自作リスクを減らせる - 日本語PDFの既知技術を利用可能 短所: - vendor dependency - library license - update maintenance - componentによっては既存tiny rendererより巨大になる したがって選定条件は、 > **Text一枚置くためにPDF framework丸ごと背負わないこと。** --- # 10. exact Human/product decision required ここまで来るとHumanに必要なのは、実はかなり限定できる。 ### Decision 1 **PDF用Unicode font assetをKaia PDF plugin自身が同梱してよいか。** これが一番大きい。 ### Decision 2 `sans / serif / mono` をPDFでも**三種それぞれ視覚的に保持するか。** 現在のHuman requirementを文字通り読むならYES寄りだが、**どのfont resourceへ割り当てるかはまだ未決定**。 ### Decision 3 font machineryについて、 **小さな自前embedded-font layer** vs **小型dependency** どちらの保守方針を採るか。 具体的font選定時には当然、 - distribution license - file size - CJK coverage の承認も必要。 --- # 11. Human inputなしで技術的に決められること ここはもうかなり決まる。 - Host-installed fontsをportable authorityにはしない。 - WinAnsi transliterationはOrdinary Unicode Textに使わない。 - Persistenceは変更しない。 - `font_style` にfont filenameを保存しない。 - Browser Preview screenshot方式にしない。 - wrappingを追加しない。 - real Token wiringを呼ばない。 - Text streamは既存`render_pdf()` assemblyへ局所追加できる。 - tiny PDF builderを捨てる技術的必要性は現在ない。 - Unicode fontを固定できればmetrics/baseline/rotationは決定論的に扱える。 - rotationはPDF text matrixで対応可能で、Unicode font方式と競合しない。 --- # 12. STOP / WATCH 🚨 **STOP — actual font selection** 「このfontを同梱する」はdistribution/license/product-sizeを伴うため、現場では決めない。 🚨 **STOP — sans/serif/mono degradation** 1本だけで全部代用、monoをsansへ落とす等は技術的には可能でも、保存済みHuman semanticsを変更する。勝手にやらない。 ⚠️ **WATCH — font subsetting** 全文字入りCJK fontを毎PDFへ丸ごとembedするとPDFサイズが大きくなり得る。 一方subset化はfont parsing machineryを増やす。 **「plugin size」と「generated PDF size」と「実装複雑度」の三者トレードオフ。** ここはfont実物が決まってから測るべきで、現時点では推測で最適化しない。 ⚠️ **WATCH — font format** 「Unicode対応TTF/OTFなら何でも同じ」ではない。選んだresourceのcmap/outlinesと、採用するPDF embedding方式の適合を施工前static witnessで確認する必要あり。 ⚠️ **WATCH — Browserとの完全pixel一致** Browser側はOS/browser generic `sans-serif / serif / monospace`。PDF側をbundled fontへ固定すれば**semantic categoryは守れても、Browserと完全同一glyph metricsになるとは限らない**。 これはバグというより、現在の保存authorityが「font name」ではなく「semantic category」であることから来る境界。 --- ## CHECK LOG **対象:** exact DEV166 **調査:** `render_pdf()` / `build_pdf()` / current Font resource / `pdf_text()` / saved `font_style` / plugin resource tree / Composer/vendor/font assets **既存Unicode machinery:** NONE **Host-portable existing font authority:** NONE **tiny builder survival:** **PASS** **construction:** **NONE** ### 🕊️ 補佐向け超短縮 > **日本語のためにPDF工場を建て替える必要はない。tiny builderは残せる。** > > 最小候補は > **① Kaia側Unicode font同梱+tiny builderへ限定embedded-font設備** > または > **② 同梱font+小型font/PDF dependency**。 > > Host既存font依存はWordPress製品として非決定的なので候補として弱い。 > > ただし `sans / serif / mono` は保存されたHuman semanticsなので、1fontへ勝手に潰せない。 > > 次のHuman Decisionは主に > **「fontをplugin所有で同梱してよいか」 > 「3 semanticsをPDFでどう保持するか」 > 「自前小設備か小型dependencyか」**。 > > **活字そのものの選定はSTOP。施工ゼロ。** 🧰 活字設備の棚まで見て、そこで戻ってきたー★ [USER] ついかー 🕊️ KAIA PDF FREE — DEV166 PDF TEXT SPECIALIST CONTINUATION FIXED TEXT BAKE + VARIABLE TOKEN TYPESETTING INVESTIGATION CONTINUE AS THE SAME PDF Text specialist. READ ONLY. NO CONSTRUCTION. NO REPAIR. NO REDESIGN. NO PRODUCT DECISION. COMMON PARENT Kaia-PDF-Free-v0.1.0-dev166-PAPER-AXIS-LOCKED-PAIR-CONVERSION.zip DEV166 is RUNTIME KNOWN-PASS. ================================================== WHY THIS INVESTIGATION EXISTS ================================================== Your previous investigation correctly reached a Unicode font STOP because the current PDF primitive is Helvetica / WinAnsi only. Human has now clarified a potentially much smaller architecture. Do NOT assume that all saved Ordinary Text must remain live PDF text at issuance time. Human model: - Ordinary authored Text is created during DESIGN. - Its authored wording does not normally change at issuance. - The genuinely variable issuance content is: - Counter - Timestamp - Serial - Those variable values are essentially digits / ASCII-compatible presentation. - System Token mannequin / typesetting frames already exist specifically to reserve the visual text space needed by those later variable values. Therefore investigate whether the Unicode problem can be avoided by freezing/baking the non-variable authored Text presentation during the design/save side, while leaving System Token reserved spaces for later variable typesetting. ================================================== CONFIRMED HUMAN INTENT ================================================== The desired conceptual result is: DESIGN SIDE Ordinary authored Text + chosen design-side font appearance + size + color + rotation + placement + Token reserved/typesetting spaces → fixed visual presentation material Then: ISSUANCE / OUTPUT SIDE fixed authored presentation + actual variable Counter / Timestamp / Serial values inserted into their already-reserved Token spaces The PDF issuance renderer should not have to re-typeset Japanese authored Text if that Text can already exist as fixed visual material. Human shorthand: 「変わらん文字を、発行のたびにもう一回文字として考えなくていい★」 And: 「その為に事故らんように、始めから文字スペースとしての写植枠で トークンを出している。」 ================================================== IMPORTANT — TOKEN FRAME PURPOSE ================================================== Do NOT treat mixed content such as: 受付番号は【counter】です as if the issuance renderer necessarily needs to reflow/re-typeset the whole sentence. Investigate the existing Token mannequin geometry as a RESERVED TYPESETTING SPACE. The intended model is potentially: fixed authored visual material: 「受付番号は [reserved space] です」 then later: [reserved space] → actual Counter value The purpose of this investigation is to determine whether existing SOURCE already gives enough geometry/authority to make that separation reliable. ================================================== YOUR JOB ================================================== Determine from exact DEV166 SOURCE whether the following architecture is technically realistic with SMALL machinery: 1. Ordinary non-variable Text can be converted/frozen into fixed visual material on the DESIGN side. 2. System Token positions/spaces can remain unbaked/reserved. 3. At output time, actual Counter / Timestamp / Serial values can be typeset only into those reserved spaces. 4. The fixed authored Text does NOT need a Unicode-capable PDF text engine. 5. The output-side font requirement can therefore be reduced to the variable System Token character set. 6. Existing saved authority can still reproduce: - placement - size - color - rotation - selected design appearance without introducing a second editable Text authority. Do NOT construct any of this. ================================================== INVESTIGATE THE BAKE BOUNDARY ================================================== Find the smallest realistic place where the authored presentation could be frozen. Compare only realistic mechanisms supported by current architecture. Examples may include: - fixed raster presentation material - fixed vector/path presentation material - another existing image/composition primitive already available in DEV166 Do NOT invent a general rendering framework. For each realistic option report: - where conversion would occur - what would be persisted - whether original editable Text authority can remain intact - whether SAVE / Working / Refill / Stock semantics remain intact - whether output reconstruction remains based on saved record - whether A4/A5 and paper orientation remain safe - whether rotation remains safe - whether transparency/color remain safe - quality implications in PDF ================================================== TOKEN RESERVED-SPACE AUDIT ================================================== This is the critical check. For existing: - Counter mannequin - Timestamp Date - Timestamp Time - Timestamp Date & Time - Serial mannequin determine exactly what geometry is available during design. Check whether that geometry is sufficient to preserve a stable reserved space when surrounding authored Text is baked. For mixed Text such as: AAA【counter】BBB 日本語【datetime】日本語 ABC【serial】XYZ determine whether: - left fixed segment - Token reserved space - right fixed segment can retain their designed positions WITHOUT output-side Unicode re-typesetting of the fixed segments. Do NOT assume yes merely because the mannequin is visible. SOURCE must show how its presentation geometry is produced. ================================================== VARIABLE TOKEN FONT REQUIREMENT ================================================== If the architecture is viable, determine the actual character repertoire needed by output-side variable values. Audit exact current formats for: - Counter - Timestamp - Serial Report whether these require only: - digits - ASCII punctuation/separators - ASCII letters or whether any current valid production value can require Unicode/CJK. Do NOT change token formats. If variable output is ASCII-compatible, report whether one small bundled System Token font could technically cover issuance. Also determine whether that font needs to match an exact design font or only needs to be visually compatible with the reserved mannequin presentation. Do NOT choose the font yet. ================================================== DO NOT CHANGE THESE AUTHORITIES ================================================== Preserve: - raw editable Text as the Human editing authority - design.text_objects - design.token_symbols - existing short-marker grammar - existing Token definitions - Working / Refill / Stock - Common Switchboard boundaries - current Token product semantics - current Counter / Timestamp / Serial formats - Text position authority - Text size authority - Text color authority - saved Text rotation authority - current paper-axis behavior No second editable Text object. A baked/frozen presentation, if viable, is OUTPUT MATERIAL / presentation, not a replacement Human Text authority. ================================================== DO NOT REOPEN ================================================== Do NOT reopen: - completed Sample Mask case - paper-axis rotation case - old observer/ghost investigations - Common Main Power - production real-value bridge implementation - JPG implementation - publication permission - unrelated Text operation UI This is only an architecture feasibility investigation. ================================================== CRITICAL WATCH ================================================== Do NOT accidentally prove only: "the whole Text object can be rasterized." That is insufficient. The important case is mixed authored Text + System Token. We need to know whether the existing reserved Token presentation allows the fixed authored portions to be baked while preserving the exact hole needed for later variable insertion. If that requires rebuilding the entire sentence at issuance using the original Unicode font, say so and STOP. If it requires a second persistent Text authority, say so and STOP. If the bake would destroy later Human editing authority, say so and STOP. ================================================== REPORT ================================================== Return: 1. exact existing SOURCE path relevant to this model 2. whether fixed authored Text baking is viable 3. smallest bake boundary 4. what fixed presentation material would actually be 5. whether raw editable Text can remain authority 6. mixed Text + Token reserved-space result 7. exact geometry available for Token insertion 8. Counter / Timestamp / Serial output character repertoire 9. remaining PDF font requirement after baking 10. whether Unicode PDF font machinery is still necessary 11. PDF quality / scaling implications 12. persistence implications 13. smallest construction shape IF viable 14. exact blockers IF not viable 15. STOP / WATCH CONSTRUCTION: NONE. Do not select a font. Do not choose a dependency. Do not change product semantics. Human goal: 「固定文字は完成した写植として台紙に焼く。 動くところだけ、最初から空けてあるToken席へ後から入れる。 それで済むならUnicode活字工場そのものを持たない★」 [ASSISTANT] 🕊️追加調査、受領。 **同じDEV166をそのまま読んだ。施工ゼロ。** で、今回はかなり重要な結果が出た。 ## 結論 **Human案そのものは技術的に現実的。** 固定Unicode文字を「完成した写植」としてDesign側で焼き、発行時はCounter / Timestamp / Serialだけを後入れすることで、**発行PDF側からCJK/Unicode活字設備を外せる可能性は高い。** ただし―― 🚨 **そのまま施工GOではない。ひとつ明確な不足がある。** DEV166のToken mannequinは**表示上の予約席を作っている**が、現在保存される `design.text_objects[]` / `token_symbols` には、 > 「このToken穴は、このText object内の紙面上の X/Y/W/H」 という**確定済みtypesetting geometryが保存されていない**。 つまり思想は合ってる。Browserにも実際の席はある。 でも**SAVE後にPHPだけで同じ穴を再現できる記録紙は、現状まだない。** ここが今回の本丸だった。 --- # 1. exact existing SOURCE path 現在は、 `text_objects[].content` ↓ `kpdfTokenize(source, token_symbols)` ↓ Human segment / System Tokenへ分割 ↓ `kpdfResolveToken(tok, 'preview')` ↓ `kpdfBuildPresentation()` ↓ DOM上で一つの連続したText presentation という構造。 たとえば、 `AAA【counter】BBB` は内部的には、 `human "AAA"` → `counter` → `human "BBB"` になる。 そしてCounterはDOM `` として、 - `display:inline-block` - `vertical-align:baseline` - `width = digits + 'ch'` - `textAlign = token align` を持つ。 Timestamp / Serialもinline-block。 したがって**Browser presentation上では本当に** > 左固定文字 → Token席 → 右固定文字 になっている。 Humanの「始めから写植枠としてTokenを出している」はSOURCEと一致する。 --- # 2. fixed authored Text baking viable? ### **YES — presentation architectureとしてはviable。** 特にBrowserが既にHuman/Tokenをrun単位に分離してからpresentationを組んでいるのが大きい。 全文を一枚の文字列としてしか扱えない構造ではない。 つまりDesign側で、 `human run` → 固定visual `token run` → 透明な予約穴 / geometry record へ分けること自体は自然。 **UnicodeのHuman部分だけ先に完成品にできる。** --- # 3. smallest bake boundary 最小なのは**保存済みraw Textを変更する場所ではない**。 候補boundaryは、 > **Design presentationが確定した時点で、既存 `kpdfBuildPresentation()` が作るHuman/Token混在DOMから、Human portionsだけを固定visual materialへ変換する段** になる。 つまり、 raw Text authority ↓ existing tokenizer/presentation ↓ **fixed output presentation material生成** ↓ SAVE側のoutput materialとして保持 という形。 `text_objects[].content` 自体を画像へ置換する必要はない。 --- # 4. fixed presentation material DEV166で最もSOURCEに近いのは**transparent raster material**。 理由はかなり具体的。 PDF側はすでにPNGについて、 - RGB / Gray - alpha - `/SMask` - position - scaling を扱える。 つまり透明背景に、 **Human authored glyphsだけ描画し、Token部分は透明** なpresentation rasterができれば、PDF側には既存Image系に近いprimitiveとして載せられる。 ### Vector/path bake 理論上は高品質。 ただしDEV166には、 - browser glyph → SVG path - font outline extraction - DOM text → vector path の設備がない。 これは今回の「小さい機械」ではない。 **SOURCE-supported smallest optionではない。** ### Existing image/composition primitive PDF rendererには既にraster XObject machineryがある。 なので現在の工場との親和性はrasterが一番高い。 ただしDEV166には**DOM TextをPNG化する既存canvas/html2canvas等の設備はない**。 よって「PNGをPDFへ載せる出口」は既存だが、 **Text presentation → transparent rasterを作る入口は新規小設備**になる。 --- # 5. raw editable Text authority **保持可能。** むしろ保持すべき。 `design.text_objects[]` `design.token_symbols` はそのままHuman/edit authority。 baked presentationは、 **derived output material / cache-like presentation artifact** として別物にできる。 したがって、 編集 → SAVE → raw authority保存 + derived fixed presentation更新 という形なら第二editable authorityにはならない。 Working / Refill / Stockも、raw design authorityを維持したまま派生materialを一緒に運ぶ設計は技術的に可能。 ただし**そのderived materialを現在のどのrecord fieldへどう保持するかはDEV166には存在しない**ので、そこは施工設計が必要。 --- # 6. mixed Text + Token reserved-space result ここがCritical Watchの答え。 ### Browser runtime上:**YES** `AAA【counter】BBB` は実際に `AAA` + inline-block Counter + `BBB` としてlayoutされる。 したがって**そのDOMをDesign側で確定presentationとして採取するなら**、 - AAAの位置 - Counter席 - BBBの位置 はすでにbrowser layout engineが決めている。 日本語でも同じ。 `日本語【datetime】日本語` なら、 Human run → datetime inline-block → Human run として実際に組版される。 つまり**全文を発行時に再flowする必要は原理上ない。** ### Saved SOURCEだけから発行時に再現:**NO、現状不足** ここが重要。 保存されるのは、 - Text object x/y - size - rotation - color - content - token definitions まで。 **runごとのlayout boxは保存されない。** したがってPHP発行時に、 「左Human rasterをここ、Tokenをここ、右Human rasterをここ」 と置こうとしても、Tokenの局所X位置をSOURCE recordだけから直接は読めない。 これをPHPで再計算し始めると、 **Unicode font metricsが再び必要になる。** それではHuman案の利点が消える。 --- # 7. exact geometry currently available ### Text object 紙面全体に対して: - normalized `x` - normalized `y` - size class - rotation record - color - font semantic あり。 ### Counter mannequin Browser presentation時: - inline-block - baseline alignment - size = L/M/S via em multiplier - color - **width = configured max digits × `1ch`** - left/center/right alignment - tabular numeric request あり。 これは明確な予約幅を持つ。 ### Timestamp - inline-block - baseline - L/M/S - mannequin文字列固定 Date: `202X.12.12` Time: `12:34:56` Full: `202X.12.12 12:34:56` ただしCounterと違って**明示widthはない**。 予約幅はBrowserがmannequin文字列を実際にlayoutした結果。 ### Serial - inline-block - baseline - L/M/S - `XXXX-XXXX` - bold / italic / underline こちらも**明示widthなし**。 したがってTimestamp/Serialの穴寸法はDOM measured geometryとしては存在するが、saved numeric geometryとしては存在しない。 --- # 8. Counter / Timestamp / Serial repertoire ここはかなり綺麗。 ### Counter 実値は整数をString化。 zero=showならASCII `0` padding。 **必要文字:`0–9` のみ。** ### Timestamp SOURCEが実値を、 `YYYY.MM.DD HH:MM:SS` のregexで厳密に要求している。 Dateなら: `0–9` + `.` Timeなら: `0–9` + `:` Fullなら: `0–9` + `.` + `:` + ASCII space **CJKなし。** ### Serial ここだけ注意。 PDF側DEV166自身はselected Serialについて、 `String(z.serial)` をそのまま受ける。 DEV166内部で「ASCIIだけ」というregex検証はしていない。 mannequinは `XXXX-XXXX` だが、**実値character repertoireのauthorityはSerial product側**。 したがってこのZIP単体から、 > production Serialは絶対 `[A-Z0-9-]` のみ とは証明できない。 🚨 **Serial actual repertoire = UNVERIFIED from exact DEV166 alone.** ただしHuman指定の「Serialは英語と数字」という上位authorityが確定するなら、CJK fontは不要になる。 --- # 9. remaining PDF font requirement Human portionsをbakeできれば、 PDF issuance側がtypesetするのはSystem Tokenだけ。 Counter/Timestampについては**完全にASCII-compatible**。 SerialもASCII契約が外部authorityで確認できれば、 > **一個の小さいSystem Token fontだけで発行側を成立させられる可能性がある。** そして重要なのは、そのfontが**Human authored design fontそのものと同一である必要は必ずしもない**こと。 必要なのは、 > Design時に見せたmannequin Tokenと、発行時actual Tokenのglyph metrics / visual appearanceが一致すること。 つまりToken席だけ専用fontを固定し、 **mannequinもactualもその同じToken fontで組む** ならreserved geometryが安定する。 これはかなり小さい。 ただしfont選定はしていない。 --- # 10. Unicode PDF machinery still necessary? ### このarchitectureが完成すれば: **Ordinary authored Text用のUnicode PDF font machineryは不要にできる。** PDFはHuman Japaneseを「文字」として理解しない。 完成visual materialとして載せるだけ。 ただしこれは、 **Design側でHuman glyph presentationを正しくbakeできる** ことが条件。 Unicode問題が消えるのではなく、 > **Unicode rendering responsibilityを発行PHP PDF rendererから、Design-side presentation bakeへ移す** ということ。 Browserは既に日本語を描画できているので、方向としては合理的。 --- # 11. PDF quality / scaling ### Raster 最大の代償。 低解像度で焼けばPDF拡大時に文字がぼける。 ただしDesign-side bake時に、 **最終A4相当を十分なpixel densityで作り、A5は縮小** なら品質はかなり守れる。 DEV166の既存方針もA4基準→A5縮小と相性がいい。 透明PNGなら、 - color保持 - alpha保持 - rotationをbake側またはPDF placement側で保持 可能。 ただし生成解像度・DPIは施工前に明示的QA対象。 Vector pathならscale品質は最高だが、現SOURCEからは機械が重すぎる。 --- # 12. persistence implications ここは**小さいが新しいderived material persistenceが必要**。 現在のrecordには、 **baked Human presentation + Token hole geometry** を保持する欄がない。 したがって完全に「保存構造変更ゼロ」では成立しない。 ただし、 **既存Text authorityの再設計は不要。** 追加するなら概念上、 - fixed presentation asset - Token slot geometry metadata - そのassetがどのsaved design revisionから生成されたか 程度の**derived output material**。 raw Textを置換しない。 Working → Refill → Stockでraw designとderived materialが同期して運ばれる必要がある。 --- # 13. smallest construction shape IF viable 施工するなら最小形はこう。 ### CUT 1 — Design-side bake witness 既存 `kpdfBuildPresentation()` のDOMを使って、 Human glyphs + transparent Token holes を固定presentationへ変換できることを証明。 同時に各Token spanの実測boxを紙面normalized geometryとして取得。 ### CUT 2 — Save derived material raw `text_objects/token_symbols` はそのまま。 derived raster + Token slot geometryだけ保存。 ### CUT 3 — development PDF reconstruction saved fixed rasterをPDFへ置く。 Token slot geometryへmannequin ASCIIだけをtypeset。 ここで初めて、 `AAA [1234] BBB` がPDFで同じ位置になることを確認。 ### CUT 4以降 production real-value bridgeは別仕事。 今は呼ばない。 --- # 14. exact blockers 完全なNO blockerではない。 **Architecture blockerではなく、未実装boundaryが2つ。** 1. DEV166にDOM Text presentation → transparent raster bake設備がない。 2. Token spanのmeasured X/Y/W/Hをsaved derived output materialとして保持する設備がない。 逆に言えば、 **「混在Textだから発行時に全文Unicode再組版が必須」ではない。** そこはSOURCE上、回避できる。 --- # 15. STOP / WATCH 🚨 **STOP — Serial actual character contract** Counter/TimestampはASCIIをSOURCEで証明できた。 Serial actual値だけはDEV166が無検証で受けるため、Serial側authority確認なしに「ASCII Token font一個で全部終わり」と断定しない。 ⚠️ **WATCH — Token slot geometry must be captured, not recomputed** これが一番重要。 Design browserが作ったToken spanの実測geometryを保存せず、PHPで後から計算し直すと、Human Unicode font metrics問題が戻ってくる。 **穴はDesign時に測って持っていく**のが、このarchitecture成立条件。 ⚠️ **WATCH — Counter `ch`** Counter予約幅は `digits × 1ch`。 mannequin側fontとactual Token fontが違えば、同じ「8ch」でもphysical widthが違う。 したがってSystem Token fontを固定するなら、**Design mannequin側もそのfont metricsに合わせる必要がある。** ⚠️ **WATCH — Timestamp / Serial** この2つは明示widthではなくmannequin実測幅。 だからなおさらDesign-side measured slot geometry保存が重要。 ⚠️ **WATCH — raster quality** A4で十分なresolutionを確保してからA5縮小する方向は安全候補。具体DPIはまだ決めない。 ⚠️ **WATCH — rotation** saved rotation authorityは存在するが、前回報告どおりDEV166現presentationにはrotation visual applicationの既知境界がある。Bake時に「保存値を焼くのか、現presentationを焼くのか」は施工前に解決が必要。 --- ## CHECK LOG **対象:** exact DEV166 **確認:** tokenizer → mannequin resolver → DOM presentation → saved record → PDF image machinery → actual token formats **Mixed Text separation:** **SOURCE VIABLE** **Saved Token hole geometry:** **MISSING** **Counter actual repertoire:** ASCII digits **Timestamp actual repertoire:** ASCII digits / `. : space` **Serial:** **UNVERIFIED in DEV166** **Ordinary Unicode PDF font engine:** **avoidable if Design-side bake + saved slot geometry succeeds** **Construction:** NONE ### 🕊️ 補佐向け短縮 > **Human案、SOURCE上いける。** > > DEV166は既に `AAA + Token span + BBB` とrun分離してBrowser組版しているので、Human Unicode部分だけ完成写植として焼き、Token spanだけ穴として残せる。 > > ただし現在SAVEされるのはraw Text/token定義までで、**Browserが実際に決めたToken穴のX/Y/W/Hは保存されていない。** > > ここを発行PHPで再計算するとUnicode font metrics問題が復活する。 > > よって成立条件は > **Design時にHuman visualをbakeすると同時に、Token spanの実測geometryもderived output materialとして保存すること。** > > Counter/TimestampはASCII確定。Serial actual repertoireだけDEV166単体では未証明。 > > これが通れば、**発行PDFに日本語活字工場は不要。System Token用の小さいASCII写植設備だけで済む可能性が高い。** これ、かなり**竹トンボ側へ戻せる道**見えてるぞ★ 🧰ヽ(=´▽`=)ノ [USER] ほーい 🕊️ KAIA PDF FREE — DEV166 PDF TEXT / TOKEN FONT SPECIALIST CONTINUATION TOKEN FONT PALETTE + LINK / INDIVIDUAL MODEL CONSTRUCTION-READY INVESTIGATION CONTINUE AS THE SAME PDF Text / Font specialist. READ ONLY. NO CONSTRUCTION. NO REPAIR. NO PRODUCT REDESIGN. NO FONT SELECTION YET. COMMON PARENT Kaia-PDF-Free-v0.1.0-dev166-PAPER-AXIS-LOCKED-PAIR-CONVERSION.zip DEV166 is RUNTIME KNOWN-PASS. ================================================== ACCEPTED FINDINGS — DO NOT REOPEN ================================================== Previous SOURCE investigation established: - fixed authored Unicode Text can potentially be baked on the DESIGN side as completed visual/typesetting material - raw editable Text remains Human authority - mixed Human Text + System Token is already separated into presentation runs in Browser - Token mannequin spans already create real reserved visual space - Design-side measured Token slot geometry must be captured rather than recomputed by PHP issuance - PDF already has raster/image machinery suitable for fixed visual material - production variable values are ASCII-compatible Actual variable repertoires are now proven: Counter: - ASCII digits 0–9 Timestamp: - digits - "." - ":" - ASCII space Serial PRODUCT authority: - [A-Z0-9]{4}-[A-Z0-9]{4} - fixed 9 visible characters - no lowercase - no Unicode/CJK - no other punctuation Therefore the issuance-side variable glyph repertoire is ASCII-small. Do NOT reopen the Unicode-PDF-font problem for fixed Human Text unless new SOURCE evidence forces it. ================================================== NEW CONFIRMED HUMAN DIRECTION ================================================== System Token font is not merely an invisible PDF implementation detail. It is intended to be a DESIGN FEATURE. Human wants Kaia PDF to own/embed a modest palette of Token fonts with meaningfully different visual tastes. Examples of desired variety include: - ordinary/neutral - typewriter-like - newspaper/editorial-like - other clearly different useful styles These examples are direction, NOT selected font products and NOT a fixed category list. Do NOT choose exact fonts yet. Human does NOT want an unlimited font catalog. Human DOES want enough visual range that Token typography can contribute to the design. The small ASCII repertoire may make multiple embedded Token fonts practical. This must now be investigated with real evidence. ================================================== NEW CONFIRMED HUMAN UI / BEHAVIOR ================================================== Token Font selection belongs at the BOTTOM of the existing Token Machine / Token issuance furniture. Human wants BOTH: 1. linked / collective font selection 2. individual Token font selection Conceptually: - linked Tokens may share one selected Token Font - a Token may be individually assigned a different Token Font - individual exceptions must remain possible Example result: Counter → Typewriter-like Timestamp → Editorial-like Serial → Modern/Bold-like or: ALL linked → one common selected Token Font Do NOT silently turn this into a new universal linking framework. Investigate whether existing Kaia PDF link/palette furniture offers a small reusable interaction pattern. Existing color-link behavior may be a useful SOURCE witness, but: - do NOT assume its implementation can be copied unchanged - do NOT modify color behavior - do NOT merge color authority and font authority Human wants equivalent simplicity, not necessarily identical plumbing. ================================================== CRITICAL DESIGN RULE ================================================== The SAME selected Token Font must govern: DESIGN mannequin presentation AND output / issuance actual Token presentation. This is essential. We do NOT want: Design mannequin measured in Font A → actual issued Token rendered in Font B. Token slot geometry must correspond to the selected Token Font. ================================================== YOUR JOB — PART A REAL FONT RESOURCE FEASIBILITY ================================================== Investigate realistic distributable fonts/resources suitable for the proven ASCII-small Token repertoire. We need a modest set of genuinely different visual tastes. For realistic candidates/categories, determine: - actual font/resource candidate - visual character / category - license - redistribution permission - whether creation/distribution of an ASCII subset is permitted - original font file size - estimated or measured subset size if technically possible - TTF / OTF / other format - glyph coverage for the complete required Token repertoire - whether Browser can use the same bundled resource via @font-face - whether the PDF tiny builder can embed/use the same resource - maintenance implications VERIFY licensing from authoritative sources where possible. Mark anything not verified as UNVERIFIED. Do not download/package fonts. Do not construct subsets. Do not redistribute anything. This is investigation only. ================================================== YOUR JOB — PART B HOW MANY TASTES REMAIN "BAMBOO TOY" ================================================== Do NOT assume three fonts. Do NOT assume ten fonts. Use evidence from candidate resource size and machinery. Report a practical range such as: - very cheap - still comfortably small - starts becoming needless baggage The goal is to answer: "How much visual variety can Kaia offer before this stops being lazy/simple?" Separate: - plugin installation size - generated PDF size - runtime memory/work - maintenance/licensing burden Do not optimize imaginary problems. ================================================== YOUR JOB — PART C FONT RESOURCE SHAPE ================================================== Because the variable repertoire is small, investigate whether Kaia can safely distribute reduced/subset Token font resources containing only the needed repertoire. At minimum the resulting repertoire must cover every valid character from: ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 - . : SPACE Also account for mannequin characters where applicable. IMPORTANT: Timestamp mannequin currently contains `X` in `202X.12.12`. Serial mannequin uses `XXXX-XXXX`. X is already covered by A–Z. If any existing development mannequin requires another character, report it. Determine whether fixed prebuilt subsets are simpler than runtime font subsetting. Human preference strongly favors: build the tiny tool once → ship it → runtime stays stupid Do NOT build a runtime general-purpose font subset engine unless SOURCE evidence shows it is actually simpler. ================================================== YOUR JOB — PART D MANNEQUIN / SLOT GEOMETRY ================================================== Audit how font choice affects existing Token reservation geometry. Especially inspect: Counter: - explicit digits × 1ch reservation - alignment - L/M/S Timestamp: - mannequin measured presentation - Date / Time / Date & Time - L/M/S Serial: - XXXX-XXXX - L/M/S - bold / italic / underline if currently applicable Compare: - monospaced/typewriter font - proportional sans - proportional serif/editorial-style font Determine the smallest reliable rule for ensuring that an ACTUAL valid value fits the Design-time reserved slot. Do NOT solve this by re-typesetting surrounding Unicode Human Text at issuance. Possible technical questions include: - measured mannequin geometry - maximum valid glyph/run width - fixed reserved slot per selected font/style - alignment inside the slot These are investigation questions, not instructions to invent machinery. If actual-value width can exceed current mannequin width for a candidate font, identify it explicitly. ================================================== YOUR JOB — PART E LINKED + INDIVIDUAL FONT AUTHORITY ================================================== Read current Token Machine and relevant existing link/palette SOURCE. Find the smallest persistence/UI shape that can represent: - collective linked Token Font - individual Token Font exceptions without creating a second Token authority. Determine: - what existing saved Token structures can naturally carry font identity - whether one shared/default font + per-Token override is simplest - whether existing per-Token definitions already provide a suitable home - how link/unlink should affect existing individual selections - whether OFF / unavailable Token behavior needs any special treatment - whether font choice should survive SAVE → Working → Refill → Stock Do NOT decide new product semantics where Human has not spoken. If multiple materially different behaviors are possible, return them for Human decision. Do NOT silently choose. ================================================== PRESERVE ================================================== Preserve: - raw editable Text authority - design.text_objects - design.token_symbols - short-marker grammar - Counter / Timestamp / Serial product semantics - existing Token size/color/alignment/style behavior - Common Switchboard boundaries - Working / Refill / Stock - current paper-axis behavior - fixed Text bake direction - Design-side measured Token slot direction Do NOT introduce: - CJK PDF font machinery - general typography engine - arbitrary user-uploaded fonts - server font discovery - browser-local-font harvesting - runtime font marketplace/catalog - wrapping engine - second editable Text authority - production real-value bridge ================================================== HUMAN DECISIONS VS TECHNICAL DECISIONS ================================================== In your report, separate clearly: A. HUMAN DECISION REQUIRED Only matters that genuinely change visible product behavior, user choice, or product burden. B. TECHNICAL DISPOSITION Things the technical team can reasonably choose from SOURCE/evidence without asking Human to select implementation plumbing. Human wants to hear the technical overview too. Do NOT hide technical choices merely because Human approval is unnecessary. ================================================== REPORT ================================================== Return: 1. exact relevant DEV166 SOURCE furniture/persistence path 2. viable real Token font candidates/categories 3. verified license/distribution status 4. ASCII subset feasibility 5. actual/estimated resource sizes 6. practical number/range of font tastes 7. Browser @font-face compatibility 8. tiny PDF builder compatibility 9. mannequin vs actual-value geometry findings 10. proportional-font overflow risks 11. smallest safe Token-slot rule 12. linked + individual persistence model 13. smallest UI model at Token Machine bottom 14. SAVE / Working / Refill / Stock implications 15. technical recommendation 16. HUMAN DECISION REQUIRED 17. TECHNICAL DISPOSITION 18. STOP / WATCH 19. whether the next step can be a construction-ready blueprint CONSTRUCTION: NONE. Human shorthand: 「Tokenの活字はKaiaが持つ★ 英数だけなんだから、ちょっとくらい洒落させたい。 タイプライターとか新聞っぽいのとか、 ちゃんと顔の違うやつを程々に。 一括で揃えるのも、Tokenごとにバラすのも欲しい。 でもフォント屋を開業する気はない。 何種類くらいなら竹トンボのまま遊べるか、 実物・容量・ライセンス・穴幅まで見て帰ってこい★」 [ASSISTANT] 🕊️受領ー。 今回は**DEV166 exact SOURCE + 実在フォント候補の配布条件まで照合**した。施工・subset生成・font download/packageはしてない。 先に大枠。 > **これはかなり竹トンボのまま遊べる。** > > variable repertoireが > `A–Z / 0–9 / - . : SPACE` > まで固定されたことで、**4〜6 taste程度なら「フォント屋」にならず、ちゃんとデザイン機能として成立する見込みが強い。** > > しかも、**Design mannequinとPDF actualで同じKaia-owned subset fontを使う**構造なら、前回のToken穴geometry問題とも綺麗につながる。 ただし一個「あれ?」ではなく**施工前WATCH**あり。 **現在Counterだけ `digits × 1ch`、Timestamp/Serialはmannequin実測幅。比例フォントを入れるなら、mannequin文字列の幅=全valid actual値の最大幅とは限らない。** したがって「mannequinを見た幅そのもの」ではなく、**selected Token Fontごとのsafe slot width**をDesign側で確定して測る必要がある。 --- # 1. DEV166 SOURCE furniture / persistence 現在のToken authorityは非常に小さい。 `design.token_symbols` ↓ `sanitize_token_symbols()` 各definitionに現在保存されるのは: **Counter** `type / size / align / zero / color` **Timestamp** `type / form / size / color` **Serial** `type / size / color / bold / italic / underline` これが既存design payloadに乗って、 **SAVE → Working / Refill / Stock** を既存経路で移動する。 新しいtable/registryは不要。 Presentationは、 `text_objects[].content` → `kpdfTokenize()` → `kpdfResolveToken()` → `kpdfBuildPresentation()` で、System Tokenだけ `.kpdf-system-value` spanになる。 つまりfont identityを置く自然な場所は既にある。 --- # 2–5. 実在Token Font候補 今回は「最終採用候補」ではなく、**本当に配布できそうな顔の違う実物 witness**として見た。 ### IBM Plex Sans — neutral / modern IBM公式repository。PlexはSans / Serif / Mono等を持ち、OFLで公開されている。citeturn0search1 **用途候補:** neutral / modern **format:** TTF等あり **必要glyph:** 全部coverage可能 **subset:** OFL上modified fontとして可能 **Browser:** `@font-face`可能 **PDF:** TTF subsetをtiny builderで使える候補 Plex familyだけでも複数tasteを作れるが、Humanの「ちゃんと顔が違う」を考えると全部Plexで揃える必要はない。 --- ### Courier Prime — typewriter これはかなりHuman例に直球。 公式project自身が**monospaced screenplay font**として公開していて、SIL OFL 1.1。citeturn1search0turn1search1 **用途候補:** typewriter **format:** TTFあり **coverage:** required ASCII問題なし **subset:** OFL上可能 **Browser/PDF:** 両方いける typewriter tasteの技術witnessとしてかなり綺麗。 --- ### Source Serif — editorial / newspaper-ish Adobe公式。本文組版向けのopen-source serifで、OFL 1.1。releaseにはOTF / TTF / WOFF / WOFF2もある。citeturn1search2turn1search3 **用途候補:** editorial / print **format:** TTF/OTF **coverage:** required ASCII問題なし **subset:** OFL上可能 **Browser/PDF:** 同resource由来で可能 新聞そのものを模倣する必要なく、**明確なserif editorial taste**として十分差が出る。 --- ### Bebas Neue — condensed/display Dharma Type公式repository。display/headline用でOFL 1.1。citeturn1search5turn1search15 これは、 **neutral / typewriter / editorial** とはかなり違う顔を作れる。 required repertoireがuppercaseのみなので、今回のToken用途とはむしろ相性がいい。 **用途候補:** condensed / label / bold-display **coverage:** A–Z, digits, punctuationについて採用前glyph audit必要 **license/subset:** OFL上可能 **exact punctuation coverage:** 今回binaryを取得していないため **UNVERIFIED** したがって候補席には置けるが、施工前glyph witness必須。 --- ## ライセンスについて OFL 1.1は、font softwareの**使用・変更・embedding・redistribution**を許可し、modified versionも条件付きで配布できる。Notoの公式license textでもこの点を確認できる。citeturn0search0 したがって、 **必要glyphだけ残したprebuilt Token subsetをKaia pluginへ同梱** という形そのものはOFL-compatible。 ただしmodified subsetでは**Reserved Font Name条件**に注意が必要。fontごとのcopyright/license noticeもpluginに保持する。 これは採用時license ledger対象。 --- # 3–4. ASCII subset feasibility **かなり高い。** 必要集合: `ABCDEFGHIJKLMNOPQRSTUVWXYZ` `0123456789` `- . : SPACE` 合計40 glyph前後+`.notdef`等font内部必須glyph。 mannequinも、 - Counter: digits - Timestamp: `202X.12.12`, `12:34:56` - Serial: `XXXX-XXXX` なので追加Unicodeなし。 したがって、 > 開発時に一度だけsubsetを生成 > → QA済み固定font assetをpluginへ同梱 > → runtimeではsubset処理ゼロ がHumanの **「道具を一回作って、実機は馬鹿でいい」** に一番合う。 Runtime font subset engineは**不要**。 --- # 5–6. resource size / 何tasteまで竹トンボか ここは正確なsubset binaryを今回は作ってはいけないので、 **measured subset size = NOT MEASURED** とする。 元font sizeもcandidate/version/fileを固定してdownloadしていないため、正確値は**UNVERIFIED**。 ただし構造的にはCJK fontとは全く違う。 40数glyphしか保持しないstatic TTF subsetなら、通常は**数十KB級を狙える**規模。ただしこれは今回の実測値ではなくtechnical estimate。 したがって現時点の負担感: | Taste数 | Plugin負担 | 保守負担 | 評価 | |---:|---|---|---| | 1–3 | 非常に軽い | 非常に軽い | ちょっと寂しい | | **4–6** | **軽い** | **十分管理可能** | **竹トンボ sweet spot** | | 7–8 | サイズ自体はまだ軽そう | QA/選択UIが増える | 境界 | | 10+ | binaryよりcatalog管理が問題 | license/visual QA/UI増 | フォント屋寄り | 面白いのは、 **先に重くなるのは容量じゃなくHuman/UI/QA burden。** 数十KB級assetが6個あることより、 「これは何taste?」「似たの2個いらなくね?」「bold/italic全部保証する?」 の方が先に重くなる。 なので技術的recommendationは**4〜6 taste**。 --- # 7. Browser `@font-face` **YES。** 同梱subset TTFを、 `@font-face { font-family: KaiaToken-...; src:url(...); }` としてDesign mannequinへ使える。 ここが非常に重要。 **同じbinary** → Browser mannequin → measured slot → PDF actual にできる。 つまり「似ている別font」ではなく、**同じKaia-owned resource**をDesign/output両側が読む。 これならslot geometry authorityがかなり強くなる。 --- # 8. tiny PDF builder compatibility **YES、前回結論維持。** しかも今回はCJK Unicodeより遥かに簡単。 required charsはASCII-smallなので、 - complex shapingなし - CJK cmapなし - fallbackなし - Unicode segmentationなし 固定subsetのglyph mappingとwidth tableをbuild-timeで確定してしまえば、runtime PDF側はかなり馬鹿にできる。 つまり、 **general TTF parserをWordPress runtimeへ載せる必要すらない可能性がある。** font asset + precomputed metrics/resource metadataを同梱し、tiny builderは既知glyphだけ扱う。 これはかなり竹トンボ。 --- # 9–11. mannequin / actual geometry ここは今回の一番重要な技術結果。 ## Counter 現在: `width = digits + 'ch'` + `font-variant-numeric: tabular-nums` + alignment。 Monospaceなら非常に安全。 しかし比例fontの場合、 **CSS `1ch` = 基本的に “0” glyph advance由来** であって、全digitの最大幅保証そのものではない。 さらにfontがtabular figuresを実際に提供・適用できるかにも依存する。 したがってcandidate fontごとに、 `0000…` / `1111…` / `8888…` 等を含むvalid domain最大幅 を確認する必要あり。 --- ## Timestamp mannequin: Date `202X.12.12` Time `12:34:56` Full `202X.12.12 12:34:56` これは**見本であってmaximum-width proofではない。** 比例serifなら、 `202X...` より例えば `8888...` の方が広い可能性がある。 actual timestampは数字が変化する。 したがって現在mannequin DOM幅だけをslot widthに採用するとoverflowし得る。 --- ## Serial mannequin: `XXXX-XXXX` actual: `[A-Z0-9]{4}-[A-Z0-9]{4}` 比例fontでは特に危ない。 たとえば一般的に `W` は `X` より広いfontがある。 つまり、 **`XXXX-XXXX` の幅はvalid Serial最大幅を保証しない。** ここは明確なSOURCE/typography WATCH。 --- # smallest safe slot rule 周囲のUnicodeを再組版せずに済ませる最小ルールは: > **selected Token Font + selected size/styleごとに、valid repertoire/domainからsafe maximum run widthをDesign側で確定する。** > > そのwidthをreserved slotとして置き、mannequinはそのslot内部へ既存alignmentで表示する。 > > actual issuanceも同じslot・同じfont・同じalignmentへ置く。 つまり、 **mannequin text width ≠ slot authority** にする。 **slot width = font-specific safe width authority** これなら、 `日本語 [slot] 日本語` の左右をDesign bakeした後にactual値が多少狭くても広くても、穴自体は動かない。 Counter alignmentもそのまま意味を持つ。 --- # 12. linked + individual persistence SOURCEを見る限り、一番小さいのはこれ。 ### Shared default + per-token override Design level: `token_font_default = ` 各 `token_symbols[key]`: `font = ` という形。 ただしschema名は施工図で決めればよく、ここでは概念だけ。 既存Token definitionは既にper-token authorityなので、 **font identityをそこへ足すのが自然。** 第二Token authorityは不要。 --- ## link/unlink behavior ここはHuman Decisionが2通りあり得る。 ### Model A — link is live inheritance Linked token: shared defaultを読む。 Unlink: その瞬間のshared fontをindividual値として引き継ぐ。 以後individual変更可能。 再Link: individual値を保持して眠らせるか、破棄するか。 ### Model B — link action copies ALL選択時に現在fontを各Tokenへコピー。 その後各Tokenは独立値。 これは「linked state」というよりbulk action。 Humanは明確に > linked Tokens may share one selected Token Font と言っているので、SOURCE解釈では**Aの方がHuman語義に近い**。 ただし再Link時にexceptionをどう扱うかはHuman Decision。 勝手に決めない。 --- # 13. Token Machine bottom UI 現在Token MachineはCounter / Serial / Timestampのmember furnitureを既に持つ。 Human指定どおり**その下に一つ小さいFont Palette section**で足りる。 概念上: **Token Font** `ALL/link seat` `[ Font A ][ Font B ][ Font C ][ Font D ]` その下または既存Token memberに、 Counter 🔗 Font A Timestamp 🔗 Font A Serial 🔓 Font C くらい。 既存color-link UIには、 - linked state - private value - toggle visual というinteraction precedentがある。 ただし**color authorityとfont authorityは別schema/別handler**にする。 「見た目の作法だけ借りる」が最小。 --- # 14. SAVE / Working / Refill / Stock `token_symbols` は既にdesign-owned persistent mapで、development historyにも **Working / Refill / Stock / preflight saved-design transportは既存sanitized design payloadを使う** と明記されている。 なのでfont identityもそこへ追加できれば、既存transportに自然に乗る。 shared/default fontがdesign-level fieldなら、それも `sanitize_design()` の同じpayload。 **新DB / option / registry不要。** OFF/unavailable Tokenは、現在もdefinitionが保存され得る構造。 Fontについてもavailabilityを理由に消す必要はない。 ただし「OFF席をpalette link対象として数えるか」はUI semanticsなのでHuman Decision候補。 --- # 15. Technical recommendation 技術側としてはかなり明確。 **4〜6個程度のKaia-owned fixed ASCII subset fonts。** それぞれ: - static subset TTF - fixed internal Kaia font ID - fixed glyph repertoire - precomputed widths/metrics - Browser `@font-face` - PDF same font - runtime subsetなし - host font discoveryなし そしてToken slotは、 **selected font/style/sizeのsafe maximum width** をDesign側で予約。 mannequinはその中に表示。 これなら、 **Design Font A → Font Aで穴測定 → Font Aでactual発行** が保証できる。 --- # 16. HUMAN DECISION REQUIRED ここだけHumanへ。 **① Paletteのtaste数 / 顔** 技術sweet spotは **4〜6**。 最終的に何種類・どんな顔を採るか。 候補方向例: neutral / typewriter / editorial serif / condensed display / geometric / heavy-label 具体font selectionは次段。 **② Link解除・再Link時のindividual exception** Unlink時に現在shared値を引き継ぐ、は自然。 再Linkしたとき以前のindividual fontを、 - 覚えておく - sharedへ戻して消す どちらにするか。 **③ OFF / unavailable TokenをALL linkの対象に含めるか** 表示席としてfont selectionを保持させるのか、active Tokenだけ集合扱いするのか。 これはvisible behaviorなのでHuman領域。 --- # 17. TECHNICAL DISPOSITION Humanに聞かず技術側で処理できるもの: - Host fontを使わない。 - Runtime font marketplaceを作らない。 - Runtime subsetterを作らない。 - 固定prebuilt subsetを使う。 - Browser/PDFで同じresourceを使う。 - fixed internal font IDで保存する。 - `token_symbols` existing authorityへper-token font identityを足す。 - shared defaultはdesign payloadへ置く。 - font metricsをbuild-time/static metadata化する。 - mannequin幅そのものをmaximum slot authorityにしない。 - PDF発行時にHuman Unicode surrounding textをreflowしない。 - color plumbingとfont plumbingを統合しない。 --- # 18. STOP / WATCH ⚠️ **WATCH — Serial `XXXX-XXXX` overflow** 比例fontではactual `WWWW-WWWW` 等がmannequinより広くなり得る。 **必ずfont-specific safe slot。** ⚠️ **WATCH — Timestamp** 同様に `202X...` はmaximum proofではない。 ⚠️ **WATCH — bold/italic** Serialには既存Bold/Italicがある。 候補fontがactual bold/italic faceを持つ場合、 **追加font binariesを同梱するのか、synthetic stylingを許すのか** でresource数・metricsが変わる。 ここはcandidate選定時に確認が必要。 特にslot widthはstyle込みで測らないと駄目。 ⚠️ **WATCH — OFL subset naming** subsetはmodified Font Softwareになり得るためReserved Font Name条件をcandidateごとに確認する。 ⚠️ **WATCH — measured sizes** 今回font binaryをdownload/subsetしていないので、 **subset KB数はまだ実測していない。** 「数十KB級」はengineering estimate。施工図前に候補fontを固定したら、**read-only resource witnessとして原本size+actual subset build sizeを測る工程**を一回挟むのが安全。 --- # 19. Construction-ready blueprint next? ### **ほぼYES。ただしfont名をまだ決めない施工図なら。** つまり次に作れるのは、 **Token Font architecture / persistence / link behavior / safe-slot geometryのconstruction-ready blueprint** まで。 実font assetを含む施工図にするなら、その前にHumanが、 1. taste数/方向 2. link exception semantics 3. OFF席 semantics を決め、さらに候補fontを絞った後で**binary glyph/size/license final witness**を取るのが安全。 --- ## CHECK LOG **DEV166 SOURCE:** PASS **Token authority:** `design.token_symbols` **new DB required:** NO **same Browser/PDF font:** feasible **prebuilt ASCII subset:** feasible **runtime subsetter:** unnecessary **recommended palette scale:** **4–6 tastes** **critical geometry:** font-specific maximum safe slot **construction:** NONE ### 🕊️ 補佐向け短縮 > **Token Font、ちゃんとデザイン機能にできる。4〜6顔くらいが竹トンボsweet spot。** > > 実物witnessとしてIBM Plex / Courier Prime / Source Serif / Bebas Neue等、再配布・改変可能なOFL系で明確に違うtasteを作れる候補あり。citeturn0search1turn1search0turn1search2turn1search5 > > 必要文字は40字程度なので、**開発時に固定ASCII subsetを作ってplugin同梱、runtime subsetなし**が最小。 > > 同じsubset binaryをBrowser mannequinとPDF actualで使う。 > > ただし `XXXX-XXXX` や `202X...` の見本幅は比例fontで最大値保証にならない。**selected font/style/sizeごとのsafe maximum slot widthをDesign側で予約**する。 > > Persistenceは既存 `token_symbols` にper-token font、designにshared/default fontで足りる。新DB不要。 > > Human Decisionは主に **paletteの顔/数、再Link時exception、OFF席のALL扱い**。 > > **次はarchitecture施工図まで進められる。font実物採用だけはまだ一段witnessが要る。** これ、だいぶ楽しそうな竹トンボになってきた(笑)🧰★ [USER] ほーい 🕊️ KAIA PDF FREE — DEV166 PDF TEXT / TOKEN FONT SPECIALIST CONTINUATION TOKEN FONT HUMAN DECISIONS LOCK FINAL FONT WITNESS + CONSTRUCTION-READY BLUEPRINT CONTINUE AS THE SAME PDF Text / Token Font specialist. READ ONLY. NO CONSTRUCTION. NO REPAIR. NO PRODUCT REDESIGN. DO NOT PACKAGE OR MODIFY THE PRODUCT. COMMON PARENT Kaia-PDF-Free-v0.1.0-dev166-PAPER-AXIS-LOCKED-PAIR-CONVERSION.zip DEV166 is RUNTIME KNOWN-PASS. ================================================== ACCEPTED TECHNICAL FINDINGS — DO NOT REOPEN ================================================== The previous investigations established: - fixed authored Unicode Text can be baked on the DESIGN side as completed visual/typesetting material - raw editable Text remains Human authority - Human / Token mixed Text is already separated into presentation runs - Design-side Token slot geometry must be captured, not recomputed by PHP - issuance-side variable glyph repertoire is ASCII-small - Counter actual values = digits 0–9 - Timestamp actual values = digits + "." + ":" + ASCII space - Serial actual values = [A-Z0-9]{4}-[A-Z0-9]{4} - production PDF therefore does not need CJK font machinery for variable Token values - Kaia-owned fixed ASCII subset fonts are technically viable - the SAME Token font resource should be used by Design mannequin and PDF actual value - runtime font subsetting is unnecessary - host font discovery is unnecessary - new DB / font registry is unnecessary - existing design/token authority can carry font selection - proportional fonts require a font-specific SAFE SLOT; mannequin text width itself is NOT maximum-width authority - existing color-link behavior may be used as an interaction witness only; color and font plumbing remain separate Do NOT reopen these findings unless exact SOURCE contradicts them. ================================================== CONFIRMED HUMAN DECISIONS ================================================== These are now PRODUCT / HUMAN decisions. Do NOT reinterpret them. -------------------------------------------------- HD-1 — TOKEN FONT IS A DESIGN FEATURE -------------------------------------------------- Token Font is not merely hidden PDF machinery. The user selects Token typography as part of the design. -------------------------------------------------- HD-2 — LOCATION -------------------------------------------------- Token Font selection furniture belongs at the BOTTOM of the existing Token Machine / Token issuance furniture. -------------------------------------------------- HD-3 — FREE PALETTE SCALE / DIRECTION -------------------------------------------------- Kaia PDF Free should provide approximately FIVE clearly different Token font tastes. Current accepted basic direction: - Neutral - Typewriter - Editorial Serif - Condensed / Display - Modern This is a visual-direction decision. It is NOT yet approval of five exact font products. Free does not need a huge catalog. Human principle: 「基本この路線あればよかろう! フリーだし★」 -------------------------------------------------- HD-4 — KAIA-OWNED EMBEDDED TOKEN FONTS -------------------------------------------------- Token fonts may be bundled/owned by Kaia PDF as lightweight resources. Because the valid variable repertoire is ASCII-small, the intended direction is fixed lightweight resources rather than CJK font payloads. -------------------------------------------------- HD-5 — LINKED + INDIVIDUAL -------------------------------------------------- Token Font must support BOTH: - ALL / collective linked font - per-Token individual font A linked Token follows the common selected Token Font. An unlinked Token may select its own font. -------------------------------------------------- HD-6 — RELINK DESTROYS OLD INDIVIDUAL CHOICE -------------------------------------------------- When an individually configured Token is linked back to ALL: - discard its previous individual font choice - do NOT preserve a hidden previous choice - do NOT restore it on a later unlink If ALL is later removed/unlinked, the Token simply starts from the current common font and may then be changed individually. Human principle: 「捨ててしまえ★ リンクが外れただけでいい。 だいたい5択なんだから外れたところでどうということもない★」 -------------------------------------------------- HD-7 — OFF / UNAVAILABLE TOKENS STILL PARTICIPATE -------------------------------------------------- OFF / currently unavailable Token seats remain members of ALL Font linking. Do NOT restrict ALL Font behavior to active Tokens. A Token that is OFF when the common font changes must already follow that common selection when later turned ON. Human reason: 「あとからオンにして追従のがめんどい」 -------------------------------------------------- HD-8 — SAME FONT FOR MANNEQUIN AND ACTUAL -------------------------------------------------- Design mannequin and actual issued Token must use the SAME selected Token font resource. Do not approximate with a similar font. ================================================== YOUR JOB — PART A FINAL REAL FONT WITNESS ================================================== The previous investigation used real candidates as feasibility witnesses, including: - IBM Plex family - Courier Prime - Source Serif - Bebas Neue Those were NOT final product selections. Now narrow to approximately five concrete candidates that best satisfy the confirmed visual directions. For each proposed candidate verify from authoritative sources where possible: - exact font/family - intended Human taste - exact license - redistribution permission - modification/subset permission - Reserved Font Name or equivalent naming restrictions - required attribution/license files - complete glyph coverage for: A–Z 0–9 hyphen period colon SPACE - usable source format - Browser @font-face suitability - tiny PDF builder suitability - whether Bold / Italic requirements create extra resource needs - whether the candidate creates avoidable implementation complexity Do NOT select a famous font merely because it is famous. Prefer: clear visual differentiation + simple licensing + simple subset/resource handling + predictable metrics + low maintenance. If two proposed fonts are visually too similar, say so and recommend the more useful one. Do NOT download/package fonts in this task. ================================================== YOUR JOB — PART B RESOURCE / SIZE WITNESS ================================================== We now need evidence stronger than the earlier engineering estimate. Without modifying the product: - determine original candidate asset sizes where authoritative/reliable evidence is available - determine whether a fixed ASCII-only subset can be produced safely - estimate the expected subset burden only where actual measurement is not possible - clearly label MEASURED vs ESTIMATED If exact subset size cannot be established without actually creating the subset, say so. Do NOT invent precision. We need to know whether approximately five tastes remain comfortably small, not chase the smallest possible byte count. ================================================== YOUR JOB — PART C STATIC FONT RESOURCE MODEL ================================================== Produce the smallest construction-ready resource model. Preferred direction from existing evidence: development/build time: font source → fixed approved ASCII subset → fixed Kaia Token font asset → fixed metrics metadata runtime: load known asset → no discovery → no subsetting → no general font parser if avoidable Determine exactly what static metadata the tiny PDF builder needs. Investigate whether runtime can remain ignorant of general TTF parsing. If some tiny amount of font parsing is unavoidable, identify exactly why. Do NOT build a general typography/font engine. ================================================== YOUR JOB — PART D SAFE TOKEN SLOT MODEL ================================================== Turn the previous safe-slot finding into a construction-ready technical rule. For EACH Token type: - Counter - Timestamp Date - Timestamp Time - Timestamp Date & Time - Serial and for each relevant: - selected Token font - Token size - existing style where applicable determine how safe maximum slot width should be established. The rule must guarantee that every valid actual value fits the Design-time reserved slot without reflowing surrounding Human Unicode Text. Pay special attention to: - proportional digits - wide uppercase letters in Serial - Serial Bold / Italic - alignment inside a slot - Counter configured digit count - Timestamp fixed actual format Determine whether safe widths should be: - precomputed static metadata - calculated Design-side from a finite candidate set - measured Browser-side from deliberately constructed maximum witnesses - or another smaller SOURCE-supported method Choose the smallest technically reliable method. This is a TECHNICAL decision unless it changes visible Human behavior. ================================================== YOUR JOB — PART E LINK / INDIVIDUAL MODEL ================================================== Translate HD-5 / HD-6 / HD-7 into the smallest construction-ready state model. Required visible semantics: ALL linked: - linked Tokens use common font Unlink a Token: - it begins with the current common font - it may then be changed individually Relink: - previous individual choice is discarded - common font immediately becomes authority Later unlink: - no historical font restoration OFF / unavailable: - remains subject to ALL linking - later ON already reflects current common font Find the smallest persistence representation using existing design / token_symbols authority. Do NOT create history stacks, dormant font memories, shadow registries, or extra state merely to remember discarded choices. ================================================== YOUR JOB — PART F TOKEN MACHINE UI BLUEPRINT ================================================== Produce the smallest UI blueprint for the bottom of Token Machine. Need: - approximately five font choices - clear current selection - ALL/link behavior - individual Token exceptions - OFF/unavailable seats remain representable - mobile/touch usability - no giant font catalog - no separate font-management screen Use existing Kaia visual/furniture patterns where useful. Do NOT blindly clone color UI internals. Report what can be reused visually and what must remain independent. ================================================== YOUR JOB — PART G FIXED TEXT BAKE CONNECTION ================================================== Do not redesign the previously accepted fixed Text bake architecture. Only state exactly how the selected Token Font information and safe slot geometry connect to it: raw Text authority → Browser presentation → fixed Human visual bake → transparent/reserved Token slot → saved derived output material → PDF fixed presentation → actual ASCII Token in same selected font Identify the minimum derived information that must accompany the baked presentation. Do NOT implement production real-value wiring. ================================================== HUMAN VS TECHNICAL REPORTING ================================================== Human explicitly wants visibility into technical choices even when Human approval is not required. Therefore separate: A. CONFIRMED HUMAN DECISIONS B. TECHNICAL DECISIONS YOU CAN MAKE FROM EVIDENCE C. ANY NEW HUMAN DECISION ACTUALLY REQUIRED Do NOT turn plumbing choices into unnecessary Human questions. But do NOT hide the technical disposition either. ================================================== PRESERVE ================================================== Preserve: - raw editable Text authority - design.text_objects - design.token_symbols - existing short-marker grammar - Token product formats - existing size/color/alignment/style semantics - Working / Refill / Stock - Common Switchboard boundaries - paper-axis behavior - fixed Text bake direction - Design-side Token geometry authority - existing product availability semantics Do NOT introduce: - CJK PDF font machinery - server font discovery - browser-local font harvesting - arbitrary user font upload - font marketplace - runtime subset engine - general font engine - wrapping engine - second editable Text authority - production real-value bridge - new DB unless exact SOURCE proves unavoidable ================================================== STOP / WATCH ================================================== STOP if: - a proposed font cannot legally be redistributed/subset as intended - a candidate lacks required Token glyphs - proportional-font safe slots cannot guarantee all valid actual values - the model requires surrounding Human Unicode Text to be re-typeset at issuance - link semantics require a second Token authority - the only implementation path becomes a general font/PDF framework WATCH: - Serial Bold / Italic resource multiplication - Reserved Font Name requirements - Browser/PDF metric parity - subset naming - PDF generated size - A4/A5 scaling - rotation interaction with saved slot geometry ================================================== RETURN ================================================== Return: 1. five-ish concrete font candidate recommendation 2. visual role of each 3. verified licensing/distribution table 4. glyph coverage 5. original + subset-size evidence 6. static resource model 7. tiny-builder font requirements 8. exact safe-slot algorithm/rule 9. linked/individual persistence model 10. OFF/unavailable behavior 11. Token Machine bottom UI blueprint 12. fixed Text bake integration 13. SAVE / Working / Refill / Stock implications 14. CONFIRMED HUMAN DECISIONS 15. TECHNICAL DECISIONS 16. NEW HUMAN DECISIONS REQUIRED, if any 17. STOP / WATCH 18. construction-ready status CONSTRUCTION: NONE. Human shorthand: 「5顔くらいで遊べればFreeは十分★ ALLに戻したら昔の個別Fontなんぞ捨てろ。 OFFのやつもALLには最初からつないどけ。 あとは実物の活字と穴幅と保存方法を詰めて、 現場が退屈に施工できるところまで持ってこい★」 [ASSISTANT] ほーい🕊️ **同じText / Token Font担当として続行。DEV166はREAD ONLY、施工・font加工・package変更なし。** 今回はSOURCE側の既知境界を維持したまま、外部については公式/作者repository中心に最終witnessを取った。 先に結論。 > **施工図まで持っていける。** > > Freeの5顔は現実的。 > **Neutral / Typewriter / Editorial / Condensed / Modern** を、固定ASCII subset + 固定metricsで持つ構造なら、runtimeにfont parser/subsetter/font discoveryは要らない。 > > ただし、**5製品を今この場で最終採用LOCKするところだけはまだしない。** > 特にBebas Neue Regularは「Display席」には非常に良いが、既存Serial Italicとの組合せに明確な制約がある。作者自身がopen-source Regularを傾けないよう案内しており、proper italicは商用Pro側。ここは勝手にsynthetic italicを製品仕様にしない。citeturn0search0turn0search5 --- # 1–4. 五顔の concrete witness | Human taste | 第一候補 | 性格 | License | Required ASCII | 判定 | |---|---|---|---|---|---| | Neutral | **IBM Plex Sans Regular** | 素直・UI/工業的 | OFL 1.1 | ○ | **強候補** | | Typewriter | **Courier Prime Regular** | 明確なタイプライター | OFL 1.1 | ○ | **強候補** | | Editorial | **Source Serif 4 Regular** | 紙面・本文・editorial | OFL 1.1 | ○ | **強候補** | | Condensed / Display | **Bebas Neue Regular v2** | 細長い見出し・ラベル | OFL 1.1 | ○ witness要最終binary audit | **条件付き強候補** | | Modern | **Space Grotesk Regular** | contemporary / geometric寄り | OFL 1.1 | ○ | **強候補** | ### Neutral — IBM Plex Sans IBM自身がPlexをUIを含む多用途向けfamilyとして公開しており、Sans / Serif / Mono / Sans Condensed、Romanとtrue italicsを持つ。Neutral席として扱いやすい。citeturn0search4turn1search8 ライセンスはOFL 1.1。ただし**Reserved Font Name = “Plex”**。subsetはModified Versionに当たり得るため、Kaia配布subsetでReserved Nameを使わない設計にする。著作権表示とOFL licenseも同梱する。citeturn1search1 ### Typewriter — Courier Prime Courier Primeはこの5つの中で役割が一番迷わない。Courier系のmonospaced/typewriter顔。 公式project licenseはOFL 1.1。必要ASCII repertoireは用途上問題なし。citeturn0search6 ### Editorial — Source Serif 4 Adobe自身が「様々なサイズ・言語で本文を組む」open-source serifとして提供。歴史的serifの影響も明記されており、Neutral/Modernとは十分顔が離れる。citeturn1search9 OFL 1.1で、**Reserved Font Name = “Source”**。modified subsetはそのReserved Nameをprimary font nameに使わない。license/copyright保持必須。citeturn1search0 Regularだけでなくofficial familyにItalic/Boldが存在することも確認できる。citeturn0search3 ### Condensed — Bebas Neue Regular v2 これはDisplay席として非常に明瞭。作者自身がheadline/caption/titling用display fontと説明している。TTF/OTF/WOFF等が公式repoにあり、v2はOFL 1.1。citeturn0search0turn0search5 ただし既述のItalic WATCHあり。 ### Modern — Space Grotesk Regular Space Mono由来の個性を残した**proportional sans**で、non-displayでも読みやすく調整されたもの。NeutralのPlexとは十分違う現代顔。tabular figuresも持つ。OFL 1.1。citeturn0search2turn1search10 --- # 5. License / subset disposition OFL自体についても確認。 **Fontをsoftwareへbundleすることは許可されている。Font modificationも許可。** Modified fontでReserved Font Nameが宣言されている場合は、その名前を勝手に継承できない。OFL FAQも「変更時にrenameが必要かはRFNの有無による」としている。citeturn0search9 したがってbuild-time subsetは合法な経路を取れる。 ただし施工時には各assetについて、 `upstream font` `upstream version/hash` `copyright` `OFL-1.1` `RFN status` `Kaia subset internal name` を小さいfont ledgerに固定するのが安全。 **Kaiaがfont copyrightを“所有”する、という意味にはしない。** Kaia-owned resourceとは、pluginが固定配布・authorityを持つという意味に留める。 --- # 6. Original / subset size witness 今回**実測できた公式repository上の値**として、IBM Plex Sans Regular TTFは **196 KB**。citeturn1search4 他4候補については、この調査でauthoritative binary sizeを十分な精度で取得できなかったため: **original exact size = UNVERIFIED** とする。 また指示どおりsubsetは実際には生成していないため、 **subset size = NOT MEASURED** 以前の「数十KB級」は依然としてengineering estimateであり、実測値へ昇格させない。 ただし今回の設計判断に必要なのは、 > 5個で何MBになるかを小数点まで知ること ではない。 40字程度+必須font tablesへ固定subsetするので、**5顔がplugin burdenとして異常に巨大化する構造ではない**。最終asset選定後、一度だけoffline subset witnessを作って実測すれば十分。 --- # 7. Static resource model ここはconstruction-readyまで落とせる。 開発時だけ: `approved upstream TTF` → fixed subset build → glyph audit → renamed Kaia Token asset → metrics extraction → immutable asset + metadata runtime: `font-id` → known asset → known metrics → Browser mannequin / PDF actual ### 1 font faceにつき必要なstatic metadata 最低限: - internal `font_id` - asset path - PostScript/PDF internal name - units-per-em - ascent - descent - bbox - required glyph → glyph ID/code mapping - required glyph advance widths - style/face identity - PDF embedding metadata - safe-slot tables - upstream/license identity これを**build-time生成物**として固定する。 --- # 8. tiny builder requirements ### Runtime general TTF parser:**不要にできる** 今回のglyph universeが固定だから。 tiny builderが必要なのは、 1. known font streamをPDF objectへ埋める 2. fixed descriptor/metricsを登録 3. ASCII-small code → known glyphへ対応 4. known advanceでplacement 5. text matrixでposition/rotation 6. existing colorを適用 だけ。 TTFの`cmap/hhea/hmtx/head`等をWordPress requestごとに解析する必要なし。 **Font parserは開発工具側だけ。** これ、竹トンボとしてかなり良い。 --- # 9. Exact safe-slot rule ここは施工仕様として固定できる。 ## 共通原則 **mannequin文字列の実測幅をslot authorityにしない。** 各 `font × size × applicable style × token form` について、valid domainの**最大advance width**をbuild-time static metadataとして持つ。 BrowserはそのwidthをCSS slotへ使用。 PDFも同じnormalized slot widthを使用。 actual値はslot内部で既存alignmentに従う。 --- ## Counter configured digit count = `N` valid glyph = `0–9` font/styleで最大digit advanceを `Dmax` とする。 安全幅: **`N × Dmax`** zero padding有無にかかわらずN桁slotを維持。 現在の`Nch`はpresentation shortcutとして残せても、**safe authorityにはしない**。 --- ## Timestamp Date format固定: `dddd.dd.dd` separator `.` のadvanceを加え、 各digit positionについて最大digit advanceを使用。 つまり: **8 × Dmax + 2 × width('.')** Time: `dd:dd:dd` **6 × Dmax + 2 × width(':')** Date & Time: **DateSafe + width(SPACE) + TimeSafe** これなら全valid timestampを包含。 --- ## Serial format: `CCCC-CCCC` `C ∈ A–Z, 0–9` 各face/styleで、 `Cmax = max advance(A–Z,0–9)` なら: **8 × Cmax + width('-')** で保証できる。 これをRegular/Bold/Italic/BoldItalic等、**実際に許されるstyle faceごと**に算出。 `XXXX-XXXX` はvisual mannequinであってgeometry authorityではなくなる。 --- ## Alignment safe slotは動かさない。 actual runだけを、 - left - center - right 既存Token semanticsに従ってslot内部配置。 これでsurrounding baked Unicodeは一切reflowしない。 --- # 10. Linked / individual persistence HD-5〜7から、状態はかなり簡単になる。 ### Design common authority `token_font_common = font_id` ### Per token 既存 `token_symbols[token]` に概念上: `font_linked = true/false` `font_id = individual value only when unlinked` で十分。 ただしさらに簡素化するなら、 **linked=trueのときindividual `font_id` 自体を消す** のがHD-6に最も忠実。 ### Unlink common fontをそのTokenのindividual `font_id`へコピー。 `linked=false` ### Individual change その`font_id`だけ変更。 ### Relink `linked=true` individual `font_id` **DELETE** 即common authority。 ### 後で再Unlink その時点のcommonを新規コピー。 昔の値は存在しない。 **history stackゼロ。shadow memoryゼロ。** --- # 11. OFF / unavailable HD-7で技術的にも簡単になった。 OFFでも、 `font_linked=true` なら常にcommon authority。 つまりcommon変更時にOFF Tokenへ値をコピーする必要すらない。 **参照先がcommonだから勝手に最新になる。** 後日ON: → current common fontがそのまま表示。 これはかなり事故が少ない。 --- # 12. Token Machine bottom UI blueprint 既存Token Machine最下部に、 **Token Font** という一家具。 大カタログにはしない。 概念的には: `ALL 🔗` `Neutral | Typewriter | Editorial | Condensed | Modern` そしてToken member側に既存link furnitureと同程度の、 `Counter 🔗` `Timestamp 🔗` `Serial 🔗` を持たせる。 個別unlinkしたTokenを選んだ状態では、同じ5-choice paletteが**そのToken authority**を編集。 ALLを選択しているとcommon authorityを編集。 ### mobile 5択なのでdropdownより、**横スクロールしない5席/折返し可能なcompact buttons**の方が既存palette思想に近い。 各buttonはfont名を文字として説明するだけでなく、 **同じmannequin sampleを実fontで描く** とtasteが即分かる。 ただしこれはUI表現案。現在のKaia visual systemに合わせて最終寸法を決めればいい。 ### Colorから借りるもの - ALL/linkの視覚文法 - linked/unlinked stateの理解 - active member indication - palette selection感 ### 借りないもの - color data - color event handlers - ALL color authority - picker plumbing **Fontは独立。** --- # 13. Fixed Text bake connection 最終pipelineはこれで閉じる。 `raw text_objects + token_symbols` → existing tokenizer → Browser presentation → selected Token fontをmannequinへ適用 → **safe slot width適用** → Browserがfinal geometry確定 → Human portionsだけfixed visual bake → Token slot透明 → derived material保存 PDF: `saved fixed visual` + `saved Token slots` + `saved selected font identity` → actual ASCII Tokenを同一fontでslotへ配置 ### derived materialに最低限必要 - baked visual asset reference/data - Text/presentation revision binding - 各Token occurrenceの normalized X/Y/W/H - token identity/type - selected `font_id` - size - applicable style - alignment - rotation relationship raw Text/token definitionsは従来どおりauthority。 **derived materialは編集authorityではない。** --- # 14. SAVE / Working / Refill / Stock Font selection自体はexisting design authorityへ入るので、 SAVE → Working → Refill → Stock の既存design transportへ乗せる。 derived bake materialもsaved design revisionと一緒に運ぶ必要がある。 重要なのは、 **raw design revisionとderived materialを別世代にしないこと。** Text/font/size/token/style等が変わったSAVEではderived presentationを再生成。 古いbakeを新designへ使わない。 --- # 15. CONFIRMED HUMAN DECISIONS 全部そのままLOCK扱い。 - Token Font = visible design feature - Token Machine bottom - Free ≈ 5 tastes - Neutral / Typewriter / Editorial / Condensed / Modern - lightweight Kaia-distributed resources - ALL + individual - unlink → current commonから開始 - relink → individual choice破棄 - later unlink → historical restorationなし - OFF/unavailableもALL member - Design mannequin / actual = **exact same resource** 再解釈なし。 --- # 16. TECHNICAL DECISIONS 技術側で施工図へ固定してよい: - fixed prebuilt ASCII subsets - runtime subsettingなし - runtime host discoveryなし - runtime general TTF parserなし - font asset + static metrics metadata - safe widthはfont/style/token-formごとにprecompute - mannequin widthをauthorityにしない - common + linked flag + unlinked-only individual ID - relink時individual ID削除 - OFF linked tokenはcommonを参照するだけ - surrounding Unicodeをissuanceでreflowしない - Browser/PDF same binary - font/color plumbing独立 - no new DB --- # 17. NEW HUMAN DECISION REQUIRED **大きな新規Human Decisionはない。** 残っているのは「製品仕様を考え直してください」ではなく、**最終font face採用承認**だけ。 ただしその前に技術側で一件片付ける必要あり: ### Bebas Neue × Serial Italic open-source Bebas Neue Regularにはproper Italicがなく、作者もslopingを推奨していない。citeturn0search0 したがって次のfont-finalization witnessでは、 - Condensed席だけSerial italic時に別approved open font faceを使えるか - あるいは最初からproper italicを持つ別Condensed candidateへ交換するか を**技術側で候補比較してからHumanへ最終5顔を見せる**のが安全。 今ここで「synthetic italicでいいや★」とはしない。 --- # 18. STOP / WATCH 🚨 **WATCH — Bebas italic** 上記。施工図に未解決のsynthetic stylingを混ぜない。 ⚠️ **WATCH — RFN** IBM Plexは`Plex`、Source Serifは`Source`がReserved Font Name。subset internal/user-facing namingを分離し、modified subsetをReserved Nameのまま再配布しない。citeturn1search1turn1search0 ⚠️ **WATCH — exact subset bytes** 未生成なのでNOT MEASURED。最終5 face確定後、offline build witnessで測定。 ⚠️ **WATCH — Browser/PDF metric parity** same binaryだけでなく、Browser側でkerning/OpenType featureが勝手にslot calculationへ影響しないよう、**safe-slot authorityはstatic advance metadata**に置く。 ⚠️ **WATCH — rotation** slot X/Y/W/Hはpaper-normalized geometryとrotation relationshipを一緒に持つ。回転後bboxを「穴そのもの」と誤認して二重回転させない。 ⚠️ **WATCH — A4/A5** safe slotはdesign-paper normalized geometryから出力paperへscale。A5で別font metrics計算をしない。 --- # 19. Construction-ready status ### **ARCHITECTURE: CONSTRUCTION-READY** ### **FONT RESOURCE PIPELINE: CONSTRUCTION-READY** ### **SAFE-SLOT RULE: CONSTRUCTION-READY** ### **LINK/PERSISTENCE MODEL: CONSTRUCTION-READY** ### **UI MODEL: CONSTRUCTION-READY** ### **ACTUAL FIVE FONT ASSETS: ONE FINAL WITNESS REMAINS** 残作業は狭い。 **Condensed/Display席のItalic問題を解消した5-face final set** → exact upstream binaries/version → required glyph audit → RFN audit → offline subset-size measurement → hashes/metrics → Humanに最終5顔提示 ここまで取れたら、現場はかなり**退屈に施工できる**(笑)。 ### CHECK LOG **DEV166:** READ ONLY **External witness:** upstream/author repositories + OFL text **Five-taste feasibility:** PASS **Static subset architecture:** PASS **Safe-slot finite proof:** PASS **ALL/individual state model:** PASS **Second Token authority:** NONE **CJK PDF machinery:** NONE **Construction:** NONE **STOP:** none requiring architecture return **WATCH:** Bebas Neue Italic / RFN / final measured subsets 🕊️補佐へ一言なら、 > **設計は施工図まで閉じた。5顔も軽量固定subsetで成立。穴幅はmannequin実測ではなく、font/style/token形式ごとの有限最大advanceをbuild-timeで証明して固定する。ALLはcommon参照、unlink時だけ個別値を持ち、relinkで個別値を物理的に捨てる。OFFもcommon参照だから後追い同期不要。残件はDisplay席のItalic対応を含む最終5 font face witnessと、subset実測だけ。** 🧰★ 活字工場じゃなくて、だいぶ**活字箱**まで縮んだ。 [USER] 🕊️ 🕊️ KAIA PDF FREE — DEV166 PDF TEXT / TOKEN FONT SPECIALIST CONTINUATION CONDENSED ITALIC RESOLUTION FINAL FIVE-FACE RESOURCE WITNESS CONTINUE AS THE SAME PDF Text / Token Font specialist. READ ONLY AGAINST THE PRODUCT. NO PRODUCT CONSTRUCTION. NO PRODUCT REPAIR. NO PRODUCT REDESIGN. DO NOT MODIFY OR PACKAGE DEV166. COMMON PARENT Kaia-PDF-Free-v0.1.0-dev166-PAPER-AXIS-LOCKED-PAIR-CONVERSION.zip DEV166 is RUNTIME KNOWN-PASS. ================================================== ACCEPTED CHECKPOINT — DO NOT REOPEN ================================================== The previous investigation closed the architecture. CONSTRUCTION-READY: - approximately five Token Font tastes - fixed prebuilt ASCII subsets - no runtime subsetting - no host font discovery - no runtime general font parser - same font resource for Browser mannequin and PDF actual - static metrics metadata - font/style/token-form-specific safe slot - mannequin text width is NOT slot authority - common ALL authority + per-Token unlink - unlink starts from current common font - relink physically discards individual font choice - later unlink does not restore history - OFF/unavailable Tokens remain ALL members - no new DB - no CJK PDF machinery - no surrounding Unicode reflow Confirmed Human palette direction: 1. Neutral 2. Typewriter 3. Editorial Serif 4. Condensed / Display 5. Modern Current strong witnesses: Neutral: IBM Plex Sans Regular Typewriter: Courier Prime Regular Editorial: Source Serif 4 Regular Condensed / Display: Bebas Neue Regular v2 — WATCH Modern: Space Grotesk Regular ================================================== WHY THIS FINAL WITNESS EXISTS ================================================== One narrow technical issue remains before actual font resources can be locked. Bebas Neue Regular is a strong visual fit for the Condensed / Display seat, but the previous witness found: - open-source Regular does not provide the proper Italic face needed to naturally cover existing Serial Italic behavior - author guidance does not support casually solving this by synthetic sloping - commercial Pro availability must NOT silently become a Free dependency Do NOT ask Human whether synthetic italic is acceptable yet. First determine whether a technically cleaner open/distributable Condensed / Display candidate can remove the question entirely. Human should not be burdened with plumbing if a clean technical choice exists. ================================================== YOUR JOB — PART A CONDENSED / DISPLAY REPLACEMENT SEARCH ================================================== Find a SMALL number of realistic open/distributable alternatives for the Condensed / Display seat. The desired visual role remains: - clearly narrower / display-oriented than Neutral - useful for short Counter / Timestamp / Serial typography - visibly distinct from Typewriter, Editorial and Modern - suitable for Kaia PDF Free - not a giant font-family burden Strong preference: - proper Regular - proper Italic - proper Bold if existing Serial style requires it - proper Bold Italic if needed to preserve combinations without synthetic styling Verify from authoritative upstream/author sources where possible: - exact font/family - exact available faces - license - redistribution - modification/subsetting - Reserved Font Name restrictions - required notices - TTF suitability - complete required Token glyph repertoire Required repertoire: ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 - . : SPACE Do NOT select a replacement merely because it has the word "Condensed" in its name. Its visual role must actually remain useful as the fourth distinct Free taste. ================================================== YOUR JOB — PART B EXISTING SERIAL STYLE AUTHORITY ================================================== Read exact DEV166 SOURCE again only as necessary to establish what Token Font resources must support. Determine precisely how current Serial: - Bold - Italic - Underline are represented/applied in Browser presentation. Separate: - actual font-face requirement - CSS/presentation effect - PDF-side requirement Especially answer: Does preserving current Human Serial Bold/Italic semantics require separate real Bold / Italic / BoldItalic font resources? Or can any existing behavior be reproduced without silently changing the visible product semantics? Do NOT invent synthetic styling as an accepted solution. Underline should be classified separately because it may not require a font face. ================================================== YOUR JOB — PART C FINAL FIVE-FACE TECHNICAL SET ================================================== After resolving Part A/B, return the strongest technical five-face set. For each seat: - exact upstream font - exact face(s) actually required - visual role - required Token glyph coverage - license - RFN/naming disposition - Browser suitability - tiny PDF suitability - number of bundled subset binaries required - style implications If the previous candidate remains best, retain it. Do NOT replace a good candidate merely to make the report look new. ================================================== YOUR JOB — PART D RESOURCE SIZE MEASUREMENT ================================================== Previous subset size was only ESTIMATED. Now obtain stronger resource evidence. This is still NOT product construction. You MAY create disposable LOCAL/OFFLINE witness subsets outside DEV166 solely if necessary to measure the proposed fixed resources. If you do: - never insert them into DEV166 - never package them as product assets - never call them approved product fonts - record the exact upstream source/version - record the subset command/tool/method - include all required Token glyphs - include any structurally required glyphs/tables - hash the disposable witness outputs - report measured byte sizes - delete nothing from the product If authoritative downloadable font binaries are unavailable or their licensing/source identity cannot be established confidently: STOP that candidate rather than substituting an unofficial mirror. Clearly distinguish: MEASURED AUTHORITATIVE UPSTREAM REPORTED ESTIMATED UNVERIFIED ================================================== YOUR JOB — PART E STATIC METRICS WITNESS ================================================== For the proposed final resources, determine whether the build-time tool can produce all static metadata previously required: - internal font_id - safe PDF/internal font name - units-per-em - ascent - descent - bbox - glyph mapping for required repertoire - glyph advances - style/face identity - safe-slot widths - upstream/version/license identity - asset hash Do NOT build runtime parsing machinery. If one candidate requires special runtime treatment that the others do not, report it as a disadvantage. ================================================== YOUR JOB — PART F SAFE-SLOT STYLE CHECK ================================================== Reconfirm the already accepted finite maximum-width rules against the actual proposed face set. Especially check Serial: Regular Bold Italic Bold Italic where those combinations are genuinely part of existing semantics. For each actual face: Cmax = max advance(A–Z, 0–9) SerialSafe = 8 × Cmax + width("-") Counter and Timestamp retain the previously accepted finite rules. No brute-force enumeration of every Serial string is required if the advance proof is sufficient. Do NOT change the safe-slot architecture. ================================================== HUMAN DECISION BOUNDARY ================================================== Human has already approved the five visual directions. Do NOT return implementation plumbing as a new Human question. If a clean Condensed / Display replacement exists and preserves existing style semantics, choosing the technically strongest candidate is a TECHNICAL RECOMMENDATION. Human only needs the final visible five-face set shown for confirmation. Return a NEW HUMAN DECISION only if: - preserving existing Serial semantics forces a genuine visible tradeoff - the fourth taste must materially change - Free product burden changes substantially - no clean open/distributable solution exists ================================================== DO NOT REOPEN ================================================== Do NOT reopen: - fixed Text bake architecture - Unicode/CJK PDF decision - Token repertoire - ALL/unlink/relink semantics - OFF/unavailable semantics - safe-slot architecture - Common Switchboard - production real-value bridge - Sample Mask - paper-axis work - JPG/publication - unrelated Text operation UI ================================================== RETURN ================================================== Return: 1. exact Serial Bold/Italic/Underline SOURCE witness 2. Condensed / Display alternatives compared 3. technically preferred fourth-seat candidate 4. final recommended five visible tastes 5. exact required font faces per taste 6. verified license / redistribution / RFN status 7. complete glyph audit 8. original resource size evidence 9. disposable subset measurement, if safely obtainable 10. hashes/version/source identity for measured witnesses 11. static metrics availability 12. safe-slot style verification 13. total approximate/measured plugin font burden 14. Browser/PDF parity assessment 15. TECHNICAL DECISIONS 16. NEW HUMAN DECISION REQUIRED, if any 17. STOP / WATCH 18. whether actual font resources are now ready to be locked into the construction blueprint PRODUCT CONSTRUCTION: NONE. Human shorthand: 「Bebasの斜体だけ妙なら、しゃむに変な二択を持ってくる前に ちゃんと斜体を持ってる細長い子を探してこい★ 5顔の方向はもう決まっとる。 実物・ライセンス・必要face・実容量・穴幅まで証明して、 最後は見た目だけ確認できる状態にして帰ってこい。」 [ASSISTANT] 🕊️ **STOP報告ー!** 今回「BebasのItalicだけ片付けるぞ」で入り直したところ、**その前提より一段広い既存候補の穴を見つけたので、しゃむルールどおりそこで手を止めた。** まだsubset生成・容量測定・5顔LOCKまでは進んでない。 ## あれ?:Condensedだけの問題じゃなかった DEV166のSerial SOURCEを再確認すると、現在のpresentationはこうだった。 - **Bold** → `fontWeight = '700'` - **Italic** → `fontStyle = 'italic'` - **Underline** → `textDecoration = 'underline'` 保存authorityにも `bold / italic / underline = on|off` が独立して存在する。 つまり既存Human semanticsとしてSerialは少なくとも、 **Regular / Bold / Italic / Bold+Italic** の4組合せを取り得る。 Underlineだけはfont faceではなくpresentation decorationなので、別font binaryは不要。 ここまでは想定どおり。 ところが、前回の最終候補をこの条件でもう一度見ると―― ### Modern候補の Space Grotesk に proper Italic がない 公式upstreamはSpace Groteskを5 weightsのfamilyとして公開しているが、Italic追加は現在もopen enhancementになっている。公式repoにもBold等はある一方、proper Italic familyは存在しない。citeturn3search0turn3search4 つまり前回の > Bebas NeueだけItalic WATCH では足りなかった。 **Space Groteskも同じく、DEV166 Serial Italicをreal faceで保持できない。** ここで、 「じゃModernだけsynthetic italic★」 を混ぜると、今回明示された > Do NOT invent synthetic styling as an accepted solution. に引っかかる。 --- ## 一方、Condensedの綺麗な交換候補は見つかった STOPする直前までに確認できた範囲では、**Barlow Condensed** がかなり綺麗。 作者公式Barlow familyは、 - Normal - Semi Condensed - **Condensed** の3 widthを持ち、**各widthに9 weights × Roman/Italic** がある。citeturn1search0turn1search4 さらにGoogle Fonts側のupstream witnessでも、Barlow Condensed v1.408について作者repo・tag・commitまで追跡され、prebuilt Condensed binariesが存在すると確認されている。citeturn1search3 したがって必要な4 face、 - Barlow Condensed Regular - Barlow Condensed Italic - Barlow Condensed Bold - Barlow Condensed Bold Italic を**syntheticなし**で揃えられる。 Licenseも作者公式で **SIL OFL 1.1**。citeturn1search2 なので、 **Bebas Neue → Barlow Condensed** は技術的にはかなり綺麗な第四席replacement候補。 --- ## なぜここで止めたか 今回の依頼は最終的に、 > final five-face resource witness > actual font resources ready to lock まで持っていくもの。 ところが今、 **4番席だけ直して5顔LOCKすると、5番席Modernに同じItalic欠損を残したまま施工図へ渡す** ことになる。 これは後工程でまた同じ穴を踏む。 だから私はここで、 > 🛑 **「Bebasだけじゃなかった。Space Groteskにもproper Italicがないよー!」** を持って帰ってきた。 原因掘り・勝手なModern replacement探し・subset生成には進んでない。 ### 現在地点 | Seat | Candidate | 4-face Serial requirement | |---|---|---| | Neutral | IBM Plex Sans | 前回候補、再最終audit待ち | | Typewriter | Courier Prime | 前回候補、再最終audit待ち | | Editorial | Source Serif 4 | 前回候補、再最終audit待ち | | Condensed | **Barlow Condensed** | **clean replacement発見** | | Modern | Space Grotesk | 🚨 **proper Italicなし** | **PRODUCT CONSTRUCTION: NONE** **FONT SUBSET: NONE** **DEV166 MODIFICATION: NONE** **STOP boundary: Modern candidateにもSerial Italic face欠損を発見** なので次は、しゃむ/補佐から「Modern席も同じ条件で代替を探してよし」が来れば、**5席全部を Regular / Bold / Italic / BoldItalic 条件で横並び再監査 → disposable subset実測 → hash/metrics → 最終5顔witness**まで一気に閉じられる。 今回はここで工具置いたー🧰✋ [USER] あー、装飾な! うん どーすんのがいいと思う? 装飾は元はWP依存フォント計画だったからなんよ。 もしぶつかるようならアンダーライン以外は潰してもいいかと? アンダーラインもしんどいなら なんちゃってアンダーラインでフォントとして組まなくてもいいんだが(笑) [ASSISTANT] あーー、なるほど(笑) **Bold / Italic は「Serialという値の意味」じゃなく、元々WP側の見た目装飾だった**のね。 それなら私は、かなり強く **潰す方を推す**。むしろ今回の固定Token Font化では、その方が設計が綺麗。 ### 私ならこうする **Token Fontの可変装飾は Underline だけ残す。Bold / Italic は退役。** 理由は、5顔そのものがもうデザイン選択だから。 たとえば、 - Neutral - Typewriter - Editorial - Condensed - Modern を選べる時点で、Tokenの「顔」は十分変えられる。 そこへさらに各fontについて `Regular / Bold / Italic / BoldItalic` を保証すると、**5フォントではなく最大20 face資源の面倒を見る**ことになる。 容量だけじゃなく、 - Browser/PDFで同一face保証 - subset 20本 - metrics 20組 - safe-slot 20組 - license/source/hash 20組 - BoldItalicまで本当に存在するfontだけに候補を制限 となる。 **竹トンボに変速機が付き始める(笑)** 一方、Bold / Italicを退役させれば、 > **1 taste = 1 approved Regular face** で閉じる。 そうするとSpace GroteskもBebas Neueも、さっきのItalic問題そのものが消える。 --- ### Underlineはfont resourceにしなくていい これは残していいと思う。 Underlineは元SOURCEでもfont faceじゃなく、 `textDecoration = underline` だから、もともとBold/Italicとは種類が違う。 PDF側でもfont glyphとして持つ必要はない。 **Token runのbaseline/metricsから線を一本描けばいい。** 概念的には、 `actual token glyphs` + `下に細いline` だけ。 だから「なんちゃってUnderline」というより、PDFではむしろ普通に**drawing primitiveとしてunderlineを再現**すればいい。 Browser mannequin: CSS underline PDF actual: PDF line drawing にして、位置・太さだけstatic Token metricsに決める。 これならfont resourceを増やさない。 --- ### さらに軽くするなら Underlineまで捨てる必要は、**今のところない**と思う。 Underline一個のためにfont familyが増えるわけでもないし、safe-slot **width**にも基本影響しない。 だから負担の差はかなり大きい。 **Bold / Italic** → font selection・metrics・safe slot・resource数に波及する **Underline** → 最後に線一本 なので私の技術案は: > **Serial Bold:退役** > **Serial Italic:退役** > **Serial Underline:維持(presentation decorationとして描画)** が一番バランスいい。 --- これ、Human DecisionとしてLOCKしてもらえるなら、さっきのSTOPは綺麗に解除できる。 その場合は次の鳩に、 > **既存Serial Bold/Italicは、WP依存font時代のpresentation decorationとして退役。Token Font paletteへの移行後はfont taste自体をデザインauthorityとする。Underlineのみ維持し、font faceではなくBrowser/PDF presentation decorationとして実現する。したがって各Token Fontに必要なのはRegular 1 faceのみ。** と渡せる。 すると私は **「全候補にBold/Italicあるか?」を調べなくてよくなる**ので、5顔をRegular一本ずつで最終witnessできる。 そしてDisplay席は―― **Barlow Condensedに交換必須ではなくなる。Bebas Neueも再び普通に候補へ戻る。** こっちの方がFreeらしくて、だいぶ好きだぞ(笑) **5種類の活字箱+定規一本(Underline)で終わる★** 🧰 [USER] まあ… こんなのでもいいんよ なんたらフォント なんたらフォント ぼーるど なんたらフォント いたりっく なんたらフォント ぼーるど、いたりっく みたいなやつ [ASSISTANT] あっ、**それなら話が違うわ(笑)** しゃむが言ってるのは「Bold/Italicを装飾スイッチとして5フォント全部に強制対応」じゃなくて、 > **Regular / Bold / Italic / Bold Italic を、それぞれ別の“顔”としてPaletteに並べても構わない** ってことだな。 それ、かなりアリ。 たとえば5席を、 - なんたら Regular - なんたら Bold - なんたら Italic - 別のなんたら Condensed - 別のなんたら Typewriter みたいにしていい。 あるいは同familyが見た目として十分違うなら、 **「同じfamilyのBoldも一個のデザインFont」** として普通に1席消費してよい。 これなら構造がめちゃくちゃ単純になる。 ### Token Fontのauthorityを一本化できる 今まで考えてた、 `font = Bebas` + `bold = ON` + `italic = ON` じゃなくて、 `token_font_id = kaia-token-04` だけ。 その `04` の実体がBold Italicなら、それで終わり。 つまりPDFもBrowserも、 **選択された完成faceをそのまま使う。** Bold合成なし。 Italic合成なし。 BoldItalic合成なし。 safe-slot metricsも、 `font_id × Token type × size` だけで済む。 **style軸そのものが消える。** これはさっき私が提案した「Bold/Italic全部退役」より、しゃむの元の遊びを残せるのに機械はほぼ同じくらい小さい。 --- で、既存SerialのBold/Italicスイッチはどうするかというと、私はここだけ整理したい。 **旧Bold/Italicスイッチは退役させる。** 代わりにその見た目の選択肢を、必要ならToken Font Palette側へ吸収する。 つまり、 > 「このTokenを太字にする」 ではなく > 「この太い顔のToken Fontを選ぶ」 になる。 これなら**Font Paletteがデザイン機能**というHD-1とも綺麗に一致する。 Underlineだけは別。 Underlineは「Fontの顔」というより装飾だから、 **Font Palette 5択 + Underline ON/OFF** で残してよさそう。 PDFでは線一本だから軽い。 --- そしてこれなら候補選定も自由になる。 「全familyがRegular/Bold/Italic/BoldItalicを全部持ってないと失格」 という縛りがなくなる。 **その一個のfaceそのものが配布可能で、required ASCIIを全部持ち、Browser/PDFで同じbinaryを使えれば合格。** だから例えば、 Neutral → Regular Typewriter → Regular Editorial → **Italic** ← これを味にしてもいい Condensed → Bebas Neue Regular Modern → **Bold** みたいなのも可能。 5席しかないFreeだからこそ、**familyを揃えるより5枚の顔をちゃんと離す**方が面白いと思う。 🕊️ 補佐へLOCK候補として渡すなら: > **Token Font Paletteはfont family+Bold/Italic装飾の組合せではなく、完成済みfont faceそのものを選択単位としてよい。Regular / Bold / Italic / Bold Italicは、必要に応じてそれぞれ独立したPalette faceとして採用可能。旧Serial Bold/Italic装飾authorityはToken Font Paletteへ統合・退役可能。Underlineのみ独立presentation decorationとして維持可能。これによりruntime synthetic stylingおよび全familyの4-style保証は不要。safe-slot authorityもselected face単位に固定できる。** これならさっきのSTOP、**かなり綺麗に解ける**ぞ★ 「5フォントfamily」じゃなくて、正確には**Kaiaが選んだ5枚の活字面**だな(笑)🧰 [USER] 既存は配線きればええやろ? そもそも仕様ちがうし。 んでアンダーラインだけ☑やったらよかろ? [ASSISTANT] うん。**それでええと思う★** むしろ一番素直。 既存Serialの - Bold - Italic - Bold + Italic は、**旧仕様の装飾配線を切って退役**でいい。データ構造まで大掃除する必要もない。今回のToken Font仕様へ無理に変換・互換させる必要もない。 新仕様は単純に、 **Token Font:5顔から1つ選択** **Underline:☑ ON / OFF** だけ。 Underlineはfont faceに含めず、Browserではpresentation decoration、PDFでは選択Tokenの下に線を描く。だから5顔すべてに「Underline版font」を用意する必要もない。 これならsafe-slotも、 `selected font face × Token type × size` だけ見ればよくて、Bold/Italic軸が丸ごと消える。Underlineは文字幅を変えないから穴幅計算にも入ってこない。 あと重要なのが、**旧Bold/Italicを新Font Paletteへ吸収する必要すらない**ところ。 仕様が違うんだから、 > 旧:Serial固有の Bold / Italic / Underline > ↓ > 新:Token共通の Font Palette + Underline ☑ で境界を切ればいい。 🕊️ **補佐へ渡すHuman Decisionとしてはこれで十分:** > **Serial既存Bold / Italicは旧仕様として配線を切り、Token Font新仕様へ継承しない。Token Fontは選択済み完成faceそのものをauthorityとする。Underlineのみ独立した☑装飾として残す。Underlineはfont resourceを増やさずBrowser/PDF presentation側で適用する。旧Bold/Italicデータの削除・migration等は必要性がSOURCEで証明されない限り行わない。** これならさっきの **Bebas/Space Grotesk Italic問題も消滅**。 次の最終5-face witnessは、各席について**Regular/Bold/Italic family completenessを見る必要なし**。採用する「その一枚のface」だけ、ライセンス・glyph・容量・metrics・safe-slotを証明すれば終わる。 うむ。**活字箱5枚+アンダーライン☑。** Freeならこれで充分遊べる(笑)🧰★ [USER] ほーい🕊️ 🕊️ KAIA PDF FREE — DEV166 TOKEN FONT FINAL FIVE-FACE WITNESS REGULAR-ONLY / UNDERLINE-SEPARATE MODEL CONTINUE AS THE SAME PDF Text / Token Font specialist. READ ONLY AGAINST PRODUCT SOURCE. NO PRODUCT CONSTRUCTION. NO PRODUCT REPAIR. NO PRODUCT REDESIGN. NO DEV166 MODIFICATION. COMMON PARENT Kaia-PDF-Free-v0.1.0-dev166-PAPER-AXIS-LOCKED-PAIR-CONVERSION.zip DEV166 is RUNTIME KNOWN-PASS. ================================================== NEW CONFIRMED HUMAN DECISION ================================================== The previous Serial Bold / Italic compatibility concern is SUPERSEDED. Token Font new specification: - legacy Serial Bold is NOT inherited into Token Font - legacy Serial Italic is NOT inherited into Token Font - disconnect old Bold / Italic behavior from the new Token Font path - selected Token Font completed face itself is the typography authority - do NOT create Bold / Italic / BoldItalic resource variants - Underline remains as an independent checkbox decoration - Underline is applied at Browser/PDF presentation level - Underline must NOT require an additional font resource Legacy saved Bold / Italic data: - do NOT delete it merely for cleanup - do NOT migrate it merely for cleanup - do NOT reinterpret it as Token Font state - leave legacy data untouched unless exact SOURCE proves a separate need Human principle: 「既存は配線を切ればええ。 仕様が違う。 アンダーラインだけ☑で残せばよかろ★」 ================================================== ACCEPTED ARCHITECTURE — DO NOT REOPEN ================================================== - approximately five Token Font tastes - fixed prebuilt ASCII subsets - no runtime subsetting - no host font discovery - no runtime general font parser - Browser mannequin and PDF actual use same font resource - static metrics metadata - safe slot authority is finite precomputed width - mannequin text width is NOT slot authority - ALL/common + individual unlink semantics already confirmed - OFF/unavailable Tokens remain ALL members - no new DB - no CJK PDF machinery - no surrounding Unicode reflow - Underline is presentation decoration, not font-face authority ================================================== FINAL FIVE VISUAL DIRECTIONS ================================================== 1. Neutral 2. Typewriter 3. Editorial Serif 4. Condensed / Display 5. Modern Previous strong candidates: Neutral: IBM Plex Sans Regular Typewriter: Courier Prime Regular Editorial: Source Serif 4 Regular Condensed / Display: Bebas Neue Regular v2 Modern: Space Grotesk Regular Bebas Neue may now remain a valid fourth-seat candidate because proper Italic is no longer a requirement. Do NOT replace any candidate without a technical reason. ================================================== YOUR ONLY JOB ================================================== Finalize the five Regular-equivalent completed faces. For EACH proposed face verify: - exact font/family - exact upstream version/revision - authoritative upstream source - exact usable binary - required glyph coverage: A–Z 0–9 hyphen period colon SPACE - license - redistribution permission - subsetting/modification permission - Reserved Font Name / naming restrictions - required notice/license files - Browser @font-face suitability - tiny PDF embedding suitability - no unusual runtime dependency ================================================== DISPOSABLE SUBSET WITNESS ================================================== You MAY create disposable LOCAL/OFFLINE witness subsets outside DEV166. These are measurement artifacts only. Do NOT: - insert them into DEV166 - package them as product assets - call them approved shipping assets For each candidate, if safely obtainable from authoritative upstream: 1. record exact upstream binary identity/version 2. hash original binary 3. create fixed required-repertoire subset 4. preserve structurally required tables/glyphs 5. record exact subset tool/method 6. hash subset 7. measure exact bytes 8. extract static metrics 9. verify required glyphs survived 10. verify Browser/PDF suitability Clearly label: MEASURED AUTHORITATIVE ESTIMATED UNVERIFIED If an authoritative binary cannot be established safely, STOP that candidate. ================================================== STATIC METRICS ================================================== For each final subset, obtain or prove availability of: - internal font_id - safe internal/PostScript name - units-per-em - ascent - descent - bbox - required glyph mapping - advance width per required glyph - asset hash - upstream/version/license identity - precomputed safe-slot data No runtime font parser. ================================================== SAFE SLOT ================================================== Because Bold / Italic variants are no longer part of Token Font authority, safe-slot proof simplifies to: selected font × selected Token size × Token form Counter: N × Dmax where Dmax = max advance of 0–9. Timestamp Date: 8 × Dmax + 2 × width(".") Timestamp Time: 6 × Dmax + 2 × width(":") Timestamp Date & Time: DateSafe + width(SPACE) + TimeSafe Serial: 8 × Cmax + width("-") where: Cmax = max advance of A–Z and 0–9. Underline must NOT affect slot width. ================================================== FINAL RESOURCE BURDEN ================================================== Return exact measured total size of the five disposable subsets when possible. We are not optimizing for the smallest possible bytes. We only need to establish that five distinct Free tastes remain a reasonable fixed plugin burden. ================================================== HUMAN DECISION BOUNDARY ================================================== Do NOT ask Human implementation questions. Human has already decided the five taste directions and simplified style model. Return to Human only if: - one proposed font is legally unsuitable - required glyphs are missing - a candidate creates unusual runtime complexity - two faces are so visually similar that the five-taste promise becomes misleading - the final visible palette materially changes Otherwise this is technical finalization. ================================================== RETURN ================================================== Return: 1. final recommended five exact faces 2. exact upstream/version/source identity 3. license/RFN/redistribution table 4. glyph audit 5. original binary hash/size 6. disposable subset hash/size 7. subset method/tool 8. static metrics availability 9. safe-slot proof per face 10. total measured five-font burden 11. Browser/PDF same-binary assessment 12. Underline implementation implication 13. legacy Bold/Italic SOURCE isolation note 14. TECHNICAL DECISIONS 15. NEW HUMAN DECISION REQUIRED, if any 16. STOP/WATCH 17. whether the five resources are ready to LOCK into the construction blueprint PRODUCT CONSTRUCTION: NONE. Human shorthand: 「斜体問題はもう消えた★ 5顔とも完成face一枚ずつでいい。 アンダーラインだけ別☑。 実物・ライセンス・字種・実容量・hash・metrics・穴幅まで測って、 この5枚で施工入ってよしと言える状態まで持ってこい。」 [ASSISTANT] ほーい🕊️ **Regular-only / Underline-separate の新Human Decisionを適用して最終witnessを走らせた。** 先に結果だけ。 > **5顔そのものは、この5枚で技術的に維持してよい。** > > 1. Neutral — IBM Plex Sans Regular > 2. Typewriter — Courier Prime Regular > 3. Editorial Serif — Source Serif 4 Regular > 4. Condensed / Display — Bebas Neue Regular v2.000 > 5. Modern — Space Grotesk Regular > > Bold/Italic requirementが消えたので、**Bebas NeueもSpace Groteskも問題なし。** > > ただし今回は最後の「shipping resource LOCK」だけ **未達**。理由は、authoritative binaryの存在・形式・一部original sizeまでは確認できたものの、この環境からupstream TTF binaryを安全に取得して**5本全部のSHA256 → disposable subset → subset SHA256 → 実測byte**まで完遂できなかったため。 > > 指示どおり非公式mirrorへ逃げず、そこで測定だけSTOPした。 > **architecture/font選定にSTOPはない。** ## 1. Final five faces | Seat | Face | 判定 | |---|---|---| | Neutral | **IBM Plex Sans Regular** | KEEP | | Typewriter | **Courier Prime Regular** | KEEP | | Editorial Serif | **Source Serif 4 Regular** | KEEP | | Condensed / Display | **Bebas Neue Regular v2.000** | KEEP | | Modern | **Space Grotesk Regular** | KEEP | 5つは役割も十分離れている。 Plex Sansはneutral/UI寄り。Courier Primeはmonospaced screenplay/typewriter。Source Serif 4は本文用serif。Bebas Neueは作者自身がheadline/caption/titling向けdisplay fontと説明。Space Groteskは別系統の現代的proportional sans。citeturn0search14turn0search10turn0search0turn0search1 **「5種類と言いつつ似たsansばっかり」にはなっていない。** --- ## 2. Exact upstream identity ### IBM Plex Sans Regular Authoritative upstreamはIBM公式repository。 Exact binary path: `packages/plex-sans/fonts/complete/ttf/IBMPlexSans-Regular.ttf` GitHub authoritative witnessでは現在 **196 KB**。citeturn1search0 LicenseはSIL OFL 1.1、Reserved Font Nameは明記された **“Plex”**。citeturn3view0 ### Courier Prime Regular Authoritative upstreamはQuote-Unquote Apps公式repository。 Courier Primeはscreenplay用monospaced fontとして公開され、OFL 1.1。citeturn0search10turn3view3 ここだけ注意: 公式repository自身が、repo内compiled TTFとproduction downloadでWindows display qualityが異なる場合があると明記している。citeturn0search10 したがって**shipping binaryをどちらに固定するかは最終binary witnessで一意に固定する必要あり。** 候補自体の失格理由ではない。 ### Source Serif 4 Regular Adobe公式repository。 現行official release witnessは **Fonts version 4.005**。TTF/OTF/WOFF/WOFF2を提供。citeturn0search3 LicenseはOFL 1.1。 Reserved Font Name: **“Source”**。citeturn0search5 したがってKaia ASCII subsetのprimary font nameへそのまま`Source ...`を残さない。 ### Bebas Neue Regular ここは非常に綺麗に固定できた。 **Bebas Neue v2.000 / Regular / 2018 open-source line**。 作者公式repoはv2.000をOFL 1.1として明示し、TTF/OTF/WOFF/WOFF2等を提供している。citeturn0search2turn0search6 Exact TTF upstream witness: `BebasNeue-Regular.ttf` authoritative repository reported size: **60 KB**。citeturn0search13 さらにGoogle Fonts metadataがこのfaceを、 - weight 400 - normal - PostScript `BebasNeue-Regular` - upstream commit `686d14af640c17af3691c597778f121d840d9051` として追跡している。citeturn0search4 Italic問題は新仕様で完全に対象外。 ### Space Grotesk Regular Authoritative upstreamはFlorian Karsten公式repository。 static TTFとして、 `fonts/ttf/static/SpaceGrotesk-Regular.ttf` が存在することを確認。citeturn1search1 LicenseはOFL 1.1。license headerにはReserved Font Nameの宣言がない。citeturn3view1 Bold/Italic family completenessはもう要件ではないので、Regular completed face一本だけでよい。 --- # 3. License / redistribution / naming 全5候補ともOFL系で、基本条件は同じ。 OFLはfont softwareについて、 - use - embed - modify - redistribute - softwareへのbundle を許可する。一方、modified versionでは宣言済みReserved Font Nameを無断使用できず、copyright notice + licenseを配布物へ保持する必要がある。citeturn3view0turn0search5turn3view1turn3view2turn3view3 | Face | License | Subset | RFN disposition | |---|---|---|---| | IBM Plex Sans | OFL 1.1 | YES | **Plex reserved** | | Courier Prime | OFL 1.1 | YES | license headerにRFN記載なし | | Source Serif 4 | OFL 1.1 | YES | **Source reserved** | | Bebas Neue | OFL 1.1 | YES | supplied OFL headerにRFN記載なし | | Space Grotesk | OFL 1.1 | YES | supplied OFL headerにRFN記載なし | したがってsubset shipping nameは、特にPlex/Sourceについて**Kaia internal safe nameへrename**する。 例示名を今product nameとしてLOCKする必要はない。 --- # 4. Glyph audit Required: `ABCDEFGHIJKLMNOPQRSTUVWXYZ` `0123456789` `- . : SPACE` 各familyはいずれもLatin-capable font。 BebasについてはGoogle Fonts authoritative metadataでも`latin` / `latin-ext` subsetを持つ。citeturn0search4 IBM Plex SansはLatinを含む広範なscript coverage。citeturn0search14 Source Serifも多数言語を対象としたtext typefaceであり、TTF releaseを提供。citeturn0search0turn0search3 Courier Prime/Space Groteskも対象ASCIIを含むLatin fonts。 **SOURCE-level repertoire audit:PASS。** ただしshipping subsetの最終glyph-survival auditは、実際にsubset binaryを生成できた時点で再度機械検査する。 --- # 5–6. Original / disposable subset measurement ここだけ今回のSTOP。 ### AUTHORITATIVE / MEASURED BY UPSTREAM UI - IBM Plex Sans Regular original: **196 KB** citeturn1search0 - Bebas Neue Regular original: **60 KB** citeturn0search13 ### AUTHORITATIVE identity but local bytes not obtained - Courier Prime Regular - Source Serif 4 Regular - Space Grotesk Regular ### Disposable subset **NOT MEASURED.** 今回、authoritative TTFをlocal witnessとして取得しようとしたが、実行環境側からGitHub binary payloadを安全に取得できなかった。 ここで非公式mirrorや「同じ名前の手元font」へ差し替えると、 > exact upstream binary → SHA256 → subset SHA256 という今回のwitness自体を壊す。 したがって指示どおりSTOP。 **original SHA256:NOT MEASURED** **subset SHA256:NOT MEASURED** **subset exact bytes:NOT MEASURED** **five-subset total exact bytes:NOT MEASURED** 前回の数十KB級予測を実測値扱いもしない。 --- # 7. Intended subset method binary取得後に使う方法はもう固定できる。 Build-onlyで、 `fontTools/pyftsubset` 相当のdeterministic subsetterを使い、 required Unicode set: `U+0020 SPACE` `U+002D -` `U+002E .` `U+0030–0039` `U+003A :` `U+0041–005A` + `.notdef` 等font構造上必要なもの。 その後、 - cmap audit - glyph count - metrics extraction - internal naming audit - SHA256 - byte count を記録。 **これは開発工具。WordPress runtimeへ入れない。** --- # 8. Static metrics availability 5候補とも通常のOpenType/TrueType resourceなので、build-timeには必要情報を全部抽出可能。 各faceから固定する: - `font_id` - renamed safe internal/PostScript name - `unitsPerEm` - ascent - descent - font bbox - cmap - required glyph IDs - advance widths - Dmax - Cmax - punctuation widths - source identity/version - original SHA256 - subset SHA256 - license identity したがってruntimeは、 **font parser不要。** 既知metadataを読むだけ。 --- # 9. Safe-slot proof Regular-onlyになったので綺麗に閉じた。 各face `F` についてbuild時に: `Dmax(F) = max advance(0…9)` `Cmax(F) = max advance(A…Z,0…9)` を抽出。 ### Counter N digits: `N × Dmax(F)` ### Timestamp Date `8 × Dmax(F) + 2 × advance_F(".")` ### Timestamp Time `6 × Dmax(F) + 2 × advance_F(":")` ### Date & Time `DateSafe(F) + advance_F(SPACE) + TimeSafe(F)` ### Serial `8 × Cmax(F) + advance_F("-")` これで比例fontでも有限証明できる。 Bebasの細さ、Courierのmonospace、Plex/Source/Spaceの比例差は**全部各face固有metricsへ吸収**される。 L/M/Sはこのdesign-unit safe widthへ既存Token size multiplierを適用。 **Underlineはwidth計算へ入れない。** --- # 10. Browser / PDF parity 構造上 **PASS**。 同じsubset TTF binaryを、 Browser: `@font-face` PDF: embedded TTF resource で使う。 Browser側もsafe slot widthのauthorityをDOM text measurementへ戻さず、**build-time static metricsから得たslot width**を使う。 これが大事。 Browser shaping差でmannequinが少し違っても、 **穴authority自体は同じstatic metrics** なので周囲Human bakeは動かない。 --- # 11. Underline 新仕様どおりfont resourceから完全分離できる。 Browser: 既存presentation decoration相当。 PDF: Token baseline/descentとの既知関係でline primitiveを描く。 したがって、 - Underline font binary不要 - glyph不要 - Cmax/Dmax変更なし - slot width変更なし **☑だけでよい。** --- # 12. Legacy Bold / Italic isolation DEV166既存Serial presentationではBold/Italic/Underlineは独立styleだった。 新仕様では: **Bold wiring → Token Font pathへ接続しない** **Italic wiring → Token Font pathへ接続しない** legacy saved values: - 削除しない - migrationしない - font_idへ変換しない - cleanupしない Underlineだけ新Token presentationで独立☑として生かす。 つまり**旧家具を壊す仕事ではなく、新配線から外すだけ。** Human Decisionどおり。 --- # 13. Resource burden exact subset totalは今回**UNMEASURED**なので数字を捏造しない。 ただし原本の時点でも確認できた2例が、 - Plex Sans:196 KB - Bebas:60 KB であり、そこからさらに40文字程度へsubsetする構造。citeturn1search0turn0search13 したがって、 **5固定faceという方針自体がFree pluginを巨大font package化する兆候はない。** 最終byte witnessだけ未完。 --- # 14. TECHNICAL DECISIONS ここは施工図へそのまま渡してよい。 - **5候補KEEP** - one completed Regular-equivalent face per taste - no Bold resources - no Italic resources - no BoldItalic resources - Underline independent - static ASCII subsets - same subset TTF Browser/PDF - build-time metrics extraction - build-time safe-slot tables - runtime font parsingなし - runtime subsettingなし - Plex/Source subsetはRFN回避rename - license/copyright noticeをshipping packageへ保持 - legacy Bold/Italic data untouched but disconnected from new path --- # 15. NEW HUMAN DECISION REQUIRED ### **NONE。** 5顔のvisible paletteを変更する技術理由は今回見つからなかった。 なのでHumanに返す見た目はそのまま: **Neutral — IBM Plex Sans** **Typewriter — Courier Prime** **Editorial — Source Serif 4** **Condensed — Bebas Neue** **Modern — Space Grotesk** でいい。 --- # 16. STOP / WATCH 🛑 **STOP — shipping-resource evidence only** 5 authoritative binaryをlocal取得できなかったため、 **original hash / subset hash / exact subset bytes / exact five-font total** は未証明。 ここを証明せず「asset LOCK完了」とは言わない。 ⚠️ **Courier Prime** 公式repo自身がrepo TTFとproduction buildのWindows rendering differenceを警告している。最終binary witnessでは**どちらをupstream authorityに採るか一つに固定**する。citeturn0search10 ⚠️ **RFN** Plex / Sourceはsubset naming注意。citeturn3view0turn0search5 ⚠️ **rotation** 既存の別WATCH維持。今回reopenなし。 --- # 17. LOCK status ### Visual five-face set: **READY TO LOCK** ### License architecture: **READY** ### Glyph repertoire: **READY** ### Static metrics model: **READY** ### Safe-slot algorithm: **READY** ### Browser/PDF resource model: **READY** ### Bold/Italic retirement boundary: **READY** ### Underline model: **READY** ### Exact shipping binaries: **NOT YET LOCKED** ### Product construction: **NONE** なので補佐へ返すなら正確には: > 🕊️ **5顔の選定と施工architectureは閉じた。** > IBM Plex Sans Regular / Courier Prime Regular / Source Serif 4 Regular / Bebas Neue Regular v2 / Space Grotesk Regularを維持してよい。Bold/Italic variants不要、Underlineのみ独立☑。Safe slotは各完成faceのstatic Dmax/Cmaxで有限証明する。 > > **ただしasset LOCKだけ未完。** この環境ではauthoritative TTF 5本をlocal取得できず、要求されたoriginal SHA256 → disposable subset → subset SHA256 → exact byte totalを証明できなかった。非公式mirrorへ逃げずSTOPした。 > > **Human Decision追加なし。製品設計へ差し戻す事項なし。** > 残るのは純粋なresource laboratory witnessだけ。 うむ。今回は**活字箱の中身は決まった。まだ一枚ずつ重量計に載せられてない**、が正確だな🧰★ [USER] 必要なのあったらいってねー 🕊️ KAIA PDF FREE — CUT 1 TOKEN FONT FOUNDATION CONSTRUCTION-READY BLUEPRINT DRAFT TO PDF TEXT / TOKEN FONT SPECIALIST DESIGN / SOURCE INVESTIGATION ONLY. NO CONSTRUCTION. NO PRODUCT REPAIR. NO PRODUCT REDESIGN. NO NEW DEVELOPMENT CHILD. NO DEV166 MODIFICATION. NO SHIPPING PACKAGE MODIFICATION. NO FONT-ASSET INSTALLATION. ================================================== SUPERSESSION NOTICE ================================================== Any previous CUT 1 Blueprint Draft request addressed generically to: FIELD / CONSTRUCTION SPECIALIST is WITHDRAWN. Do NOT combine it with this request. This request is the current CUT 1 Blueprint Draft authority. ================================================== ROLE ================================================== Continue as the PDF Text / Token Font specialist. You already performed substantial SOURCE investigation around DEV166 Text / System Token presentation, mannequin geometry, Text movement, rotation boundaries, variable Token repertoire, completed Token faces, and canonical font-resource evidence. USE THAT EXISTING TECHNICAL WITNESS. Do NOT redo closed investigation merely for ceremony. Re-open exact SOURCE only where needed to convert the accepted findings into a construction-ready blueprint or to verify an integration point. Your job in this turn is: READ THE FIELD → DRAW THE CONSTRUCTION BLUEPRINT IN PENCIL → RETURN IT TO AIDE FOR REDLINE Do NOT construct. Aide will audit the blueprint against the complete Human / Product authority before any Construction Order is issued. ================================================== COMMON PRODUCT PARENT ================================================== Kaia-PDF-Free-v0.1.0-dev166-PAPER-AXIS-LOCKED-PAIR-CONVERSION.zip SHA256: f00b06c826a4314b0f099c2a77f25491e8891022a8f378ec8f979bac50b810ea STATUS: RUNTIME KNOWN-PASS LOCK / DO NOT REOPEN Verify the exact artifact before relying on PRODUCT SOURCE. If unavailable or mismatched: STOP. ================================================== CUT 1 SCOPE ================================================== TOKEN FONT FOUNDATION ONLY. Prepare the construction route for: 1. canonical Token Font asset placement 2. fixed completed-face identity / asset mapping 3. fixed face-specific static metrics mapping 4. Token Font persistence through existing design authority 5. common / ALL Font selection 6. per-Token unlink / relink behavior 7. Font / Style / Underline furniture 8. completed-face availability / disabled styles 9. existing Browser mannequin presentation integration 10. face-specific safe-slot application 11. SAVE / restore behavior required for CUT 1 DO NOT CONSTRUCT: - Text NEUTRAL / INPUT / MOVE - Text direct-grab MOVE - Text rotation restoration - Text operation overlay - Design-side Unicode Bake - Token-slot persistence for Bake - development/test PDF Text output - production real-value bridge - JPG - publication permission - Sample Mask repair - Paper-axis work Those belong to later CUTs. ================================================== CURRENT HUMAN TOKEN FONT AUTHORITY ================================================== Token Font is a visible design feature. Five Free tastes: Neutral Typewriter Editorial Serif Condensed Modern Furniture belongs at the bottom of the existing Token Machine / Token issuance furniture. CURRENT furniture: Font ▼ ○ Italic ○ Bold ○ Bold Italic ☐ Underline There is NO visible Regular radio. No Style radio selected = completed Regular face. Italic / Bold / Bold Italic are mutually exclusive. The old visible-Regular-radio interpretation is: SUPERSEDED / DO NOT CONSTRUCT. ================================================== COMPLETED-FACE AVAILABILITY ================================================== Neutral: Regular Bold Italic Bold Italic Typewriter: Regular Bold Italic Bold Italic Editorial Serif: Regular Bold Italic Bold Italic Condensed: Regular only Modern: Regular Bold If the selected family does not contain the corresponding completed face: disable / gray that Style choice. Examples: Condensed: Italic disabled Bold disabled Bold Italic disabled Modern: Italic disabled Bold available Bold Italic disabled Do NOT synthesize missing faces. Do NOT substitute another family. Do NOT silently create another completed face. ================================================== UNDERLINE ================================================== Underline is independent decoration. It is NOT a completed font face. It may combine with: Regular Italic Bold Bold Italic No separate Underline font resource. A simple presentation-side underline is acceptable if stable. Underline adds ZERO safe-slot width. Do NOT turn Underline into a font face. ================================================== COMMON / INDIVIDUAL LINK SEMANTICS ================================================== Font selection supports: - common / ALL linked selection - individual per-Token selection when unlinked UNLINK: Start from the CURRENT common Font / Style. The Token may then change individually. RELINK: Discard the old individual Font / Style choice. No sleeping individual Font/Style history. LATER UNLINK: Start from the THEN-CURRENT common Font / Style. Do NOT restore the discarded choice. ================================================== OFF / UNAVAILABLE TOKEN ================================================== A linked Token remains part of ALL/common Font behavior while that Token is OFF / unavailable. If common Font / Style changes while it is OFF: later ON immediately reflects CURRENT common Font / Style. OFF does NOT mean unlink. Prefer a naturally referenced common state over synchronization machinery if SOURCE permits it. ================================================== FONT VS COLOR ================================================== Font plumbing is separate from color plumbing. Existing color-link implementation may be inspected as precedent. Do NOT alter color Product semantics to make Font work. ================================================== CANONICAL RESOURCE AUTHORITY — CLOSED ================================================== The Font Resource Gate is: PASS / CLOSED. Only the derivative-named canonical completed-face binaries are current shipping-resource authority. NEUTRAL Regular KaiaTokenNeutral-Regular 10800 bytes SHA256: d25e08cc29c1cdc9824a5516743684c9e9ee1e710c84d3e67de90ca24983e80c Bold KaiaTokenNeutral-Bold 10580 bytes SHA256: 2219f13f3899ba9999ee928f71d3c7653131231645896d89496c5a9c029d03e9 Italic KaiaTokenNeutral-Italic 11132 bytes SHA256: 9a1724caa1551d3e7f49ed70960c54675060e6cff957a6ead3f089a29682c017 Bold Italic KaiaTokenNeutral-BoldItalic 10992 bytes SHA256: b1a8d5661298b4fa3879be7d7f0803d500e7f90743f220660b12520930dd3de9 TYPEWRITER Regular KaiaTokenTypewriter-Regular 32240 bytes SHA256: 298357d76fcace490b3727a67fa8e893a918d3c2dfaa140420e93ac82e16edf8 Bold KaiaTokenTypewriter-Bold 30932 bytes SHA256: 39b2a7e9471f19a9e9e50047adb4b06154d3c17706ec5cd1c9a6c9fb93d2e0ec Italic KaiaTokenTypewriter-Italic 32216 bytes SHA256: a6530640d17cfe18a4d00606851baf5f6983b59315c7ec742e8d5cf1ebe8fd1d Bold Italic KaiaTokenTypewriter-BoldItalic 31896 bytes SHA256: b37cefd4ea042cd0154e047ae0f44f5eec201964849483b76cebdee717a989fd EDITORIAL SERIF Regular KaiaTokenEditorialSerif-Regular 6964 bytes SHA256: c43ed0427e29bfd22326d56bd17e4c37ec07695fcb59cf9769561746e0b8f731 Bold KaiaTokenEditorialSerif-Bold 6932 bytes SHA256: 7fbe3239f7a47a54363f629c063a80951099f68acf3910d6f1b1c462191214cd Italic KaiaTokenEditorialSerif-Italic 6956 bytes SHA256: f57d55ed86fd28bd918f67306a6b5d0428f53ef6f7ae128676233e7d90473d92 Bold Italic KaiaTokenEditorialSerif-BoldItalic 7008 bytes SHA256: 974f63baad62cf6cedbae5e51287bcfad9537640ae2a5296e8166048dd34b90b CONDENSED Regular KaiaTokenCondensed-Regular 11724 bytes SHA256: 7511095e1bcaa20b005f41eeb756934888498545704c96385831a389b9cf7654 MODERN Regular KaiaTokenModern-Regular 11228 bytes SHA256: 0bc7cec64444f87907c3a7a55035f3a4e8a3fdb4a859cab0a06e2fd75f9be2f5 Bold KaiaTokenModern-Bold 11172 bytes SHA256: 694fa1b19798dc1f81d1fef20b8d348ec154c89b352c8bb84379b220a369c7bf Old Regular subset fingerprints and upstream-name-retained subsets are LEGACY / NON-CANONICAL. Do NOT reopen procurement / subsetting / canonical naming. Do NOT install assets during this blueprint turn. ================================================== SAFE-SLOT AUTHORITY — CLOSED ================================================== Mannequin displayed width is NOT slot authority. Use: approved completed face ID → approved face-specific static metrics. Safe formulas: Counter N digits: N × Dmax(F) Timestamp Date: 8 × Dmax(F) + 2 × width(".") Timestamp Time: 6 × Dmax(F) + 2 × width(":") Date & Time: DateSafe + width(SPACE) + TimeSafe Serial: 8 × Cmax(F) + width("-") Existing alignment places the displayed value inside the fixed slot. Existing Token Size semantics remain authoritative. Underline adds ZERO width. Do NOT use Regular metrics for sibling completed faces. Do NOT introduce runtime TTF parsing. ================================================== KNOWN TEXT / TOKEN SOURCE WITNESS ================================================== Previously established DEV166 Browser presentation path: design.token_symbols → kpdfTokenSymbols → kpdfTokenize() → kpdfResolveToken() → kpdfBuildPresentation() Existing Text object structure: .kpdf-text-object → raw .kpdf-text-content → sibling .kpdf-system-presentation Existing mannequin presentation already provides visible System Token geometry. Use your previous exact SOURCE witness where still applicable. Verify only the insertion points needed for this CUT. Do NOT create a second mannequin renderer merely because Token Font is being added. Do NOT redesign Token grammar/parser. ================================================== EXISTING SAVED AUTHORITY ================================================== Known persistence route: design.token_symbols → sanitize_token_symbols() → existing SAVE / Working / Refill / Stock design transport. Inspect exact DEV166 SOURCE and determine the smallest extension for: - common Font family/taste - common Style - per-Token linked/unlinked Font state - individual family/taste when unlinked - individual Style when unlinked - Underline state These are semantic requirements. They are NOT prescribed field names. SOURCE should determine the smallest safe representation. Do NOT create: - second Token authority - second Text authority - new DB - font registry DB - runtime font discovery - general Font Manager If fixed maps are enough, prefer fixed maps. ================================================== DEV166 PROTECTED BOUNDARIES ================================================== DO NOT REOPEN: - Paper-axis locked-pair conversion - paper orientation semantics - Image authority - Text authority - Token marker grammar - tokenizer/parser semantics - source/resolved separation - Working / Refill / Stock authority - Common Switchboard semantics - Counter/Timestamp/Serial actual-value authority - Text capacity rules - Position Return - Sample Mask known-PASS behavior - FINAL renderer - JPG reserved boundary - unrelated UI machinery DO NOT RESTORE: - Related Shortcodes visible furniture - old Timestamp outlet checkbox - paper-coupled Text rotation - visible Regular radio - synthetic Bold/Italic ================================================== YOUR BLUEPRINT DRAFT ================================================== Return: A. SOURCE MAP Exact relevant files/functions/structures/UI builders/sanitizers/ SAVE+restore paths/presentation functions/link precedents/CSS+JS boundaries. B. CURRENT DATA FLOW Exact current route: Token settings → persistence → restore → mannequin presentation. Mark smallest Token Font insertion points. C. PROPOSED DATA SHAPE Smallest SOURCE-supported persistence representation. Clearly label: SOURCE FACT SPECIALIST INFERENCE SPECIALIST PROPOSAL Show resolution of: common linked unlinked relink discard OFF linked Underline. D. FIXED RESOURCE MAP Smallest static map: completed face ID → canonical asset → static metrics → style availability. No runtime discovery. E. UI CONNECTION Exact existing Token Machine insertion point for: Font ▼ Italic / Bold / Bold Italic radio Underline checkbox. Show how unavailable completed Styles become disabled. F. PRESENTATION CONNECTION Exact route by which selected completed face and Underline reach the existing mannequin presentation. Show how fixed safe-slot geometry uses static metrics rather than measured mannequin width. G. LINK STATE TRANSITIONS Show: ALL/common change UNLINK individual change RELINK common change while linked Token OFF later ON. H. FUTURE CONSTRUCTION STEPS Break CUT 1 construction into small internal steps. Do NOT combine unrelated work merely to reduce revision count. I. STATIC QA PLAN At minimum: - exact DEV166 parent - only canonical resources - no synthetic faces - no Regular radio - no new DB - no second Token authority - no runtime font parser - exact face→metrics mapping - persistence/sanitization coverage - no out-of-scope edits. J. RUNTIME QA PLAN At minimum: - SAVE → restore - all five families - all actually available completed faces - unavailable Styles disabled - no Style selected = Regular - Underline independently ON/OFF - ALL/common change - unlink - individual change - relink discard - later unlink starts from current common - linked OFF Token follows common - later ON reflects current common - Counter mannequin - Timestamp Date - Timestamp Time - Timestamp Date & Time - Serial mannequin - face-specific safe slots - alignment inside slot - existing Token Size - existing Token color regression - Sample Mask regression only if shared presentation code is touched. K. WATCH / STOP STOP if exact SOURCE proves this CUT requires: - new Product authority - unresolved migration/product decision - new DB/schema outside existing design - second Token authority - runtime font parser - synthetic face - Token grammar change - Paper-axis modification - Sample Mask redesign - FINAL/PDF construction - Text Operation construction - Bake construction Report the exact boundary. ================================================== MULTIPLE SAFE ROUTES ================================================== If SOURCE clearly supports one smallest route: return that route. Do NOT manufacture alternatives. If SOURCE genuinely provides multiple safe routes: return the candidates with exact SOURCE evidence and tradeoffs. Do NOT invent a Human/Product Decision to choose between them. Aide will resolve technical alternatives where possible. ================================================== END CONDITION ================================================== THIS TURN ENDS WITH: CONSTRUCTION-READY BLUEPRINT DRAFT It does NOT end with: - modified SOURCE - DEV167 - ZIP - installed canonical assets - shipping-package changes - Product construction ================================================== WORKSHOP RULE ================================================== FIELD KNOWS THE FIELD BEST. TEXT / TOKEN FONT SPECIALIST DRAWS IN PENCIL. AIDE HOLDS THE PEN. IF YOU NOTICE ANY あれ? / うわぁ……: STOP AT THAT POINT AND REPORT IT. DO NOT DIAGNOSE PAST THE STOP. DO NOT REPAIR. [ASSISTANT] ほーい🕊️ **必要資材は今のところ追加なし。** 指定parentは手元にあり、まずSHA256を再計算した。 `f00b06c826a4314b0f099c2a77f25491e8891022a8f378ec8f979bac50b810ea` **ORDERと完全一致。DEV166 exact parent PASS。** そこからCUT 1に必要な箇所だけSOURCEを開き直した。 そして、施工図は引ける。 ただしSOURCE上に一個だけ、補佐に赤入れしてもらうべき**重要な境界**がある。 > **現在の `kpdfSetTokenSeat()` はOFF/unavailable Tokenの `select,input,button` を全部disabledにする。** > > 新HDではOFF TokenもFont ALL memberでなければならない。 > > したがってFont家具を各OFF Token seat内部へそのまま生やして既存disable処理に巻き込む設計は不可。 > > **common Font authorityをToken Machine共通家具として独立させ、OFF linked memberは保存されたlink状態からcommonを参照する**のが最小。個別Font操作だけavailabilityに従わせる。 > > これはProduct矛盾ではなく、既存SOURCEとの明確な施工境界。以下の鉛筆図はこのルートで引く。 # CUT 1 — CONSTRUCTION-READY BLUEPRINT DRAFT ## A. SOURCE MAP 対象SOURCEはDEV166内の主に `kaia-pdf.php` 一枚。 **Persistence** - `initial_mock()` — design初期authority。 - `sanitize_design()` — `token_symbols` を `sanitize_token_symbols()` へ搬送。 - `sanitize_token_symbols()` — 現在のCounter / Timestamp / Serial definition whitelist。 - hidden `#kpdf-token-symbols-json` - `name="design[token_symbols_json]"` - `kpdfPersistTokenSymbols()` - `kpdfTokenSymbols` → JSON hidden input - `scheduleWorking()` - 既存SAVE → Working / Refill / Stock transportはsanitized design全体を運ぶ。 **Token Machine UI** `PDF System Token / Token Machine` 内部: - `.kpdf-system-token-members` - Counter `.kpdf-system-token-member[data-family=counter]` - Serial `.kpdf-system-token-member[data-family=serial]` - Timestamp Date / Time / Full seats 現状Serialだけに旧: - `.kpdf-token-bold` - `.kpdf-token-italic` - `.kpdf-token-underline` がある。 **Availability** `kpdfSetTokenSeat(member,available)` 現在: - `data-unavailable` - seat state - unavailableならclose - **seat内部の `select,input,button` 全disable** ここがHD-7との接続注意点。 **Presentation** `design.token_symbols` → JS `kpdfTokenSymbols` → `kpdfTokenFromDefinition()` → `kpdfTokenize()` → `kpdfResolveToken()` → `kpdfBuildPresentation()` → `.kpdf-system-value` Text object: `.kpdf-text-object` → raw `.kpdf-text-content` → sibling `.kpdf-system-presentation` `kpdfEnsurePresentation()` / `kpdfRefreshPresentation()` が既存renderer。 **Current style application** `kpdfBuildPresentation()` 内でSerialに: - `fontWeight` - `fontStyle` - `textDecoration` を直接付与。 CUT 1ではBold/Italic旧配線を**新Font pathへ継承しない**。Underlineだけ新authorityへ接続する。 --- # B. CURRENT DATA FLOW / INSERTION POINTS 現在: `Token Machine controls` → `kpdfRefreshTokenMember()` → `kpdfTokenSymbols[key] = definition` → `kpdfPersistTokenSymbols()` → hidden JSON → SAVE → `sanitize_token_symbols()` → saved `design.token_symbols` → page load `kpdfTokenSymbols` → `kpdfApplyTokenDefinitionToMember()` → presentation そしてpresentation側: `kpdfTokenSymbols` → `kpdfTokenFromDefinition` → Token run → `kpdfResolveToken` → resolved mannequin → `kpdfBuildPresentation` → span ### 最小Font insertion 1. `sanitize_token_symbols()` — Font state whitelist 2. saved `design.token_symbols` — common + member Font state 3. Token Machine bottom — Font furniture 4. `kpdfPersistTokenSymbols()` — 既存transportをそのまま利用 5. `kpdfApplyTokenDefinitionToMember()` 周辺 — UI restore 6. `kpdfTokenFromDefinition()` / resolution helper — effective completed-face identityをpresentationへ渡す 7. `kpdfBuildPresentation()` — same existing spanへface + safe width + underline適用 **Tokenizer/parserそのものは変更不要。** --- # C. PROPOSED DATA SHAPE ### SOURCE FACT `token_symbols` は現在、Token key → definition の一map。 Counter / Serial / date / time / datetimeが同じauthorityにいる。 新DB不要。 ### SPECIALIST INFERENCE common Font authorityもこの同じ`token_symbols` payload内へ置けば、Working / Refill / Stock transportを増設せずに済む。 ### SPECIALIST PROPOSAL — smallest shape `token_symbols` 内に**一つreserved common Font record**を追加する。 概念: ```text common font: family style each Token definition: font_linked: 1 / 0 only when unlinked: font_family font_style underline: on / off ``` 実フィールド名は施工時に既存命名へ合わせる。 重要なのは状態規則。 **linked** - individual family/styleを持たない。 - effective Font = common。 **UNLINK** - current common family/styleをindividualへコピー。 - linked=0。 **individual change** - individualだけ変更。 **RELINK** - linked=1。 - individual family/styleを**物理的に削除**。 **later UNLINK** - then-current commonを新規コピー。 **OFF linked** - 保存値を同期しない。 - effective Font resolverがcommonを見るだけ。 これでhistory/shadow registryなし。 ### Underline UnderlineはFont linkとは独立したToken decoration。 **ここは一つ注意:Human authorityは今回「Font / Style / Underline furniture」とだけ指定しており、UnderlineまでALL Font linkへ連動するとは書いていない。** したがって鉛筆図では**Underlineはper-Token stateのまま**に置く。ALL family/style変更でUnderlineを書き換えない。 これはProduct意味を増やさない最小ルート。 --- # D. FIXED RESOURCE MAP Runtime discoveryなしの固定map。 概念: ```text neutral: regular -> KaiaTokenNeutral-Regular bold -> KaiaTokenNeutral-Bold italic -> KaiaTokenNeutral-Italic bolditalic -> KaiaTokenNeutral-BoldItalic typewriter: regular -> ... bold italic bolditalic editorial: regular bold italic bolditalic condensed: regular italic -> unavailable bold -> unavailable bolditalic -> unavailable modern: regular bold italic -> unavailable bolditalic -> unavailable ``` 各available completed face entry: - stable face ID - canonical asset relative path - exact expected SHA256 - static metrics record - availability Metrics: - unitsPerEm - ascent/descent - bbox - glyph mapping - glyph advances - Dmax - Cmax - `- . : SPACE` advances - precomputed Token safe widths or enough constants to derive them **No runtime TTF parser.** 施工時asset hashをruntimeで毎request検証する必要もない。Canonical resource verificationはbuild/static QA責任で十分。 --- # E. UI CONNECTION 既存Token Machineの**全Token seatsの後、同じ preparation group最下部**へFont furnitureを置く。 Human authority: **Font ▼** **○ Italic** **○ Bold** **○ Bold Italic** **☐ Underline** Regular radioは作らない。 ### Common / individual selector 同じFont furniture内で、 - ALL/common - Counter - Serial - Timestamp Date - Timestamp Time - Timestamp Date & Time の現在対象を示す小さいmember/link furnitureを持つ。 既存color UIから借りるのは: - 🔗 / unlinkedの視覚文法 - ALL linked indication - disabled/grayed visual grammar **color handlers/dataは借りない。** ### Style availability family変更直後にstatic face mapを見る。 Condensed: - Italic disabled - Bold disabled - Bold Italic disabled - radio none = Regular Modern: - Bold enabled - Italic disabled - Bold Italic disabled もし現在individual styleが新familyに存在しない状態が発生する操作なら、**その操作で不存在styleをsyntheticに維持してはいけない。** ここはSOURCEではなくHuman authorityから自然に、 **family選択時にavailable completed faceしか選択状態にできない** ところまでは確定。 施工図ではfamily変更時、 unavailable style selectionを**Regular(radio none)へ正規化**するのが最小technical disposition。 --- # F. PRESENTATION CONNECTION 既存rendererを増やさない。 `kpdfTokenFromDefinition()` → effective Font resolver → `kpdfResolveToken()` → resolved objectへ: - completed face ID - safe slot width - underline - existing size/color/alignment を搬送。 `kpdfBuildPresentation()`: 既存 `.kpdf-system-value` spanに - canonical `font-family` - fixed slot width - existing size - existing color - alignment - underline を適用。 ### Safe width **DOM mannequin `offsetWidth`をauthorityにしない。** Static metricsから: Counter: `N × Dmax(F)` Date: `8Dmax + 2 dot` Time: `6Dmax + 2 colon` Full: `DateSafe + SPACE + TimeSafe` Serial: `8Cmax + hyphen` をdesign units → current Token size scaleへ変換。 Counterの現在の `sp.style.width = digits + 'ch'` はsafe-slot authorityとして退役し、face-specific widthへ置換対象。 Timestamp/Serialもmannequin intrinsic widthではなく固定slotを持つ。 **Human Textをreflowしない。** Underlineはslot width ZERO。 --- # G. LINK STATE TRANSITIONS ### ALL/common family/style change common recordだけ更新。 linked membersはeffective resolver経由で即反映。 unlinked membersは変更なし。 OFF linked memberにもcopy/syncしない。 ### UNLINK current effective common: `family/style` をmember individual stateへコピー。 `linked = false` 以後編集可能。 ### Individual family/style change member individualのみ更新。 ### RELINK member individual family/styleを削除。 `linked = true` 即common表示。 ### Common changes while Token OFF memberはlinkedのまま。 保存copyなし。 ### Later ON resolver: `linked ? common : individual` なのでcurrent commonを即使用。 **後追い同期処理ゼロ。** --- # H. FUTURE CONSTRUCTION STEPS 一発施工にしない。 **CUT1-A — Static definitions only** - canonical face map - availability map - static metrics map - `@font-face` declarations - no UI wiring yet **CUT1-B — Persistence** - common Font state - member link/individual state - Underline state - sanitizer - hidden JSON transport - restore - legacy Bold/Italic untouched **CUT1-C — Font furniture** - Token Machine bottom UI - Font select - 3 Style radios - Underline checkbox - ALL/member selection/link UI - unavailable style disabling - no presentation changes yet **CUT1-D — State transitions** - ALL - unlink - individual - relink discard - OFF linked semantics **CUT1-E — Existing mannequin integration** - effective face resolver - existing `kpdfBuildPresentation()` connection - same renderer only - legacy Bold/Italic new-path disconnect **CUT1-F — Safe slots** - face-specific metrics - Counter - Timestamp forms - Serial - alignment - Token Size scaling **CUT1-G — narrow regression/cleanup** - no dead duplicate Font path - no accidental color changes - no out-of-scope work Each child should be based on last known-PASS numbered child; no direct erasure of DEV166. --- # I. STATIC QA PLAN Must prove: - exact parent SHA256 = PASS - only canonical derivative-named resources referenced - all 13 canonical completed faces map to exact correct asset/hash - no legacy upstream-name subset referenced - no synthetic face CSS (`font-style`/`font-weight` pretending unavailable face) - no visible Regular radio - Regular = no Style radio - Condensed only Regular - Modern Regular + Bold only - no new DB/table/options registry - one `design.token_symbols` authority - sanitizer accepts only known family/style/link values - relink serialization contains no dormant individual family/style - legacy Serial Bold/Italic fields are not reinterpreted - Underline is independent - no runtime font parser/subsetter/discovery - every completed face maps to its own metrics - sibling face never inherits Regular metrics - no Token grammar/parser changes - no FINAL/PDF edits - no Text MOVE/rotation/Bake edits - no Paper/Image/JPG changes. --- # J. RUNTIME QA PLAN Run through: - SAVE → reload/restore - Working → Refill → Stock survival - Neutral Regular/B/I/BI - Typewriter Regular/B/I/BI - Editorial Regular/B/I/BI - Condensed Regular only - Modern Regular/Bold - unavailable radios visibly disabled - no Style selected = Regular - family change cannot leave unavailable style active - Underline ON/OFF with every available face category - Underline does not alter slot width Link lifecycle: - ALL common family/style change - unlink starts identical to current common - individual family/style change - common change leaves individual unchanged - relink immediately becomes common - old individual state gone - later unlink starts from **new** current common - OFF linked Token while common changes - later ON shows current common immediately Presentation: - Counter mannequin - Timestamp Date - Timestamp Time - Timestamp Full - Serial `XXXX-XXXX` - each available completed face actually changes visible typography - same completed face used wherever same authority resolves - Counter safe slot for configured digit count - Timestamp face-specific slots - Serial face-specific Cmax slot - left/center/right Counter alignment within slot - L/M/S existing semantics - Token color unchanged - mixed Human + Token presentation still uses existing renderer Regression: - raw marker editing unchanged - short markers unchanged - Token issue/copy furniture unchanged - availability semantics unchanged except Font common participation as specified - Sample Mask smoke/regression **only if shared presentation code path affects it**; no redesign. --- # K. WATCH / STOP ## ⚠️ WATCH — existing unavailable-seat blanket disable SOURCE FACT: `kpdfSetTokenSeat()` disables **every select/input/button inside unavailable member**. Therefore **Font ALL membership must not depend on an enabled control living inside that unavailable seat.** Pencil disposition: - persisted link state remains authority - common Font furniture remains operable - OFF linked member resolves common without synchronization - individual editing of unavailable member can remain unavailable No Product change required. ## ⚠️ WATCH — Timestamp is three saved definitions SOURCE has separate `date / time / datetime` definitions plus `timestamp1` legacy handling. Font persistence must follow the actual marker definitions without accidentally collapsing Date/Time/Full into one state unless Human authority explicitly says so. For this blueprint I preserve **each actual Token definition as a member**. ## ⚠️ WATCH — legacy Serial B/I/U Current `kpdfTokenFromDefinition()` and `kpdfResolveToken()` still carry `bold/italic/underline`. CUT 1 must disconnect **Bold/Italic from the new Font route** without deleting legacy saved fields. Underline new authority may reuse the semantic decoration, but should not make old Bold/Italic into face selectors. ## ⚠️ WATCH — `kpdf-system-unresolved` It currently uses CSS `font-style:italic` as an unresolved-state visual. That is **not Token completed-face synthesis** and should not accidentally be swept into the “no synthetic Italic” cleanup. It is status presentation, not selected Token typography. No STOP triggered. --- # BLUEPRINT STATUS **SOURCE parent:** VERIFIED PASS **CUT 1 boundary:** CLOSED **Persistence route:** CLOSED **Common/individual model:** CLOSED **OFF behavior:** CLOSED **Resource/metrics route:** CLOSED **UI insertion:** CLOSED **Existing mannequin integration:** CLOSED **Safe-slot connection:** CLOSED **Construction performed:** **NONE** ### **CONSTRUCTION-READY BLUEPRINT DRAFT — READY FOR AIDE REDLINE 🕊️** 追加で必要になりそうな物は、**実施工に入る段階で canonical 13 font binaries + face-specific metrics authority**。でも今回の鉛筆施工図には、鳩に載ってきたhash/size/resource authorityで十分だった。 一個だけ補佐に太線引いて見てもらうなら、**OFF seatの既存blanket-disableとFont ALL membershipの境界**。そこ以外はかなり退屈に施工できる形まで落ちたよー🧰★ [USER] んとさー 次から確認あったら一度とまってしゃむに投げてよー それで解決したら全部吐ける。 [ASSISTANT] うい、そこ運用直すー!ヽ(=´▽`=)ノ 今回みたいに途中で **「ここだけ確認したい」「この境界どっち?」** が出たら、そこで一旦STOPしてしゃむに投げる。 しゃむ回答 → 境界CLOSED → **そのあと全部入りの施工図/報告を吐く** にする。 つまり今後は、確認事項をWATCHとして完成報告の中に埋め込まない。**先に聞く★** 「あれ?/うわぁ……STOP」と同じく、途中チェックポイントとして扱うねー🕊️ [USER] うんうん 今親方判断いるってやつ、なにー? [ASSISTANT] うん、さっき私が「補佐に太線」って言ったやつは **これ一個**。 ### OFFになってるTokenのFont家具をどう扱うか DEV166の今のSOURCEだと、TokenがOFF / unavailableになると、そのToken席の中にある `select / input / button` をまとめてdisabledにする仕組みになってる。 でも今回の確定仕様では、 > **TokenがOFFでも、linkedならALL/common Fontのメンバーであり続ける。** > OFF中にALLのFont/Styleが変わったら、後でONにした瞬間その最新版になっている。 ここまでは決まってる。 なので私の技術案は、 > **OFF席の中を無理に操作可能にしない。** > linked状態だけ保存しておいて、Fontの実値はコピーしない。 > `linked = yes` なら常にcommon Font/Styleを参照する。 > だからOFF中も裏では勝手に追従していて、ONに戻せば現在commonが出る。 これ。 要するにしゃむ側に確認したかったのは、 **「OFFのToken席そのものにFont操作UIを残して触れるようにしたい?」** それとも、 **「OFFならその席は今まで通り触れなくていい。linkedなら裏でcommon参照してて、ONにしたら最新版になってりゃいい★」** のどっちか。 私は後者がSOURCEにも仕様にも一番自然だと思ってる(笑) これが後者でよければ、**確認CLOSEDして施工図を確定側へ持ってけるよー🕊️** [USER] 怠惰な奴でいいよ(笑) [ASSISTANT] よし(笑)**怠惰ルートでCLOSED★** ヽ(=´▽`=)ノ つまり確定はこれ。 > **OFF / unavailable TokenのFont家具は、今まで通り触れなくてよい。** > linkedなら個別Font値を同期・コピーせず、単にcurrent common Font / Styleを参照し続ける。 > OFF中のcommon変更に対する同期処理は作らない。 > 後でONになったとき、その時点のcurrent commonが自然に見える。 要するに、 **OFF → 寝てる** **ALL変更 → 起こさない** **ON → 起きてcommon見たら最新だった★** これで余計な同期機械ゼロ(笑) さっきの唯一の確認境界はこれで解消。**Human Decision追加なし/Blueprint側CLOSED**として補佐へ返せるよー🕊️ [USER] んじゃ悪いけどそれでしあげてくれ(笑) これだけなら長く吐き出す前にちょい確認でだし直ししなくてよかろ?(笑) [ASSISTANT] うむ(笑) **今回はもう確認CLOSEDしたから、そのまま完成版まで吐いてよし★** さっきの鉛筆図に、しゃむ回答を正式反映して補佐返却版にするね。 --- # 🕊️ KAIA PDF FREE — CUT 1 ## TOKEN FONT FOUNDATION ### CONSTRUCTION-READY BLUEPRINT DRAFT — COMPLETED FOR AIDE REDLINE **COMMON PARENT** `Kaia-PDF-Free-v0.1.0-dev166-PAPER-AXIS-LOCKED-PAIR-CONVERSION.zip` Expected SHA256: `f00b06c826a4314b0f099c2a77f25491e8891022a8f378ec8f979bac50b810ea` **VERIFIED: EXACT MATCH** DEV166 remains: **RUNTIME KNOWN-PASS / LOCK / DO NOT REOPEN** **PRODUCT CONSTRUCTION: NONE** --- # A. SOURCE MAP CUT 1 primarily touches existing authority and presentation machinery in: `kaia-pdf.php` No second Token system is required. ## A-1. Saved design authority Relevant existing PHP boundaries: - `initial_mock()` - `sanitize_design()` - `sanitize_token_symbols()` Existing authority: `design.token_symbols` Existing browser transport includes: `design[token_symbols_json]` and the corresponding hidden JSON field. Existing JS persistence: `kpdfTokenSymbols` → `kpdfPersistTokenSymbols()` → hidden JSON → existing Working SAVE machinery. The sanitized design subsequently travels through the existing: **Working → Refill → Stock** design transport. **SOURCE FACT:** CUT 1 can extend the existing Token definition payload. No new DB, registry, second authority, or alternate SAVE path is required. --- ## A-2. Existing Token Machine Relevant existing UI is the current: **PDF System Token / Token Machine** with member seats for the actual Token definitions, including: - Counter - Serial - Timestamp Date - Timestamp Time - Timestamp Date & Time Existing Serial presentation furniture contains legacy: - `.kpdf-token-bold` - `.kpdf-token-italic` - `.kpdf-token-underline` Legacy Bold / Italic are not the new Token Font authority. --- ## A-3. Availability Relevant existing function: `kpdfSetTokenSeat(member, available)` Current behavior includes disabling controls inside unavailable Token seats. This originally created a WATCH against the new rule that an OFF Token remains an ALL/common Font member. ### HUMAN RESOLUTION — CLOSED Shamyue confirmed the **lazy/reference route**: > OFF Token furniture may remain unavailable/disabled. > Do not wake the Token merely to synchronize Font state. > A linked OFF Token simply continues to reference current common Font / Style. > When later ON, it naturally resolves the then-current common state. Therefore existing unavailable-seat interaction does **not** need redesign merely for Font ALL membership. --- ## A-4. Existing presentation Previously proven Browser path: `design.token_symbols` → `kpdfTokenSymbols` → `kpdfTokenize()` → `kpdfResolveToken()` → `kpdfBuildPresentation()` Text structure: `.kpdf-text-object` → raw `.kpdf-text-content` → sibling `.kpdf-system-presentation` Existing mannequin presentation remains the renderer. **Do not create a second mannequin renderer.** --- # B. CURRENT DATA FLOW / CUT 1 INSERTION Current persistence: **Token Machine controls** → Token definition → `kpdfTokenSymbols` → `kpdfPersistTokenSymbols()` → saved `design.token_symbols` → `sanitize_token_symbols()` → Working / Refill / Stock → restore. Current presentation: saved Token definition → `kpdfTokenFromDefinition()` / existing definition resolution → `kpdfTokenize()` → `kpdfResolveToken()` → `kpdfBuildPresentation()` → `.kpdf-system-value`. ### Smallest CUT 1 insertion points Extend only: 1. `sanitize_token_symbols()` / design sanitization 2. existing `design.token_symbols` 3. Token Machine bottom furniture 4. existing `kpdfPersistTokenSymbols()` 5. existing Token UI restore path 6. Token definition/effective-font resolution 7. existing `kpdfBuildPresentation()` 8. existing Token span CSS 9. fixed static face/metrics definitions. No grammar/parser redesign. --- # C. PROPOSED DATA SHAPE ## SOURCE FACT `design.token_symbols` already owns saved Token presentation configuration and already survives the required design lifecycle. ## SPECIALIST INFERENCE Font state belongs inside that authority rather than beside it. ## SPECIALIST PROPOSAL Smallest conceptual representation: ```text common Font state family style each Token definition font_linked if unlinked only: individual family individual style underline ``` Exact field spelling should follow surrounding DEV166 conventions during construction. No separate font registry. --- ## Effective Font resolution Conceptually: ```text if token.font_linked: effective family/style = common family/style else: effective family/style = token individual family/style ``` That resolver is the authority for Browser presentation. It also gives later CUTs a single completed-face identity without duplicating resolution rules. --- ## Linked state A linked Token does **not** require an individual Font/Style value. It references common directly. --- ## UNLINK At the instant of unlink: **copy current common family + style** → individual family + style → `linked = false` Thus appearance does not jump merely because link was removed. --- ## RELINK On relink: - `linked = true` - delete/discard individual family - delete/discard individual style No sleeping state. No history. --- ## Later UNLINK Copy the **then-current** common family/style. Never resurrect discarded individual state. --- ## OFF / unavailable linked Token — HUMAN CLOSED No synchronization operation. No copy-on-common-change. No hidden update queue. No need to enable the OFF Token's Font controls. The effective state remains: ```text linked → reference common ``` Therefore: **OFF → common changes → nothing is copied → later ON → resolver reads current common.** This is the accepted implementation principle. --- ## Underline **SPECIALIST PROPOSAL:** preserve Underline as per-Token independent decoration. It is not family/style authority and is not part of common Font link resolution unless later Product authority explicitly says otherwise. CUT 1 therefore does not invent ALL-Underline semantics. --- # D. FIXED RESOURCE MAP Use one fixed source-level resource map. No discovery. Conceptually: ```text family style completed_face_id asset_path expected_hash metrics_id available ``` ### Neutral - Regular - Bold - Italic - Bold Italic ### Typewriter - Regular - Bold - Italic - Bold Italic ### Editorial Serif - Regular - Bold - Italic - Bold Italic ### Condensed - Regular only ### Modern - Regular - Bold Canonical derivative names and supplied SHA256 values are the only accepted resource identities. Old upstream-name-retained subsets remain non-canonical. --- ## Static metrics Every **completed face**, not merely every family, gets its matching metrics. Required static information: - internal face ID - safe PostScript/internal name - unitsPerEm - ascent - descent - bbox - required glyph mapping - glyph advances - Dmax - Cmax - period width - colon width - SPACE width - hyphen width - asset SHA256 - upstream/license identity. No runtime TTF parsing. --- # E. UI CONNECTION Add Token Font furniture at the **bottom of the existing Token Machine**. Visible structure: **Font ▼** ○ Italic ○ Bold ○ Bold Italic ☐ Underline There is: **NO visible Regular radio.** No Style radio selected means: **Regular completed face.** Style radios are mutually exclusive. --- ## Availability The fixed resource map determines enabled Style choices. ### Condensed - Italic → disabled - Bold → disabled - Bold Italic → disabled - none → Regular ### Modern - Italic → disabled - Bold → enabled - Bold Italic → disabled - none → Regular No synthesis. No fallback family. No hidden substitute face. --- ## Family change into unavailable Style The UI must never retain an impossible active Style. Therefore when a family change makes the currently selected Style unavailable: **normalize the selection to Regular = no Style radio selected.** This is local state normalization, not synthetic typography. --- ## Common / individual furniture Use the established visual grammar where useful for: - ALL/common - current member - linked - unlinked Existing color furniture may serve as a visual/interaction precedent only. Do not share: - color state - color handlers - color ALL authority - picker plumbing. Font and color remain independent. --- # F. PRESENTATION CONNECTION Do not add another presentation engine. Extend the existing resolved Token information with: - effective completed-face ID - fixed safe-slot width - Underline - existing Token Size - existing color - existing alignment. Then existing: `kpdfBuildPresentation()` builds the same `.kpdf-system-value` span using the selected canonical completed face. Browser resource: canonical TTF → `@font-face` → completed face identity. --- ## Safe-slot authority The displayed mannequin's measured width is **not** authority. For completed face `F`: ### Counter `N × Dmax(F)` ### Timestamp Date `8 × Dmax(F) + 2 × width_F(".")` ### Timestamp Time `6 × Dmax(F) + 2 × width_F(":")` ### Timestamp Date & Time `DateSafe(F) + width_F(SPACE) + TimeSafe(F)` ### Serial `8 × Cmax(F) + width_F("-")` where: `Cmax(F) = max advance(A-Z, 0-9)` Each Bold/Italic/BoldItalic completed face uses **its own** metrics. Regular sibling metrics must not be reused. --- ## Existing Token Size Existing Token Size semantics remain authoritative. Static face geometry is scaled through that existing size model rather than inventing another size system. --- ## Alignment Existing alignment places mannequin content **inside the fixed slot**. Slot itself remains invariant for all actual values belonging to that face/form/size combination. --- ## Underline Browser presentation applies a simple stable underline decoration. Underline: - does not select another face - does not alter metrics - adds zero safe-slot width. Later PDF output may reproduce it presentation-side; **that is outside CUT 1**. --- # G. LINK STATE TRANSITIONS ## 1. ALL/common change Change common family/style only. Linked Tokens resolve it immediately. Unlinked Tokens remain unchanged. No per-member synchronization loop required. --- ## 2. UNLINK Take current common: `family + style` Copy once into member individual state. Set unlinked. --- ## 3. Individual change Only individual family/style changes. Common unaffected. Other members unaffected. --- ## 4. RELINK Set linked. Discard individual family/style. Immediately resolve common. --- ## 5. Common change while linked Token OFF **Do nothing to the Token record.** No wake-up. No synchronization. No copy. Common simply changes. --- ## 6. Later ON Effective resolver sees: `linked = true` and therefore uses **current common family/style**. This satisfies OFF membership without touching unavailable furniture. --- # H. FUTURE CONSTRUCTION STEPS CUT 1 should remain internally segmented. ### CUT1-A — Static foundation Add: - canonical resource definitions - completed-face availability - metrics definitions - Browser `@font-face`. No behavioral wiring. ### CUT1-B — Persistence Extend existing Token authority for: - common family/style - linked state - individual family/style - Underline. Add sanitization and restore. Do not touch presentation yet. ### CUT1-C — Furniture Add bottom Token Font furniture: - Font - three Style radios - Underline - ALL/member/link state. Add disabled-style presentation. ### CUT1-D — State machine Implement only: - common change - unlink - individual change - relink/discard - OFF lazy-reference semantics. ### CUT1-E — Mannequin integration Connect effective completed face to existing presentation renderer. Disconnect legacy Bold/Italic from **new Font path** without deleting legacy saved data. ### CUT1-F — Safe slots Replace mannequin/intrinsic width authority with approved completed-face metrics for: - Counter - Date - Time - DateTime - Serial. Preserve existing alignment and Token Size. ### CUT1-G — Regression cleanup Verify no duplicate Font authority, no accidental color coupling, and no scope leakage. Do not combine later Text/Bake/PDF work into CUT 1. --- # I. STATIC QA PLAN Verify: - exact DEV166 parent/hash - exactly canonical derivative resources - expected asset hashes - exact completed-face availability - no synthetic face - no visible Regular radio - no Style = Regular - unavailable Style disabled - family transition cannot preserve impossible Style - exact face → exact metrics - no Regular metrics borrowed by sibling faces - no runtime parser - no runtime subsetting - no host discovery - no new DB - no font registry DB - one Token authority - common state inside existing design authority - sanitization whitelist - restore coverage - relink leaves no dormant individual choice - OFF linked member requires no synchronized value - Underline independent - legacy Bold/Italic not migrated/reinterpreted/deleted - no Token grammar/parser modification - no Text authority modification - no Paper/Image authority modification - no FINAL/JPG/Bake work - no Sample Mask redesign. --- # J. RUNTIME QA PLAN ### Persistence Test: SAVE → reload → exact Font/Style/link/Underline restore. Also verify existing Working / Refill / Stock transport. --- ### Completed faces Exercise all available faces: Neutral: - Regular - Italic - Bold - Bold Italic Typewriter: - Regular - Italic - Bold - Bold Italic Editorial: - Regular - Italic - Bold - Bold Italic Condensed: - Regular Modern: - Regular - Bold Verify missing styles are disabled and cannot become effective. --- ### Style - no radio = Regular - one radio only - family switch with unavailable active Style → Regular - no browser synthetic fallback. --- ### Underline Test independently: - OFF - ON with Regular and each available Style class. Verify zero slot-width effect. --- ### Link lifecycle Test: 1. common family/style change 2. linked members follow 3. unlink member 4. appearance initially remains same 5. individual family/style change 6. common changes 7. individual remains independent 8. relink 9. individual choice disappears 10. common changes again 11. unlink again 12. starts from **new current common**, not old individual. --- ### OFF lazy-reference lifecycle 1. Token linked 2. Token becomes OFF/unavailable 3. common family/style changes repeatedly 4. no OFF member synchronization required 5. Token becomes ON 6. it immediately displays latest common family/style. **This is the Human-approved behavior.** --- ### Token forms Verify existing mannequin for: - Counter - Timestamp Date - Timestamp Time - Timestamp Date & Time - Serial. --- ### Safe slots For every completed face category: - face-specific Dmax/Cmax used - punctuation metrics correct - Counter N-digit slot - Date slot - Time slot - DateTime slot - Serial slot - alignment inside slot - Token Size scaling. Do not validate safe width by mannequin `offsetWidth` alone. --- ### Regression Verify: - Token color unchanged - color link unchanged - marker source unchanged - tokenizer unchanged - raw Text authority unchanged - Token issuance/copy behavior unchanged - availability behavior unchanged - Text capacity unchanged. If shared presentation code touched by CUT 1 is also used by Sample Mask, perform a narrow Sample Mask regression only. No repair/redesign unless separately ordered. --- # K. WATCH / STOP ## CLOSED — OFF/unavailable Token Former WATCH resolved by Human. **Accepted route:** OFF furniture may sleep. Linked OFF Token references common. No synchronization machinery. Later ON naturally sees current common. **CLOSED.** --- ## WATCH — Timestamp member separation DEV166 contains distinct saved Date / Time / DateTime definitions plus existing legacy handling. Do not silently collapse them into one Font member during construction. Follow actual saved Token definitions unless a later exact authority says otherwise. --- ## WATCH — legacy Serial decoration Legacy Serial Bold/Italic data may remain stored. New Token Font must not: - consume it as completed-face state - migrate it - delete it for tidiness. Underline alone is retained as independent decoration. --- ## WATCH — unresolved marker visual Existing unresolved-token/status presentation may itself use italic CSS. That is not selected Token typography and must not be accidentally removed under the prohibition on synthetic Token faces. --- ## STOP CONDITIONS STOP immediately if construction evidence proves CUT 1 requires: - new Product authority - unresolved migration decision - new DB/schema outside existing design - second Token authority - runtime TTF parser - synthetic completed face - Token grammar/parser change - Paper-axis modification - Sample Mask redesign - FINAL/PDF construction - Text Operation construction - Unicode Bake construction. And per updated Workshop rule: > **If any resolvable confirmation/question appears before the final report, STOP there and ask Shamyue first. Do not finish a giant report with the question buried inside it. Once Shamyue closes it, resume and return the complete deliverable.** --- # TECHNICAL DECISIONS **TD-1** — Existing `design.token_symbols` remains sole Token persistence authority. **TD-2** — Common Font state lives within that existing design authority; no new persistence system. **TD-3** — Linked members naturally reference common; common changes do not synchronize copies into members. **TD-4** — UNLINK copies current common once. **TD-5** — RELINK destroys individual family/style. **TD-6** — OFF linked Tokens remain common members by reference while their furniture sleeps. **TD-7** — Completed face is resolved from fixed family/style availability map. **TD-8** — Missing completed faces are disabled, never synthesized. **TD-9** — no Style radio selected = Regular. **TD-10** — family change that invalidates selected Style normalizes to Regular. **TD-11** — Underline remains independent presentation decoration and contributes zero safe-slot width. **TD-12** — Existing mannequin renderer is extended, not duplicated. **TD-13** — Safe-slot authority comes exclusively from completed-face static metrics. **TD-14** — Legacy Serial Bold/Italic state is neither new Font authority nor cleanup target. --- # NEW HUMAN DECISION REQUIRED **NONE.** The only Human confirmation reached during the draft—the OFF/unavailable behavior—was presented to Shamyue and is now CLOSED: > **怠惰な奴でいい★** No further Human boundary was encountered. --- # FINAL CHECK LOG **TARGET:** DEV166 CUT 1 Token Font Foundation **METHOD:** exact-parent verification + narrow SOURCE mapping + accepted prior Text/Token witness + Human boundary closure **PARENT:** SHA256 exact match — **PASS** **SOURCE authority reuse:** **PASS** **Single Token authority:** **PASS** **Persistence route:** **PASS** **Font/Style availability model:** **PASS** **ALL/unlink/relink:** **PASS** **OFF lazy reference:** **PASS / HUMAN CLOSED** **Underline separation:** **PASS** **Safe-slot route:** **PASS** **No synthetic faces:** **PASS** **No runtime parser:** **PASS** **No new DB:** **PASS** **Out-of-scope construction:** **NONE** ## RESULT **CONSTRUCTION-READY BLUEPRINT DRAFT: COMPLETE** **READY FOR AIDE REDLINE: YES** **PRODUCT CONSTRUCTION: NONE** **DEV166 MODIFIED: NO** **NEW CHILD CREATED: NO** 🕊️ **補佐へ返却可。** で、そうそう(笑) 今回みたいに確認が**一個だけ**なら、先に「しゃむーこれどっちー?」→「怠惰★」→完成版、の方が圧倒的に安い。 長文を一回全部建ててから「そこ違う」で建て直す必要がなくなるから、今後これでいく★ [USER] 🕊️ 🕊️ KAIA PDF FREE — CUT 1 TOKEN FONT FOUNDATION AIDE REDLINE — NARROW TECHNICAL COMPLETION REQUEST TO PDF TEXT / TOKEN FONT SPECIALIST YOUR BLUEPRINT DRAFT IS ACCEPTED IN STRUCTURE. NO HUMAN / PRODUCT DECISION IS OPEN. DO NOT REDESIGN THE BLUEPRINT. DO NOT CONSTRUCT. ONLY COMPLETE THE THREE REMAINING TECHNICAL DETAILS BELOW SO AIDE CAN INK THE BLUEPRINT AND CONVERT IT INTO A CONSTRUCTION ORDER. ================================================== REDLINE 1 — EXACT SAVED DATA PLACEMENT ================================================== The conceptual model is accepted: - common family/style - per-Token font_linked - individual family/style only while unlinked - per-Token Underline - linked OFF Token references common lazily But the draft currently leaves the exact saved representation until construction. CLOSE THAT NOW FROM DEV166 SOURCE. Show the exact proposed location inside the existing saved design / design.token_symbols structure for: - common Font family - common Font Style - member font_linked - unlinked individual family - unlinked individual Style - Underline Use exact proposed field names. Most importantly, prove that the chosen common-state location will NOT be mistaken for an actual Token definition by existing enumeration, parser, sanitizer, restore, or presentation logic. If a reserved/meta key inside design.token_symbols is unsafe, identify the smallest SOURCE-supported alternative still within the EXISTING design authority. NO new DB. NO second Token authority. If SOURCE does not safely permit either route: STOP. ================================================== REDLINE 2 — EXACT CANONICAL ASSET PLACEMENT ================================================== Specify the exact future plugin paths for all 15 canonical binaries. Also specify the exact SOURCE-level fixed map location that will bind: completed face ID → asset path → expected SHA256 → metrics ID → style availability Construction must consume the canonical binaries proven by Font Lab. DO NOT regenerate them during Product construction. If the exact canonical binaries are not available to the construction seat when construction begins: STOP. A hash alone is not permission to recreate a replacement binary. No assets are to be installed during this blueprint-completion turn. ================================================== REDLINE 3 — EXACT FACE-SPECIFIC METRICS TABLE ================================================== Bring the already-PASS canonical metrics evidence directly into the blueprint. For every one of the 15 completed faces, freeze the exact values for: - Dmax - Cmax - width("-") - width(".") - width(":") - width(SPACE) and, where useful for construction verification, the already-proven: - Date safe coefficient - Time safe coefficient - DateTime safe coefficient - Serial safe coefficient Do NOT recompute these during Product construction. Do NOT substitute Regular metrics for sibling faces. Do NOT merely say "use prior evidence." Put the exact accepted values into the construction blueprint so the future static map can be audited directly against one document. ================================================== PRESERVE THE REST ================================================== Do NOT reopen: - OFF lazy-reference Human closure - common/unlink/relink model - Style availability - no-visible-Regular model - Underline independence - family invalid-style → Regular normalization - existing mannequin renderer - safe-slot formulas - legacy Serial B/I boundary - DEV166 Paper-axis - Sample Mask - later Text/Bake/PDF/JPG CUTs No Human question is currently required. ================================================== RETURN ================================================== Return the COMPLETE blueprint again with these three details integrated. Do not return only a patch note. Classification after successful completion should be: CONSTRUCTION-READY BLUEPRINT — COMPLETE FOR AIDE INKING Still: NO CONSTRUCTION NO DEV167 NO ZIP NO DEV166 MODIFICATION NO ASSET INSTALLATION [ASSISTANT] 🛑 しゃむー、ここで一回STOP。 親方のREDLINE 1はSOURCEから閉じられる。 REDLINE 2もcanonical assetの将来配置を施工図として固定できる。 でも **REDLINE 3の「already-PASS exact canonical metrics 15顔分」** が、今こっちで回収できてない。 拾えてる既存証拠は途中までで、 - Neutral 4顔:Dmax/Cmax/punctuation/safe coefficients → 回収済み - Typewriter 4顔 → 回収済み - Editorial 4顔 → **途中までしか回収できてない** - Condensed Regular → 一部のみ - Modern Regular/Bold → 一部のみ という状態。 親方命令は明確に、 > **Do NOT recompute these** > **Do NOT merely say "use prior evidence."** > **exact accepted valuesを施工図へ入れろ** なので、ここで私がfont binaryから再計算すると命令違反になるし、欠けた数字を推定するのはもっと駄目。 だから前にFont Labが吐いた **15顔のcanonical metrics表/witness** があるなら、それだけこっちにぺったんしてほしいー! ファイルでも鳩本文でもOK。 それをもらえば、**REDLINE 1・2も統合して、確認事項なしのCOMPLETE blueprintを一発で全部吐ける。** 今は調査をそれ以上進めず、ここで止めてるよー🕊️ [USER] 🕊️ KAIA PDF FREE — TOKEN FONT 15-FACE CANONICAL METRICS WITNESS Canonical derivative-named subset binaries. Relevant advance metrics verified preserved against each exact original face. Units are font design units. Face Dmax Cmax "-" "." ":" SPACE ----------------------------------------------------------------- IBM Plex Sans Regular 600 891 399 272 292 236 IBM Plex Sans Bold 600 973 403 310 330 236 IBM Plex Sans Italic 600 862 387 273 293 236 IBM Plex Sans Bold Italic 600 941 395 307 327 236 Courier Prime Regular 1228 1228 1228 1228 1228 1228 Courier Prime Bold 1228 1228 1228 1228 1228 1228 Courier Prime Italic 1228 1228 1228 1228 1228 1228 Courier Prime Bold Italic 1228 1228 1228 1228 1228 1228 Source Serif 4 Regular 500 962 312 300 300 233 Source Serif 4 Bold 542 981 339 300 300 214 Source Serif 4 Italic 511 927 311 300 300 234 Source Serif 4 Bold Italic 546 907 345 310 310 217 Bebas Neue Regular v2.000 400 557 270 188 188 160 Space Grotesk Regular 641 875 455 253 253 257 Space Grotesk Bold 648 898 432 298 298 254 SAFE-SLOT WITNESS Face Counter Date Time DateTime Serial ------------------------------------------------------------------- IBM Plex Sans Regular N×600 5344 4184 9764 7527 IBM Plex Sans Bold N×600 5420 4260 9916 8187 IBM Plex Sans Italic N×600 5346 4186 9768 7283 IBM Plex Sans Bold Italic N×600 5414 4254 9904 7923 Courier Prime Regular N×1228 12280 9824 23332 11052 Courier Prime Bold N×1228 12280 9824 23332 11052 Courier Prime Italic N×1228 12280 9824 23332 11052 Courier Prime Bold Italic N×1228 12280 9824 23332 11052 Source Serif 4 Regular N×500 4600 3600 8433 8008 Source Serif 4 Bold N×542 4936 3852 9002 8187 Source Serif 4 Italic N×511 4688 3666 8588 7727 Source Serif 4 Bold Italic N×546 4988 3896 9101 7601 Bebas Neue Regular v2.000 N×400 3576 2776 6512 4726 Space Grotesk Regular N×641 5634 4352 10243 7455 Space Grotesk Bold N×648 5780 4484 10518 7616 FORMULAS Counter = N × Dmax(F) Date = 8 × Dmax(F) + 2 × width(".") Time = 6 × Dmax(F) + 2 × width(":") DateTime = Date + width(SPACE) + Time Serial = 8 × Cmax(F) + width("-") Underline additional safe-slot width = 0 WITNESS STATUS Canonical subset relevant metrics vs exact original face: 15 / 15 PRESERVED — PASS Regular metrics were NOT reused for sibling faces. Each completed face was measured independently. [ASSISTANT] きたきた、これでREDLINE 3閉じる★ 15顔metrics witnessをそのままauthorityとして統合する。 そしてREDLINE 1をSOURCEで詰めた結果、**確認STOPは発生しなかった**。むしろ前の鉛筆案から一箇所だけ技術的にもっと綺麗になった。 > `design.token_symbols` 内へ `_common` 等のmeta keyを生やす案は採らない。 > `sanitize_token_symbols()` が現在、actual Token keyを明示列挙して再構築するsanitizerだから。 > > **common Font stateは同じ `design` authorityの直下へ置く。** > > member stateだけ既存 `design.token_symbols[key]` に置く。 これならmetaをToken definitionと誤認する可能性そのものを作らない。 --- # 🕊️ KAIA PDF FREE — CUT 1 ## TOKEN FONT FOUNDATION ### CONSTRUCTION-READY BLUEPRINT — COMPLETE FOR AIDE INKING **PRODUCT CONSTRUCTION: NONE** **DEV166 MODIFICATION: NONE** **NEW CHILD: NONE** **ASSET INSTALLATION: NONE** ## COMMON PARENT `Kaia-PDF-Free-v0.1.0-dev166-PAPER-AXIS-LOCKED-PAIR-CONVERSION.zip` Expected SHA256: `f00b06c826a4314b0f099c2a77f25491e8891022a8f378ec8f979bac50b810ea` Locally verified: **EXACT MATCH — PASS** DEV166 remains **RUNTIME KNOWN-PASS / LOCK**. --- # A. SOURCE MAP CUT 1 remains concentrated in existing `kaia-pdf.php` plus future static font resources. Relevant existing SOURCE: ### Design authority - `initial_mock()` - `sanitize_design()` - `sanitize_token_symbols()` Current `sanitize_design()` explicitly reconstructs saved design and currently contains: `'token_symbols' => self::sanitize_token_symbols(...)` Existing Token persistence therefore already belongs to the saved **design** authority. ### Token sanitizer `sanitize_token_symbols()` explicitly enumerates only: `counter` `serial` `timestamp1` `date` `time` `datetime` and reconstructs each recognized Token definition. This matters for REDLINE 1. ### Browser persistence Existing hidden input: `#kpdf-token-symbols-json` with: `name="design[token_symbols_json]"` JS authority: `kpdfTokenSymbols` Persistence: `kpdfPersistTokenSymbols()` → JSON hidden field → `scheduleWorking()` → existing design SAVE lifecycle. ### Existing restore/presentation - `kpdfApplyTokenDefinitionToMember()` - `kpdfTokenFromDefinition()` - `kpdfTokenize()` - `kpdfResolveToken()` - `kpdfBuildPresentation()` - `kpdfRefreshPresentation()` Existing Text structure remains: `.kpdf-text-object` → raw `.kpdf-text-content` → sibling `.kpdf-system-presentation` ### Availability `kpdfSetTokenSeat(member,available)` Existing unavailable seat disables its internal: `select,input,button` Human has already CLOSED this boundary using lazy common reference. --- # B. CURRENT DATA FLOW Current member state: Token Machine → `kpdfRefreshTokenMember()` → `kpdfTokenSymbols[key]` → `kpdfPersistTokenSymbols()` → hidden `design[token_symbols_json]` → `sanitize_design()` → `sanitize_token_symbols()` → saved `design.token_symbols`. Restore: saved `design.token_symbols` → `kpdfTokenSymbols` → `kpdfApplyTokenDefinitionToMember()`. Presentation: `kpdfTokenSymbols` → `kpdfTokenFromDefinition()` → `kpdfTokenize()` → `kpdfResolveToken()` → `kpdfBuildPresentation()`. CUT 1 extends this existing path. No second renderer or parser. --- # C. EXACT SAVED DATA PLACEMENT ## C-1. Common Font state ### SOURCE FACT A reserved/meta key **inside** `design.token_symbols` is unnecessary and inferior. Current sanitizer explicitly iterates: `['counter','serial','timestamp1','date','time','datetime']` and returns a freshly reconstructed `$out`. An arbitrary `_common`, `_font`, `meta`, etc. entry would currently be discarded unless the Token sanitizer itself were broadened to preserve non-Token metadata. That would unnecessarily mix common design metadata into the actual Token-definition map. ### ACCEPTED TECHNICAL ROUTE Place common state directly in the **existing `design` authority**, alongside `token_symbols`. Exact fields: ```text design.token_font_family design.token_font_style ``` Canonical values: `token_font_family`: - `neutral` - `typewriter` - `editorial` - `condensed` - `modern` `token_font_style`: - `regular` - `italic` - `bold` - `bolditalic` Default: ```text token_font_family = neutral token_font_style = regular ``` These are added to `initial_mock()` and explicitly sanitized in `sanitize_design()`. They travel with the same saved design through existing Working / Refill / Stock authority. **No second Token authority is created.** They are simply design-level common defaults governing the existing Token members. --- ## C-2. Member state Member Font state belongs inside its existing Token definition. Exact fields: ```text font_linked font_family font_style underline ``` ### Linked representation ```text font_linked = 1 ``` When linked: **`font_family` and `font_style` MUST be absent from the sanitized saved member.** Effective face comes from: ```text design.token_font_family design.token_font_style ``` No dormant individual state. ### Unlinked representation ```text font_linked = 0 font_family = font_style =