From 6b4c4493a15db7bb6f9b3371a0152f0602ec37c0 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 12:27:37 -0500
Subject: [PATCH 01/74] fix(type): typing with an input method works on the
canvas: the composed words show at the caret, and its keys are left to it
---
frontend/HASHOUT_LOG.md | 21 +++++++++
frontend/src/app.ts | 1 +
frontend/src/styles/formpath.css | 2 +-
frontend/src/ui/text-editor.ts | 76 +++++++++++++++++++++++---------
4 files changed, 78 insertions(+), 22 deletions(-)
diff --git a/frontend/HASHOUT_LOG.md b/frontend/HASHOUT_LOG.md
index 05f9bbc..3f7b50f 100644
--- a/frontend/HASHOUT_LOG.md
+++ b/frontend/HASHOUT_LOG.md
@@ -4944,3 +4944,24 @@ Seen in headless Chromium (Playwright 1.63.0) against the engine serving the bui
The family's design alignment (FormVis's names are the family's names). formpath's token values already equal FormVis's in every shared name but one: `--z-taskbar` stays 120 (FormVis 900), because z-index values stay each app's own. Seven FormVis names were missing and are now defined with FormVis Studio Dark's values: `--z-under` -1, `--z-local-2` 2, `--z-local-4` 4, `--z-local-5` 5, `--cv-tabs-h` 34px, `--cv-action-blue` #3b82f6, `--cv-action-violet` #8b5cf6. No stylesheet uses them yet, so nothing on screen changes; formpath's own names (layout values such as `--cv-chip` or `--fp-help-h`) have no FormVis counterpart, so there is no alias to add. No rule was rewritten.
Seen in headless Chromium at 1323x860 (the shell's fallback window size), the build before and after, dark and light: the resolved value of every token on `:root` (222 before, 229 after) differs only by the seven new names; the Home screen, the New Document dialog and the canvas with a new document are pixel-identical, apart from one run where 4x2 pixels at an anti-aliased edge of the canvas differed by one in one channel (the first run was identical); a cold load under 4x CPU throttle, recorded from a black page, shows no white frame in either build.
+
+### src/ui/text-editor.ts, src/app.ts, src/styles/formpath.css · typing with an input method (issue 17)
+- refers-to: src/ui/text-editor.ts :: TextEditor (constructor, end, take, place, key, selectWord, overlay, drawPre), prevPoint, nextPoint, backPoint, GRAPHEMES, WORDS; src/app.ts :: the window keydown listener; src/styles/formpath.css :: .cv-text-editor
+- kind: fix
+- logged: v0.60.0 · 2026-11-26
+
+Issue 17 (a Traditional Chinese Windows user): "ensure support for text input and the proper display of non-English fonts". Read against the code and run in Chromium with composition events sent over the DevTools protocol (`Input.imeSetComposition`, `Input.insertText`), typing had these faults; each is fixed here.
+
+- The words being composed were invisible. The textarea is 2px wide and transparent, and the overlay drew only the caret, so with Bopomofo, Cangjie, Pinyin, Japanese or Hangul a person typed blind until the commit. `compositionupdate` now keeps the string in `pre`, and `overlay` draws it at the caret through `drawPre`: the text's own font and on-screen size (never under 12px), on the handle colour with the accent rule under it, rotated with the line. It is drawn on the overlay canvas; no DOM node is added or changed for it. Not shown: which clause of a long Japanese conversion is active (the events do not say).
+- The candidate window sat at a fixed 16px line whatever the size and zoom, and stayed behind after a click, a zoom or a pan. `place` now also writes the textarea's font size (the caret's height on screen, 1 to 512px), the CSS makes its height one line of that size, a new text that does not exist yet is anchored at the top of its first line, and `place` runs after `caretTo`, `selectWord`, `selectAll`, `clamp` and on the engine's `viewport` event.
+- Keys the input method is using were also acted on. `key` returns at once while a composition is going on, and for a keydown with keyCode 229. In WebKit (the macOS and Linux desktop windows) the Enter that confirms a candidate arrives after `compositionend` with keyCode 229 and `key` "Enter", so every confirmed word got a new line; Backspace, the arrows, Tab and Escape misfired the same way. WebView2 reports "Process" for these keys, so Windows was mostly spared.
+- Text still being composed was thrown away when editing ended (a click elsewhere, another tool, another document): `end` cleared `id` and `pending` before the blur that makes the browser commit. `end` now blurs first and flushes the textarea, then clears.
+- Opening the font menu ended the edit, because the menu's list is a child of `body` and the blur check did not know it; `.cv-dd-pop` is in that list now. After a choice in the options bar or a panel the focus is on `body`, and the next keys were read as tool shortcuts (V switched to the Selection tool, Backspace cleared the object). The window listener now hands such keys to `TextEditor.take`, which focuses the textarea (so the character, or the composition, lands there) and runs `key` for the keys that produce no character. Keys with Ctrl or Cmd, keys inside a list or menu, and keys on a control reached with the keyboard are left alone.
+- AltGr letters ran commands: on Windows AltGr sets Ctrl and Alt together, so the Polish a-ogonek selected all and z-dot undid. Select All and Undo in `key` now need Alt to be up.
+- Backspace took an emoji apart (a family, a flag, a heart with its variation selector lost one piece per press). `backPoint` removes such a cluster whole and still steps one code point elsewhere, so a Hangul syllable built from jamo and a letter with combining marks lose one part per press. The arrows and Delete step by grapheme cluster (`Intl.Segmenter`), with the code point step as the fallback.
+- A double click selected nothing in Chinese or Japanese and half of an accented word (`\w` is ASCII). `selectWord` asks `Intl.Segmenter` for the word, and falls back to letters, digits and marks of any script.
+- Pasted text is normalised to NFC, because layout sets one glyph per code point and text copied from the macOS Finder arrives decomposed.
+
+Run in headless Chrome 4x CPU throttled on a slow network, against the engine serving the built window: the composed string shown for a new text and inside an existing one and gone after a cancel; a 229 Enter adds no line; text composed and then clicked away from is kept; the three emoji clusters go in three presses; a font chosen from the options bar mid-edit and typing goes on in the same text. Layout shift 0, no console error. Not run: a real input method on Windows, macOS or Linux; WebKit.
+
+Left as they were: shortcuts are matched by the physical key (`e.code`), so on AZERTY the key labelled Z does not undo while typing; Ctrl or Alt with Backspace still removes a whole run of unspaced Chinese; the composed string is drawn over the text after the caret instead of pushing it along.
diff --git a/frontend/src/app.ts b/frontend/src/app.ts
index eb9a646..770245e 100644
--- a/frontend/src/app.ts
+++ b/frontend/src/app.ts
@@ -2097,6 +2097,7 @@ export function startApp(): void {
if (menubar.isOpen || contextMenu.isOpen) { if (e.key === 'Escape') { e.preventDefault(); menubar.close(); contextMenu.close(); } return; }
const target = e.target instanceof Element ? e.target : null;
if (target?.closest('input, textarea, select, [contenteditable="true"]')) return;
+ if (typing.active && !e.ctrlKey && !e.metaKey && !target?.closest('[role="listbox"], [role="menu"]') && !(target?.matches(':focus-visible') && target.closest('button, [role="button"], [role="option"], [role="menuitem"], [role="tab"]'))) { typing.take(e); return; }
if (e.code === 'Space' && target?.matches(':focus-visible') && target.closest('button, [role="button"], [role="option"], [role="menuitem"], [role="tab"]')) return;
if (e.code === 'Space' && !e.metaKey && !e.ctrlKey) { e.preventDefault(); if (!e.repeat) stage.setSpace(true); return; }
if (stage.toolKeydown(e)) { e.preventDefault(); return; }
diff --git a/frontend/src/styles/formpath.css b/frontend/src/styles/formpath.css
index 58f0d6f..f75b1e5 100644
--- a/frontend/src/styles/formpath.css
+++ b/frontend/src/styles/formpath.css
@@ -1,4 +1,4 @@
-.cv-text-editor { position: absolute; left: 0; top: 0; z-index: var(--z-base); width: 2px; height: 1.2em; margin: 0; padding: 0; border: 0; outline: 0; resize: none; overflow: hidden; opacity: 0; color: transparent; background: transparent; caret-color: transparent; white-space: pre; pointer-events: none; font-size: 16px; }
+.cv-text-editor { position: absolute; left: 0; top: 0; z-index: var(--z-base); width: 2px; height: 1em; line-height: 1; margin: 0; padding: 0; border: 0; outline: 0; resize: none; overflow: hidden; opacity: 0; color: transparent; background: transparent; caret-color: transparent; white-space: pre; pointer-events: none; font-size: 16px; }
.cv-isolation { position: absolute; top: var(--space-2); left: 50%; z-index: var(--z-raised); display: flex; align-items: center; gap: var(--space-2); padding: 3px 3px 3px 12px; transform: translateX(-50%); border: 1px solid var(--glass-border); border-radius: 10px; background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); box-shadow: var(--shadow-md); color: var(--text-primary); font-size: 12px; white-space: nowrap; }
.cv-isolation[hidden] { display: none; }
diff --git a/frontend/src/ui/text-editor.ts b/frontend/src/ui/text-editor.ts
index a525405..72593ba 100644
--- a/frontend/src/ui/text-editor.ts
+++ b/frontend/src/ui/text-editor.ts
@@ -1,8 +1,8 @@
import { findNode } from '../engine/doc';
import { apply, invert, rectContains, inflate } from '../engine/geometry';
-import { caretAt, deleteText, indexAt, insertText, layoutText, plainText, selectionQuads, stepLine } from '../engine/text';
+import { caretAt, cssFont, DEFAULT_CHAR, deleteText, indexAt, insertText, layoutText, plainText, selectionQuads, stepLine, styleAt } from '../engine/text';
import type { CharStyle, Engine, PathData, Pt, TextNode } from '../engine';
-import type { ToolContext } from '../extensions/registry';
+import type { Paint, ToolContext } from '../extensions/registry';
import { el } from './dom';
import type { TypeRequest } from './stage';
@@ -20,23 +20,26 @@ export class TextEditor {
private on = true;
private timer = 0;
private composing = false;
+ private pre = '';
redraw: () => void = () => undefined;
style: () => Partial = () => ({});
constructor(host: HTMLElement, private readonly engine: Engine) {
this.ta = el('');
host.appendChild(this.ta);
- this.ta.addEventListener('compositionstart', () => { this.composing = true; });
- this.ta.addEventListener('compositionend', () => { this.composing = false; this.flushInput(); });
+ this.ta.addEventListener('compositionstart', () => { this.composing = true; this.place(); });
+ this.ta.addEventListener('compositionupdate', (e) => { this.pre = e.data; this.on = true; this.redraw(); });
+ this.ta.addEventListener('compositionend', () => { this.composing = false; this.pre = ''; this.flushInput(); this.redraw(); });
this.ta.addEventListener('input', () => { if (!this.composing) this.flushInput(); });
this.ta.addEventListener('keydown', (e) => this.key(e));
this.ta.addEventListener('copy', (e) => { const s = this.selectedText(); if (!s) return; e.preventDefault(); e.clipboardData?.setData('text/plain', s); });
this.ta.addEventListener('cut', (e) => { const s = this.selectedText(); if (!s) return; e.preventDefault(); e.clipboardData?.setData('text/plain', s); this.replace(''); });
- this.ta.addEventListener('paste', (e) => { e.preventDefault(); const s = e.clipboardData?.getData('text/plain') ?? ''; if (s) this.replace(s.replace(/\r\n?/g, '\n')); });
- this.ta.addEventListener('blur', () => { if (this.active) window.setTimeout(() => { if (this.active && document.activeElement !== this.ta && !document.activeElement?.closest('.cv-dock, .cv-props-col, .cv-options, .cv-layers, .cv-dialog')) this.end(); }, 0); });
+ this.ta.addEventListener('paste', (e) => { e.preventDefault(); const s = e.clipboardData?.getData('text/plain') ?? ''; if (s) this.replace(s.replace(/\r\n?/g, '\n').normalize('NFC')); });
+ this.ta.addEventListener('blur', () => { if (this.active) window.setTimeout(() => { if (this.active && document.activeElement !== this.ta && !document.activeElement?.closest('.cv-dock, .cv-props-col, .cv-options, .cv-layers, .cv-dialog, .cv-dd-pop')) this.end(); }, 0); });
engine.on('tool', () => { if (this.active && !/^(type|areaType|typePath|typeVertical|areaTypeVertical|typePathVertical)$/.test(engine.tool)) this.end(); });
engine.on('active', () => { if (this.active) this.end(); });
engine.on('history', () => { if (this.id && !this.node()) this.end(); else this.clamp(); });
+ engine.on('viewport', () => { if (this.active) this.place(); });
}
get active(): boolean { return !!this.id || !!this.pending; }
@@ -75,16 +78,22 @@ export class TextEditor {
end(): void {
if (!this.active) return;
+ if (document.activeElement === this.ta) this.ta.blur();
+ this.composing = false; this.pre = ''; this.flushInput();
const id = this.id;
this.id = null; this.pending = null; this.dragging = false;
window.clearInterval(this.timer); this.timer = 0;
- if (document.activeElement === this.ta) this.ta.blur();
if (id && this.engine.nodeById(id) && !this.engine.textOf(id)) this.engine.deleteSelection([id]);
this.redraw();
}
private focus(): void { this.ta.value = ''; this.ta.focus({ preventScroll: true }); this.place(); }
+ take(e: KeyboardEvent): void {
+ this.ta.focus({ preventScroll: true });
+ if (e.key.length !== 1 && e.key !== 'Process' && e.key !== 'Dead' && e.keyCode !== 229) this.key(e);
+ }
+
private startBlink(): void {
window.clearInterval(this.timer);
this.on = true;
@@ -105,6 +114,7 @@ export class TextEditor {
this.caret = this.indexFor(n, p);
if (!extend) this.anchor = this.caret;
this.startBlink();
+ this.place();
this.redraw();
}
@@ -113,17 +123,19 @@ export class TextEditor {
if (!n) return;
const t = plainText(n), i = this.indexFor(n, p);
let a = i, b = i;
- while (a > 0 && /\w/.test(t[a - 1])) a--;
- while (b < t.length && /\w/.test(t[b])) b++;
+ const s = WORDS?.segment(t).containing(Math.min(i, t.length - 1));
+ if (s?.isWordLike) { a = s.index; b = s.index + s.segment.length; }
+ else { while (a > 0 && WORD_CHAR.test(t[a - 1])) a--; while (b < t.length && WORD_CHAR.test(t[b])) b++; }
this.anchor = a; this.caret = b;
+ this.place();
this.redraw();
}
- selectAll(): void { const n = this.node(); if (!n) return; this.anchor = 0; this.caret = plainText(n).length; this.redraw(); }
+ selectAll(): void { const n = this.node(); if (!n) return; this.anchor = 0; this.caret = plainText(n).length; this.place(); this.redraw(); }
private selectedText(): string { const r = this.range(), n = this.node(); return r && n ? plainText(n).slice(r[0], r[1]) : ''; }
- private clamp(): void { const n = this.node(); if (!n) return; const len = plainText(n).length; this.caret = Math.min(this.caret, len); this.anchor = Math.min(this.anchor, len); this.redraw(); }
+ private clamp(): void { const n = this.node(); if (!n) return; const len = plainText(n).length; this.caret = Math.min(this.caret, len); this.anchor = Math.min(this.anchor, len); this.place(); this.redraw(); }
private flushInput(): void {
const v = this.ta.value;
@@ -198,13 +210,14 @@ export class TextEditor {
private key(e: KeyboardEvent): void {
e.stopPropagation();
+ if (e.isComposing || this.composing || e.keyCode === 229) return;
const mod = /Mac/.test(navigator.platform) ? e.metaKey : e.ctrlKey, n = this.node();
const text = n ? plainText(n) : '';
switch (e.key) {
case 'Escape': e.preventDefault(); { const id = this.id; this.end(); this.engine.setTool('selection'); if (id && this.engine.nodeById(id)) this.engine.select([id]); } return;
case 'Enter': e.preventDefault(); if (n?.mode !== 'path') this.replace('\n'); return;
case 'Tab': e.preventDefault(); this.replace('\t'); return;
- case 'Backspace': e.preventDefault(); if (this.range()) this.replace(''); else if (this.caret > 0) { this.anchor = mod || e.altKey ? wordStart(text, this.caret) : prevPoint(text, this.caret); this.replace(''); } return;
+ case 'Backspace': e.preventDefault(); if (this.range()) this.replace(''); else if (this.caret > 0) { this.anchor = mod || e.altKey ? wordStart(text, this.caret) : backPoint(text, this.caret); this.replace(''); } return;
case 'Delete': e.preventDefault(); if (this.range()) this.replace(''); else if (this.caret < text.length) { this.anchor = nextPoint(text, this.caret); this.replace(''); } return;
case 'ArrowLeft': case 'ArrowRight': case 'ArrowUp': case 'ArrowDown': {
e.preventDefault();
@@ -217,25 +230,26 @@ export class TextEditor {
case 'Home': e.preventDefault(); this.move(this.lineEdge(false), e.shiftKey); return;
case 'End': e.preventDefault(); this.move(this.lineEdge(true), e.shiftKey); return;
}
- if (mod && e.code === 'KeyA') { e.preventDefault(); this.selectAll(); return; }
- if (mod && e.code === 'KeyZ') { e.preventDefault(); if (e.shiftKey) this.engine.redo(); else this.engine.undo(); return; }
+ if (mod && !e.altKey && e.code === 'KeyA') { e.preventDefault(); this.selectAll(); return; }
+ if (mod && !e.altKey && e.code === 'KeyZ') { e.preventDefault(); if (e.shiftKey) this.engine.redo(); else this.engine.undo(); return; }
}
private place(): void {
const n = this.node(), v = this.engine.current?.viewport;
if (!v) return;
- let at: Pt;
- if (n) { const c = caretAt(n, this.caret); at = v.toScreen(c.x, c.y); }
- else if (this.pending) at = v.toScreen(this.pending.x, this.pending.y);
+ let at: Pt, h: number;
+ if (n) { const c = caretAt(n, this.caret); at = v.toScreen(c.x, c.y); h = c.h * v.zoom; }
+ else if (this.pending) { h = (this.style().size ?? 12) * v.zoom; const s = v.toScreen(this.pending.x, this.pending.y); at = this.pending.mode === 'area' || this.pending.vertical ? s : { x: s.x, y: s.y - h * 0.8 }; }
else return;
- const x = `${Math.round(at.x)}px`, y = `${Math.round(at.y)}px`;
+ const x = `${Math.round(at.x)}px`, y = `${Math.round(at.y)}px`, fs = `${Math.max(1, Math.min(512, Math.round(h)))}px`;
if (this.ta.style.left !== x) this.ta.style.left = x;
if (this.ta.style.top !== y) this.ta.style.top = y;
+ if (this.ta.style.fontSize !== fs) this.ta.style.fontSize = fs;
}
overlay(ctx: ToolContext, g: CanvasRenderingContext2D): void {
if (!this.active) return;
- const v = ctx.view(), accent = ctx.paint().accent;
+ const v = ctx.view(), pal = ctx.paint(), accent = pal.accent;
if (this.pending) {
const pd = this.pending, s = v.toScreen({ x: pd.x, y: pd.y }), h = 12 * v.zoom;
g.save();
@@ -247,6 +261,7 @@ export class TextEditor {
g.stroke();
}
g.restore();
+ if (this.pre) { const st = { ...DEFAULT_CHAR, ...this.style() }, px = st.size * v.zoom; this.drawPre(g, pal, pd.mode === 'area' || pd.vertical ? { x: s.x + 2, y: s.y + 2 } : { x: s.x + 2, y: s.y - px * 0.8 }, px, 0, st); }
return;
}
const n = this.node();
@@ -266,12 +281,31 @@ export class TextEditor {
const c = caretAt(n, this.caret), a = v.toScreen({ x: c.x, y: c.y }), len = c.h * v.zoom, ang = c.angle;
g.save(); g.strokeStyle = accent; g.lineWidth = 1.5; g.beginPath(); g.moveTo(a.x, a.y); g.lineTo(a.x - Math.sin(ang) * len, a.y + Math.cos(ang) * len); g.stroke(); g.restore();
}
+ if (this.pre) { const c = caretAt(n, Math.min(this.caret, this.anchor)), st = styleAt(n.spans, this.caret); this.drawPre(g, pal, v.toScreen({ x: c.x, y: c.y }), st.size * v.zoom, n.vertical ? 0 : c.angle, st); }
+ }
+
+ private drawPre(g: CanvasRenderingContext2D, pal: Paint, at: Pt, px: number, angle: number, st: CharStyle): void {
+ const size = Math.max(12, px), h = Math.round(size * 1.25), pad = Math.round(size * 0.15);
+ g.save();
+ g.translate(Math.round(at.x), Math.round(at.y)); g.rotate(angle);
+ g.font = cssFont(st, size); g.textBaseline = 'middle';
+ const w = Math.ceil(g.measureText(this.pre).width) + pad * 2;
+ g.fillStyle = pal.handle; g.fillRect(0, 0, w, h);
+ g.fillStyle = pal.antsA; g.fillText(this.pre, pad, h / 2);
+ g.fillStyle = pal.accent; g.fillRect(0, h - 2, w, 2);
+ g.restore();
}
}
function wordStart(t: string, i: number): number { let k = i; while (k > 0 && /\s/.test(t[k - 1])) k--; while (k > 0 && /\S/.test(t[k - 1])) k--; return k; }
function wordEnd(t: string, i: number): number { let k = i; while (k < t.length && /\s/.test(t[k])) k++; while (k < t.length && /\S/.test(t[k])) k++; return k; }
-function prevPoint(t: string, i: number): number { return i >= 2 && /[\uDC00-\uDFFF]/.test(t[i - 1]) && /[\uD800-\uDBFF]/.test(t[i - 2]) ? i - 2 : i - 1; }
-function nextPoint(t: string, i: number): number { return i + 2 <= t.length && /[\uD800-\uDBFF]/.test(t[i]) && /[\uDC00-\uDFFF]/.test(t[i + 1]) ? i + 2 : i + 1; }
+const GRAPHEMES = typeof Intl.Segmenter === 'function' ? new Intl.Segmenter(undefined, { granularity: 'grapheme' }) : null;
+const WORDS = typeof Intl.Segmenter === 'function' ? new Intl.Segmenter(undefined, { granularity: 'word' }) : null;
+const WORD_CHAR = /[\p{L}\p{N}\p{M}_]/u;
+const JOINED = /\p{Extended_Pictographic}|\p{Regional_Indicator}|[️]/u;
+function pointBack(t: string, i: number): number { return i >= 2 && /[\uDC00-\uDFFF]/.test(t[i - 1]) && /[\uD800-\uDBFF]/.test(t[i - 2]) ? i - 2 : i - 1; }
+function prevPoint(t: string, i: number): number { const s = i > 0 ? GRAPHEMES?.segment(t).containing(i - 1) : undefined; return s ? s.index : pointBack(t, i); }
+function nextPoint(t: string, i: number): number { const s = GRAPHEMES?.segment(t).containing(i); return s ? s.index + s.segment.length : i + 2 <= t.length && /[\uD800-\uDBFF]/.test(t[i]) && /[\uDC00-\uDFFF]/.test(t[i + 1]) ? i + 2 : i + 1; }
+function backPoint(t: string, i: number): number { const s = i > 0 ? GRAPHEMES?.segment(t).containing(i - 1) : undefined; return s && JOINED.test(s.segment) ? s.index : pointBack(t, i); }
export const typing: { editor: TextEditor | null } = { editor: null };
From 1243695a5c1c303cdab248b5adc00654fc08f5d5 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 12:32:25 -0500
Subject: [PATCH 02/74] fix(pdf): Chinese, Japanese and Korean type in a PDF or
.ai is read, and what cannot be read is never set as replacement characters
---
frontend/HASHOUT_LOG.md | 17 +++++++++++++++
frontend/src/io/pdf-read.ts | 41 +++++++++++++++++++++++++------------
2 files changed, 45 insertions(+), 13 deletions(-)
diff --git a/frontend/HASHOUT_LOG.md b/frontend/HASHOUT_LOG.md
index 3f7b50f..6253e2a 100644
--- a/frontend/HASHOUT_LOG.md
+++ b/frontend/HASHOUT_LOG.md
@@ -4965,3 +4965,20 @@ Issue 17 (a Traditional Chinese Windows user): "ensure support for text input an
Run in headless Chrome 4x CPU throttled on a slow network, against the engine serving the built window: the composed string shown for a new text and inside an existing one and gone after a cancel; a 229 Enter adds no line; text composed and then clicked away from is kept; the three emoji clusters go in three presses; a font chosen from the options bar mid-edit and typing goes on in the same text. Layout shift 0, no console error. Not run: a real input method on Windows, macOS or Linux; WebKit.
Left as they were: shortcuts are matched by the physical key (`e.code`), so on AZERTY the key labelled Z does not undo while typing; Ctrl or Alt with Backspace still removes a whole run of unspaced Chinese; the composed string is drawn over the text after the caret instead of pushing it along.
+
+### src/io/pdf-read.ts · Chinese, Japanese and Korean type in a PDF or a PDF-compatible .ai (issue 17)
+- refers-to: src/io/pdf-read.ts :: strict, BYTE_CMAPS, ORDERINGS, BROKEN, FontInfo (direct, bytes), Painter.show, Painter.font, parseCMap (uni, put), pdfText, FontNames.resolve
+- kind: fix
+- logged: v0.60.0 · 2026-11-26
+
+The issue's picture shows a two-character text object in Noto Sans CJK TC whose content is two U+FFFD, in a document this reader built (the "Page 1" and "Page 2" groups inside optional-content layers are made only here; a modern .ai falls back to it through `guardAi`). The reporter's file is not at hand, so which of the cases below it is has not been confirmed. Each was reproduced with a hand-built PDF (fonts named, not embedded) opened in the built window, before and after.
+
+- A ToUnicode table that maps a code to `` (producers write that for a glyph they cannot name) was copied into live type: `parseCMap` kept whatever the hex said. Two such codes give exactly the picture: two U+FFFD in the Content panel and the status bar, and the font's replacement glyph twice on the canvas. `put` now keeps a mapping only when it is non-empty, has no U+FFFD and no unpaired surrogate (`BROKEN`). A range whose base is a surrogate pair is counted on by code point (it ran past DFFF into E000), and hex with spaces inside (`<4E2D 6587>`, dropped before) is read.
+- A two-byte code with no mapping still adds nothing to the text, as before, but `show` now counts it and the import says so once per font: "Left out: characters of type in [family] that the file gives no Unicode value for." Before, the characters went missing without a word and the rest of the line was tracked out to hide the gap. The line is kept with what could be read.
+- A Type0 font whose `/Encoding` is a predefined CMap was read as fixed two-byte CIDs, so its type came out empty or wrong. Two kinds are now read: the Unicode ones (`...-UCS2-...`, `...-UTF16-...`, where the code is the UTF-16 unit itself: `direct`), and the byte ones of Big5, GB, Shift-JIS, EUC-JP and KS (`BYTE_CMAPS`: ETen-B5, B5pc, the HK ones, GBK-EUC, GBpc-EUC, 90ms-RKSJ, EUC, KSCms-UHC and their -V forms), where the whole string is decoded with that charset, strictly (`bytes`); a string that does not decode falls back to the old path. Widths on the byte path are half an em for Latin and half-width kana and one em otherwise, because the `/W` array is keyed by CIDs this reader cannot derive from the bytes. UTF-32 CMaps and an embedded CMap stream as `/Encoding` are still read as two-byte codes.
+- A `/BaseFont` written in UTF-8 or in the collection's own charset (`#B7#73...`, PMingLiU's Chinese name in Big5) was shown as Latin-1 garble in the "Fonts not installed" sentence. `resolve` decodes it as UTF-8 when that is valid, else with the charset of the descendant font's `/Ordering` (CNS1 Big5, GB1 GBK, Japan1 Shift-JIS, Korea1 EUC-KR), strictly. A family known only by a localized name is still not matched to an installed font.
+- `pdfText` (layer names) reads a UTF-16LE byte order mark and UTF-8 without one; Latin-1 stays the last resort.
+
+Seen in the built window with the test file: before, one object reading U+FFFD U+FFFD and two lines of type missing; after, no U+FFFD or unpaired surrogate in any object, the Big5 line and the UTF-16 line present, the font named in Chinese in the sentence, and the left-out sentence for the two fonts with unmapped codes. `npm test`: 61 pass.
+
+Not done, and the right next step once the reporter's file is here: drawing type that cannot be read as outlines from the font program embedded in the file (the reader never opens `FontFile`, `FontFile2` or `FontFile3`), so its shapes stay on the page; `/ActualText`; variable-length codes under a ToUnicode table.
diff --git a/frontend/src/io/pdf-read.ts b/frontend/src/io/pdf-read.ts
index 805a135..7a1c013 100644
--- a/frontend/src/io/pdf-read.ts
+++ b/frontend/src/io/pdf-read.ts
@@ -296,7 +296,11 @@ class PdfFile {
}
}
-interface FontInfo { family: string; style: string; widths: Map; dw: number; two: boolean; uni: Map | null; enc: Map | null; type3: { matrix: Mat; procs: PDict; res: PDict | null; names: Map } | null }
+const strict = (b: Uint8Array, label: string): string | null => { try { return new TextDecoder(label, { fatal: true }).decode(b); } catch { return null; } };
+const BYTE_CMAPS: Array<[RegExp, string]> = [[/^(B5pc|ETen-B5|ETenms-B5|HKscs-B5|HKdl[ab]-B5|HKgccs-B5|HKm\d+-B5)-/, 'big5'], [/^(GBK-EUC|GBKp-EUC|GBK2K|GB-EUC|GBpc-EUC)-/, 'gb18030'], [/^(90msp?-RKSJ|90pv-RKSJ|83pv-RKSJ|Add-RKSJ|Ext-RKSJ)-/, 'shift_jis'], [/^EUC-/, 'euc-jp'], [/^(KSCms-UHC|KSC-EUC|KSCpc-EUC)-/, 'euc-kr']];
+const ORDERINGS: Record = { CNS1: 'big5', GB1: 'gbk', Japan1: 'shift_jis', Korea1: 'euc-kr' };
+const BROKEN = /�|[\ud800-\udbff](?![\udc00-\udfff])|(?:^|[^\ud800-\udbff])[\udc00-\udfff]/;
+interface FontInfo { family: string; style: string; widths: Map; dw: number; two: boolean; direct: boolean; bytes: string; uni: Map | null; enc: Map | null; type3: { matrix: Mat; procs: PDict; res: PDict | null; names: Map } | null }
interface GS {
ctm: Mat; fill: Paint; stroke: Paint; fa: number; sa: number; lw: number; cap: Cap; join: Join; miter: number; dash: number[]; phase: number; blend: BlendMode;
fcs: Val[]; scs: Val[]; target: VNode[]; sm: { g: GroupNode; outer: VNode[] } | null; font: FontInfo | null; size: number; tc: number; tw: number; th: number; tl: number; rise: number; tr: number;
@@ -345,7 +349,8 @@ class FontNames {
for (const f of installed) if (f.postscript) this.postscript.set(squash(f.postscript), { family: f.family, style: f.style });
}
- resolve(base: string): { family: string; style: string } {
+ resolve(name: string, charset?: string): { family: string; style: string } {
+ const bytes = /[\x80-\xff]/.test(name) ? Uint8Array.from(name, (c) => c.charCodeAt(0) & 255) : null, base = (bytes && (strict(bytes, 'utf-8') ?? (charset ? strict(bytes, charset) : null))) || name;
const raw = base.replace(/^[A-Z]{6}\+/, ''), exact = this.postscript.get(squash(raw));
if (exact) return exact;
const [famPart, stylePart = ''] = raw.split(/[-,]/);
@@ -512,8 +517,9 @@ interface OcgInfo { name: string; hidden: boolean; printable: boolean }
const pdfText = (s: Uint8Array): string => {
if (s.length >= 2 && s[0] === 0xfe && s[1] === 0xff) return new TextDecoder('utf-16be').decode(s.subarray(2));
+ if (s.length >= 2 && s[0] === 0xff && s[1] === 0xfe) return new TextDecoder('utf-16le').decode(s.subarray(2));
if (s.length >= 3 && s[0] === 0xef && s[1] === 0xbb && s[2] === 0xbf) return new TextDecoder().decode(s.subarray(3));
- return new TextDecoder('latin1').decode(s);
+ return strict(s, 'utf-8') ?? new TextDecoder('latin1').decode(s);
};
/** The optional content groups of the catalog with their names, whether the default configuration turns them off (BaseState, ON and OFF lists) and whether their Print usage is off. */
@@ -776,16 +782,21 @@ class Painter {
const f = gs.font, size = gs.size;
if (!f) return tm;
const t3 = f.type3;
- let text = '', adv = 0, ink = 0;
+ let text = '', adv = 0, ink = 0, lost = 0;
const start = tm, glyphs: Array<{ code: number; at: number }> = [], gaps = new Map();
const css = !t3 && !f.two && !f.widths.size ? cssFont({ ...DEFAULT_CHAR, font: f.family, style: f.style }, 100) : '';
for (const it of items) {
if (typeof it === 'number') { adv += (-it / 1000) * size * gs.th; if (-it / 1000 > 0.18 && text && !text.endsWith(' ')) { gaps.set(text.length, -it / 1000); text += ' '; } continue; }
if (!(it instanceof Str)) continue;
- const b = it.b;
+ const b = it.b, whole = f.bytes ? strict(b, f.bytes) : null;
+ if (whole !== null && !BROKEN.test(whole)) {
+ for (const ch of whole) { const cp = ch.codePointAt(0) as number; text += ch; adv += ((cp < 0x100 || (cp >= 0xff61 && cp <= 0xff9f) ? 0.5 : 1) * size + gs.tc + (cp === 32 ? gs.tw : 0)) * gs.th; if (ch.trim()) ink = adv; }
+ continue;
+ }
for (let i = 0; i < b.length; i += f.two ? 2 : 1) {
const code = f.two ? (b[i] << 8) | (b[i + 1] ?? 0) : b[i];
- const ch = f.uni?.get(code) ?? f.enc?.get(code) ?? (f.two ? '' : code >= 32 && code < 127 ? String.fromCharCode(code) : WIN[code] ?? (code >= 160 ? String.fromCharCode(code) : ''));
+ const ch = f.uni?.get(code) ?? f.enc?.get(code) ?? (f.two ? (f.direct ? String.fromCharCode(code) : '') : code >= 32 && code < 127 ? String.fromCharCode(code) : WIN[code] ?? (code >= 160 ? String.fromCharCode(code) : ''));
+ if (!ch && f.two) lost++;
text += ch;
if (t3) glyphs.push({ code, at: adv });
const w = t3 ? (f.widths.get(code) ?? 0) * t3.matrix[0] : css ? emOf(css, ch || ' ') : (f.widths.get(code) ?? f.dw) / 1000;
@@ -804,6 +815,7 @@ class Painter {
}
return next;
}
+ if (lost) this.skipped.add(`characters of type in ${f.family} that the file gives no Unicode value for`);
if (!text.trim()) return next;
const xf = mul(gs.ctm, mul(start, [gs.th, 0, 0, -1, 0, gs.rise]));
const filled = gs.tr === 1 || gs.tr === 5 ? NONE : gs.fill, stroked = gs.tr === 1 || gs.tr === 2 || gs.tr === 5 || gs.tr === 6 ? gs.stroke : NONE;
@@ -854,7 +866,8 @@ class Painter {
const hit = this.fonts.get(d);
if (hit) return hit;
const sub = nameOf(d.get('Subtype')), two = sub === 'Type0', desc = two ? pdf.dict(pdf.arr(d.get('DescendantFonts'))[0]) : null;
- const { family, style } = this.names.resolve(nameOf(d.get('BaseFont')) || nameOf(desc?.get('BaseFont')) || 'Helvetica');
+ const ordering = pdf.get(pdf.dict(desc?.get('CIDSystemInfo'))?.get('Ordering'));
+ const { family, style } = this.names.resolve(nameOf(d.get('BaseFont')) || nameOf(desc?.get('BaseFont')) || 'Helvetica', ordering instanceof Str ? ORDERINGS[latin(ordering.b)] : undefined);
const widths = new Map();
let dw = 500;
if (two && desc) {
@@ -878,7 +891,8 @@ class Painter {
for (const x of pdf.arr(e.get('Differences'))) { const v = pdf.get(x); if (typeof v === 'number') code = v; else if (v instanceof Name) { names.set(code, v.v); const ch = glyphChar(v.v); if (ch) enc.set(code, ch); code++; } }
}
const t3 = sub === 'Type3' ? { matrix: mat6(pdf.nums(d.get('FontMatrix'))) ?? ([0.001, 0, 0, 0.001, 0, 0] as Mat), procs: pdf.dict(d.get('CharProcs')) ?? new Map(), res: pdf.dict(d.get('Resources')) ?? res, names } : null;
- const info: FontInfo = { family, style, widths, dw, two, uni: null, enc, type3: t3 };
+ const cmap = two && e instanceof Name ? e.v : '';
+ const info: FontInfo = { family, style, widths, dw, two, direct: /-(UCS2|UTF16)-/.test(cmap), bytes: BYTE_CMAPS.find(([re]) => re.test(cmap))?.[1] ?? '', uni: null, enc, type3: t3 };
this.fonts.set(d, info);
return info;
}
@@ -1172,13 +1186,14 @@ function evalFn(pdf: PdfFile, f: PDict, x: number[]): number[] | null {
function parseCMap(src: string): Map {
const out = new Map(), hex = (h: string): number => parseInt(h, 16);
- const uni = (h: string): string => { let s = ''; for (let i = 0; i + 4 <= h.length; i += 4) s += String.fromCharCode(parseInt(h.slice(i, i + 4), 16)); if (h.length === 2) s = String.fromCharCode(parseInt(h, 16)); return s; };
- for (const block of src.match(/beginbfchar([\s\S]*?)endbfchar/g) ?? []) for (const m of block.matchAll(/<([0-9a-fA-F]+)>\s*<([0-9a-fA-F]*)>/g)) out.set(hex(m[1]), uni(m[2]));
+ const uni = (raw: string): string => { const h = raw.replace(/\s/g, ''); let s = ''; for (let i = 0; i + 4 <= h.length; i += 4) s += String.fromCharCode(parseInt(h.slice(i, i + 4), 16)); if (h.length === 2) s = String.fromCharCode(parseInt(h, 16)); return s; };
+ const put = (code: number, s: string): void => { if (s && !BROKEN.test(s)) out.set(code, s); };
+ for (const block of src.match(/beginbfchar([\s\S]*?)endbfchar/g) ?? []) for (const m of block.matchAll(/<([0-9a-fA-F]+)>\s*<([0-9a-fA-F\s]*)>/g)) put(hex(m[1]), uni(m[2]));
for (const block of src.match(/beginbfrange([\s\S]*?)endbfrange/g) ?? []) {
- for (const m of block.matchAll(/<([0-9a-fA-F]+)>\s*<([0-9a-fA-F]+)>\s*(?:<([0-9a-fA-F]*)>|\[([^\]]*)\])/g)) {
+ for (const m of block.matchAll(/<([0-9a-fA-F]+)>\s*<([0-9a-fA-F]+)>\s*(?:<([0-9a-fA-F\s]*)>|\[([^\]]*)\])/g)) {
const a = hex(m[1]), b = hex(m[2]);
- if (m[3] !== undefined) { const base = m[3], head = base.slice(0, -4), tail = parseInt(base.slice(-4) || '0', 16); for (let c = a; c <= b && c - a < 65536; c++) out.set(c, uni(head + (tail + c - a).toString(16).padStart(4, '0'))); }
- else [...(m[4] ?? '').matchAll(/<([0-9a-fA-F]*)>/g)].forEach((x, k) => out.set(a + k, uni(x[1])));
+ if (m[3] !== undefined) { const points = Array.from(uni(m[3])), last = points.pop()?.codePointAt(0); if (last !== undefined) for (let c = a; c <= b && c - a < 65536 && last + c - a <= 0x10ffff; c++) put(c, points.join('') + String.fromCodePoint(last + c - a)); }
+ else [...(m[4] ?? '').matchAll(/<([0-9a-fA-F\s]*)>/g)].forEach((x, k) => put(a + k, uni(x[1])));
}
}
return out;
From a113172891cdf1371d77c03565340998a9c9d7e8 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 12:38:02 -0500
Subject: [PATCH 03/74] fix(ui): fields, dialogs and pickers leave Enter and
Escape to an input method that is composing, and number fields read
full-width digits
---
frontend/HASHOUT_LOG.md | 18 ++++++++++++++++++
frontend/src/app.ts | 2 +-
frontend/src/ui/dialogs.ts | 3 ++-
frontend/src/ui/dropdown.ts | 3 ++-
frontend/src/ui/file-dialog.ts | 4 ++--
frontend/src/ui/layers.ts | 2 +-
frontend/src/ui/options.ts | 2 +-
frontend/src/ui/panels/assistant.ts | 2 +-
frontend/src/ui/panels/attributes.ts | 2 +-
frontend/src/ui/panels/generative.ts | 2 +-
frontend/src/ui/panels/graph-data.ts | 2 +-
frontend/src/ui/panels/help.ts | 2 +-
frontend/src/ui/panels/kit.ts | 5 +++--
frontend/src/ui/panels/pattern-options.ts | 2 +-
frontend/src/ui/panels/recolor.ts | 2 +-
frontend/src/ui/panels/spelling.ts | 2 +-
frontend/src/ui/panels/type.ts | 2 +-
frontend/src/ui/rail.ts | 2 +-
frontend/src/ui/titlebar-tools.ts | 4 +++-
19 files changed, 43 insertions(+), 20 deletions(-)
diff --git a/frontend/HASHOUT_LOG.md b/frontend/HASHOUT_LOG.md
index 6253e2a..b1aae74 100644
--- a/frontend/HASHOUT_LOG.md
+++ b/frontend/HASHOUT_LOG.md
@@ -4982,3 +4982,21 @@ The issue's picture shows a two-character text object in Noto Sans CJK TC whose
Seen in the built window with the test file: before, one object reading U+FFFD U+FFFD and two lines of type missing; after, no U+FFFD or unpaired surrogate in any object, the Big5 line and the UTF-16 line present, the font named in Chinese in the sentence, and the left-out sentence for the two fonts with unmapped codes. `npm test`: 61 pass.
Not done, and the right next step once the reporter's file is here: drawing type that cannot be read as outlines from the font program embedded in the file (the reader never opens `FontFile`, `FontFile2` or `FontFile3`), so its shapes stay on the page; `/ActualText`; variable-length codes under a ToUnicode table.
+
+### src/ui/ fields, dialogs and pickers · a key the input method is using is left to it (issue 17)
+- refers-to: src/ui/dialogs.ts :: Dialog (the scrim's keydown), PromptDialog; src/ui/layers.ts :: rename; src/ui/file-dialog.ts; src/ui/titlebar-tools.ts :: the command search (keydown, fill); src/ui/dropdown.ts :: enhanceSelect (pop keydown, label); src/ui/options.ts; src/ui/rail.ts; src/app.ts :: the Escape that leaves full screen; src/ui/panels/ assistant.ts, help.ts, recolor.ts, generative.ts, pattern-options.ts, type.ts, spelling.ts, attributes.ts, graph-data.ts, kit.ts :: numField, slider, evalNumber
+- kind: fix
+- logged: v0.60.0 · 2026-11-26
+
+No key handler outside the canvas editor asked whether the key belonged to a composition. With a Chinese, Japanese or Korean input method the Enter that picks a candidate also sent the half-typed prompt (Assistant, Help, Recolor, AI Patterns), committed a half-typed name (a layer, a pattern, a tab stop's leader, Save As, the spelling change), ran the highlighted command in the title bar search, picked the highlighted font, or closed and accepted the dialog; Escape closed the dialog or the flyout instead of cancelling the composition. Each handler now returns first when `e.isComposing` is set or `e.keyCode` is 229 (WebKit sends the confirming Enter after `compositionend`, with 229 and no `isComposing`; WebView2 sends "Process", which never matched). The expression is written out at each site; there is no helper, so a reader of any one handler sees the whole rule.
+
+`Dialog`'s own scrim listener is registered before those of its subclasses, so there it also calls `stopImmediatePropagation`: the Enter handlers that `FormDialog`, New Document and Place put on the same scrim do not run for such a key. The Password prompt is not guarded; a password is not composed.
+
+Three small things for the same people, in the same files:
+- `evalNumber` reads full-width digits, point, comma, signs, brackets and units (an input method in its full-width mode types them): the text is normalised with NFKC first. Before, such an entry was thrown away and the field went back to the old value.
+- The title bar search also matches a command's label in the language shown (`t(label)`); typing the Chinese word for Undo found nothing, because only the English label was compared.
+- A menu button's tooltip is its current choice unless the select has a title of its own, so a font name cut short in the options bar (Noto Sans CJK TC, SC, JP and KR all read "Noto Sans C...") can be read in full. `label` writes `title` only when it differs.
+
+Run in headless Chrome, 4x CPU throttled, slow network: a layer renamed with a composition stays in the field after a 229 Enter and is committed by the real one; a full-width "123.5" in X moves the object to 123.5; the font button's tooltip reads the family. Layout shift 0, no console error. Not run: each of the other guarded fields one by one; WebKit.
+
+Looked at and left: the Content panel's head, the status bar's selection and the Appearance panel's head show a text object's own words through the translation walker, so an object reading "Copy" is shown translated there. Skipping those three elements would also stop "No Document" and "3 Objects" from being translated, so they need a `translate="no"` set with the label, which is its own change. The numeric fields of the options bar and the zoom field keep their handlers.
diff --git a/frontend/src/app.ts b/frontend/src/app.ts
index 770245e..b432987 100644
--- a/frontend/src/app.ts
+++ b/frontend/src/app.ts
@@ -1550,7 +1550,7 @@ export function startApp(): void {
type Screen = 'standard' | 'menu' | 'full';
let screen: Screen = 'standard', panelsHidden = false;
const applyScreen = (): void => { root.classList.toggle('is-screen-menu', screen === 'menu'); root.classList.toggle('is-screen-full', screen === 'full'); root.classList.toggle('is-panels-hidden', panelsHidden || screen === 'full'); window.dispatchEvent(new Event('resize')); };
- document.addEventListener('keydown', (e) => { if (e.key === 'Escape' && screen === 'full' && !anyDialogOpen()) { screen = 'standard'; applyScreen(); e.preventDefault(); } }, true);
+ document.addEventListener('keydown', (e) => { if (e.key === 'Escape' && !e.isComposing && e.keyCode !== 229 && screen === 'full' && !anyDialogOpen()) { screen = 'standard'; applyScreen(); e.preventDefault(); } }, true);
const toolCmd = (id: string): string => `tool-${id}`;
for (const t of toolList()) commands.add({ id: toolCmd(t.id), label: t.label, run: () => engine.setTool(t.id) });
diff --git a/frontend/src/ui/dialogs.ts b/frontend/src/ui/dialogs.ts
index b7cd94f..008e76d 100644
--- a/frontend/src/ui/dialogs.ts
+++ b/frontend/src/ui/dialogs.ts
@@ -23,6 +23,7 @@ export class Dialog {
this.scrim.addEventListener('pointerdown', (e) => { if (e.target === this.scrim) this.close(); });
this.scrim.addEventListener('keydown', (e) => {
e.stopPropagation();
+ if (e.isComposing || e.keyCode === 229) { e.stopImmediatePropagation(); return; }
if (e.key === 'Escape') { e.preventDefault(); this.close(); }
});
document.getElementById('overlay-root')?.appendChild(this.scrim);
@@ -139,7 +140,7 @@ class Prompt extends Dialog {
this.field('Name', this.input);
this.button('Cancel', 'ghost', () => this.finish(null));
this.ok = this.button('OK', 'primary', () => this.finish(this.input.value.trim() || null));
- this.input.addEventListener('keydown', (e) => { if (e.key === 'Enter') { e.preventDefault(); this.ok.click(); } });
+ this.input.addEventListener('keydown', (e) => { if (e.isComposing || e.keyCode === 229) return; if (e.key === 'Enter') { e.preventDefault(); this.ok.click(); } });
this.onClose = () => this.finish(null);
}
ask(title: string, value: string, okLabel: string): Promise {
diff --git a/frontend/src/ui/dropdown.ts b/frontend/src/ui/dropdown.ts
index edcb424..9a64c08 100644
--- a/frontend/src/ui/dropdown.ts
+++ b/frontend/src/ui/dropdown.ts
@@ -18,7 +18,7 @@ export function enhanceSelect(select: HTMLSelectElement, opts: { search?: string
const host = document.getElementById('overlay-root');
if (host) host.appendChild(pop); else document.body.appendChild(pop);
let picked = 0;
- const label = (): void => { setText(btn.querySelector('.cv-dd-label') as HTMLElement, select.selectedOptions[0]?.textContent ?? ''); btn.disabled = select.disabled; };
+ const label = (): void => { const s = select.selectedOptions[0]?.textContent ?? '', tip = select.title || s; setText(btn.querySelector('.cv-dd-label') as HTMLElement, s); if (btn.title !== tip) btn.title = tip; btn.disabled = select.disabled; };
const proto = Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype, 'value') as PropertyDescriptor;
Object.defineProperty(select, 'value', { configurable: true, get() { return proto.get?.call(select); }, set(v) { proto.set?.call(select, v); label(); } });
@@ -65,6 +65,7 @@ export function enhanceSelect(select: HTMLSelectElement, opts: { search?: string
btn.addEventListener('click', () => (pop.hidden ? open() : close()));
search?.addEventListener('input', fill);
pop.addEventListener('keydown', (e) => {
+ if (e.isComposing || e.keyCode === 229) return;
const items = Array.from(list.querySelectorAll('.cv-dd-item'));
if (e.key === 'Escape') { e.preventDefault(); close(); btn.focus(); return; }
if (e.key === 'ArrowDown' || e.key === 'ArrowUp') { e.preventDefault(); if (items.length) { picked = (picked + (e.key === 'ArrowDown' ? 1 : items.length - 1)) % items.length; mark(); items[picked].scrollIntoView({ block: 'nearest' }); } return; }
diff --git a/frontend/src/ui/file-dialog.ts b/frontend/src/ui/file-dialog.ts
index 59b0135..65bb498 100644
--- a/frontend/src/ui/file-dialog.ts
+++ b/frontend/src/ui/file-dialog.ts
@@ -28,11 +28,11 @@ export class FilePathDialog extends Dialog {
this.body.append(head, this.list, this.field('Path', this.picked), this.note);
this.button('Cancel', '', () => this.close());
this.ok = this.button('Choose', 'primary', () => this.finish());
- this.folder.addEventListener('keydown', (e) => { if (e.key === 'Enter') { e.preventDefault(); void this.load(this.folder.value); } });
+ this.folder.addEventListener('keydown', (e) => { if (e.isComposing || e.keyCode === 229) return; if (e.key === 'Enter') { e.preventDefault(); void this.load(this.folder.value); } });
this.folder.addEventListener('change', () => void this.load(this.folder.value));
this.up.addEventListener('click', () => { if (this.parent) void this.load(this.parent); });
this.picked.addEventListener('input', () => this.syncOk());
- this.picked.addEventListener('keydown', (e) => { if (e.key === 'Enter') { e.preventDefault(); this.finish(); } });
+ this.picked.addEventListener('keydown', (e) => { if (e.isComposing || e.keyCode === 229) return; if (e.key === 'Enter') { e.preventDefault(); this.finish(); } });
this.list.addEventListener('click', (e) => {
const r = (e.target as HTMLElement).closest('.cv-fpd-row');
if (!r) return;
diff --git a/frontend/src/ui/layers.ts b/frontend/src/ui/layers.ts
index fb6608b..9cf572e 100644
--- a/frontend/src/ui/layers.ts
+++ b/frontend/src/ui/layers.ts
@@ -261,7 +261,7 @@ export class LayersPanel {
name.textContent = nodeLabel(n);
if (ok && v && v !== n.name) { if (n.kind === 'layer') this.engine.setLayer(n.id, { name: v }); else this.engine.setObjectProps({ name: v }, [n.id]); }
};
- input.addEventListener('keydown', (ev) => { ev.stopPropagation(); if (ev.key === 'Enter') finish(true); if (ev.key === 'Escape') finish(false); });
+ input.addEventListener('keydown', (ev) => { ev.stopPropagation(); if (ev.isComposing || ev.keyCode === 229) return; if (ev.key === 'Enter') finish(true); if (ev.key === 'Escape') finish(false); });
input.addEventListener('blur', () => finish(true));
}
diff --git a/frontend/src/ui/options.ts b/frontend/src/ui/options.ts
index 11d6da0..8d53b1f 100644
--- a/frontend/src/ui/options.ts
+++ b/frontend/src/ui/options.ts
@@ -125,7 +125,7 @@ export class OptionsBar {
if (box.value !== '' && Number.isFinite(v)) spec.set(v);
};
box.addEventListener('change', commit);
- box.addEventListener('keydown', (e) => { e.stopPropagation(); if (e.key === 'Enter') { commit(); box.blur(); } else if (e.key === 'Escape') { box.value = committed; box.blur(); } });
+ box.addEventListener('keydown', (e) => { e.stopPropagation(); if (e.isComposing || e.keyCode === 229) return; if (e.key === 'Enter') { commit(); box.blur(); } else if (e.key === 'Escape') { box.value = committed; box.blur(); } });
sync.push(() => {
const v = spec.get(), text = v === null ? '' : String(Math.round(v * 100) / 100);
if (document.activeElement === box) return;
diff --git a/frontend/src/ui/panels/assistant.ts b/frontend/src/ui/panels/assistant.ts
index 3f9f000..9e689bd 100644
--- a/frontend/src/ui/panels/assistant.ts
+++ b/frontend/src/ui/panels/assistant.ts
@@ -31,7 +31,7 @@ export class AssistantPanel {
this.send.addEventListener('click', () => void this.ask());
this.stop.addEventListener('click', () => { this.stopped = true; });
this.undoTurn.addEventListener('click', () => this.undo());
- this.input.addEventListener('keydown', (e) => { if (e.key === 'Enter' && !e.shiftKey) { e.preventDefault(); void this.ask(); } e.stopPropagation(); });
+ this.input.addEventListener('keydown', (e) => { e.stopPropagation(); if (e.isComposing || e.keyCode === 229) return; if (e.key === 'Enter' && !e.shiftKey) { e.preventDefault(); void this.ask(); } });
}
toggle(on = this.el.hidden): void { setHidden(this.el, !on); if (on) this.input.focus(); }
diff --git a/frontend/src/ui/panels/attributes.ts b/frontend/src/ui/panels/attributes.ts
index c791b9a..27fd5d2 100644
--- a/frontend/src/ui/panels/attributes.ts
+++ b/frontend/src/ui/panels/attributes.ts
@@ -17,7 +17,7 @@ export class AttributesPanel {
constructor(private readonly engine: Engine) {
this.rule = seg([{ id: 'nonzero', label: 'Use Non-Zero Winding Fill Rule', icon: 'fillNonZero' }, { id: 'evenodd', label: 'Use Even-Odd Fill Rule', icon: 'fillEvenOdd' }], (v) => engine.setFillRule(v as FillRule), 'cv-attrp-rule');
this.reverse = iconButton('reversePath', 'Reverse Path Direction', () => engine.pathOp('reverse'));
- this.note.addEventListener('keydown', (e) => { e.stopPropagation(); if (e.key === 'Escape') { this.note.blur(); this.sync(); } });
+ this.note.addEventListener('keydown', (e) => { e.stopPropagation(); if (e.isComposing || e.keyCode === 229) return; if (e.key === 'Escape') { this.note.blur(); this.sync(); } });
this.note.addEventListener('change', () => { const v = this.note.value.trim(); engine.setObjectProps({ note: v || undefined }); });
this.overFill = check('Overprint Fill', (v) => engine.setOverprint('fill', v));
this.overStroke = check('Overprint Stroke', (v) => engine.setOverprint('stroke', v));
diff --git a/frontend/src/ui/panels/generative.ts b/frontend/src/ui/panels/generative.ts
index a87542d..1581a18 100644
--- a/frontend/src/ui/panels/generative.ts
+++ b/frontend/src/ui/panels/generative.ts
@@ -264,7 +264,7 @@ export class RetypePanel extends ModelPanel {
constructor(engine: Engine, private readonly ensureFace: (family: string, style: string) => Promise) {
super(engine);
this.keep = check('Keep the image under the live text', (v) => { this.keepImage = v; });
- this.text.addEventListener('keydown', (e) => { e.stopPropagation(); if (e.key === 'Enter') void this.find(); });
+ this.text.addEventListener('keydown', (e) => { e.stopPropagation(); if (e.isComposing || e.keyCode === 229) return; if (e.key === 'Enter') void this.find(); });
this.go.addEventListener('click', () => void this.find());
this.apply.addEventListener('click', () => void this.applyPicked());
this.list.addEventListener('click', (e) => { const r = (e.target as HTMLElement).closest('.cv-retypep-row'); if (r?.dataset.key) { this.picked = this.matches.findIndex((m) => `${m.family}|${m.style}` === r.dataset.key); this.sync(); } });
diff --git a/frontend/src/ui/panels/graph-data.ts b/frontend/src/ui/panels/graph-data.ts
index cafbb72..629c803 100644
--- a/frontend/src/ui/panels/graph-data.ts
+++ b/frontend/src/ui/panels/graph-data.ts
@@ -39,7 +39,7 @@ export class GraphDataWindow {
apply.addEventListener('click', () => this.apply());
q(this.el, '[data-close]').addEventListener('click', () => this.close());
this.entry.addEventListener('input', () => { this.set(this.at.r, this.at.c, this.entry.value); const cell = this.cell(this.at.r, this.at.c); if (cell) cell.value = this.entry.value; });
- this.entry.addEventListener('keydown', (e) => { if (e.key === 'Enter') { e.preventDefault(); this.focus(this.at.r + (e.shiftKey ? -1 : 1), this.at.c); } });
+ this.entry.addEventListener('keydown', (e) => { if (e.isComposing || e.keyCode === 229) return; if (e.key === 'Enter') { e.preventDefault(); this.focus(this.at.r + (e.shiftKey ? -1 : 1), this.at.c); } });
this.grid.addEventListener('input', (e) => { const t = e.target as HTMLInputElement; const r = Number(t.dataset.r), c = Number(t.dataset.c); this.set(r, c, t.value); setValue(this.entry, t.value); });
this.grid.addEventListener('focusin', (e) => { const t = e.target as HTMLInputElement; if (!t.dataset.r) return; this.at = { r: Number(t.dataset.r), c: Number(t.dataset.c) }; this.entry.value = t.value; this.mark(); });
this.grid.addEventListener('keydown', (e) => {
diff --git a/frontend/src/ui/panels/help.ts b/frontend/src/ui/panels/help.ts
index 05f6004..5707305 100644
--- a/frontend/src/ui/panels/help.ts
+++ b/frontend/src/ui/panels/help.ts
@@ -27,7 +27,7 @@ export class HelpDialog extends Dialog {
this.search.addEventListener('input', () => this.filter());
const go = el('Ask ');
go.addEventListener('click', () => void this.ask());
- this.question.addEventListener('keydown', (e) => { if (e.key === 'Enter') { e.preventDefault(); void this.ask(); } e.stopPropagation(); });
+ this.question.addEventListener('keydown', (e) => { e.stopPropagation(); if (e.isComposing || e.keyCode === 229) return; if (e.key === 'Enter') { e.preventDefault(); void this.ask(); } });
const askRow = el('
'); askRow.append(this.question, go);
const body = el('
'), side = el('
');
side.append(this.search, this.nav);
diff --git a/frontend/src/ui/panels/kit.ts b/frontend/src/ui/panels/kit.ts
index 292a90a..dcab4d1 100644
--- a/frontend/src/ui/panels/kit.ts
+++ b/frontend/src/ui/panels/kit.ts
@@ -24,6 +24,7 @@ export function numField(label: string, unit: string, change: (v: number) => voi
};
input.addEventListener('keydown', (e) => {
e.stopPropagation();
+ if (e.isComposing || e.keyCode === 229) return;
if (e.key === 'Enter') { commit(); input.select(); }
else if (e.key === 'Escape') { input.value = last === null ? '' : fmtNum(last); input.blur(); }
else if (e.key === 'ArrowUp' || e.key === 'ArrowDown') { e.preventDefault(); const d = (o.step ?? 1) * (e.shiftKey ? 10 : 1) * (e.key === 'ArrowUp' ? 1 : -1); let v = (last ?? 0) + d; if (o.min !== undefined) v = Math.max(o.min, v); if (o.max !== undefined) v = Math.min(o.max, v); change(v); }
@@ -39,7 +40,7 @@ export function numField(label: string, unit: string, change: (v: number) => voi
export const fmtNum = (v: number): string => String(Math.round(v * 1000) / 1000);
function evalNumber(src: string, unit = ''): number {
- const t = src.replace(/\s+/g, ''), sfx = (/[a-z%°]+$/i.exec(t)?.[0] ?? '').toLowerCase(), u = unit.trim().toLowerCase();
+ const t = src.normalize('NFKC').replace(/\s+/g, ''), sfx = (/[a-z%°]+$/i.exec(t)?.[0] ?? '').toLowerCase(), u = unit.trim().toLowerCase();
let s = t.slice(0, t.length - sfx.length);
if (!s.includes('.') && /^[^,]*,[^,]*$/.test(s)) s = s.replace(',', '.');
const k = !sfx || sfx === u ? 1 : sfx in UNIT_PT && u in UNIT_PT ? UNIT_PT[sfx as Units] / UNIT_PT[u as Units] : NaN;
@@ -71,7 +72,7 @@ export function slider(engine: Engine, label: string, min: number, max: number,
r.addEventListener('pointerup', end);
r.addEventListener('pointercancel', end);
r.addEventListener('input', () => change(Number(r.value)));
- t.addEventListener('keydown', (e) => { e.stopPropagation(); if (e.key === 'Enter') t.blur(); });
+ t.addEventListener('keydown', (e) => { e.stopPropagation(); if (e.isComposing || e.keyCode === 229) return; if (e.key === 'Enter') t.blur(); });
t.addEventListener('change', () => { const v = parseFloat(t.value); if (!Number.isFinite(v)) { t.value = r.value; return; } const c = Math.min(max, Math.max(min, v)); r.value = String(c); t.value = fmtNum(c); change(c); });
return { el: n, set: (v) => { const s = fmtNum(v); setValue(r, s); setValue(t, s); }, enable: (on) => { setDisabled(r, !on); setDisabled(t, !on); } };
}
diff --git a/frontend/src/ui/panels/pattern-options.ts b/frontend/src/ui/panels/pattern-options.ts
index 74edeed..3efc47d 100644
--- a/frontend/src/ui/panels/pattern-options.ts
+++ b/frontend/src/ui/panels/pattern-options.ts
@@ -34,7 +34,7 @@ export class PatternOptionsPanel {
this.idle.append(empty('Select artwork and choose Object > Pattern > Make, or double-click a pattern swatch, to edit a pattern here.'), row(btn('Make Pattern', 'make-pattern')));
const nameField = el('Name ');
nameField.appendChild(this.name);
- this.name.addEventListener('keydown', (e) => { e.stopPropagation(); if (e.key === 'Enter') this.name.blur(); });
+ this.name.addEventListener('keydown', (e) => { e.stopPropagation(); if (e.isComposing || e.keyCode === 229) return; if (e.key === 'Enter') this.name.blur(); });
this.name.addEventListener('change', () => { const v = this.name.value.trim(); if (v) set({ name: v }); });
this.type = selectCtl('Tile Type', TYPES, (v) => set({ type: v as PatternType }));
this.brick = selectCtl('Brick Offset', BRICK, (v) => set({ brick: Number(v) }));
diff --git a/frontend/src/ui/panels/recolor.ts b/frontend/src/ui/panels/recolor.ts
index 851c57f..f921ea4 100644
--- a/frontend/src/ui/panels/recolor.ts
+++ b/frontend/src/ui/panels/recolor.ts
@@ -96,7 +96,7 @@ export class RecolorDialog extends Dialog {
b.addEventListener('click', () => this.applyGenerated(i));
this.genStrips.push(b); strips.appendChild(b);
}
- this.genPrompt.addEventListener('keydown', (e) => { e.stopPropagation(); if (e.key === 'Enter') void this.generatePalettes(); });
+ this.genPrompt.addEventListener('keydown', (e) => { e.stopPropagation(); if (e.isComposing || e.keyCode === 229) return; if (e.key === 'Enter') void this.generatePalettes(); });
this.genGo.addEventListener('click', () => void this.generatePalettes());
const genRow = el('
');
genRow.append(this.genPrompt, this.genGo);
diff --git a/frontend/src/ui/panels/spelling.ts b/frontend/src/ui/panels/spelling.ts
index 6b022a1..e7aa715 100644
--- a/frontend/src/ui/panels/spelling.ts
+++ b/frontend/src/ui/panels/spelling.ts
@@ -71,7 +71,7 @@ export class SpellingDialog extends Dialog {
this.button('Done', 'ghost', () => this.close()).classList.add('cv-btn-apart');
this.list.addEventListener('click', (e) => { const r = (e.target as HTMLElement).closest('.cv-list-row'); if (r?.dataset.key) { this.input.value = r.dataset.key; this.markSelected(); } });
this.list.addEventListener('dblclick', () => void this.change(false));
- this.input.addEventListener('keydown', (e) => { if (e.key === 'Enter') { e.preventDefault(); void this.change(false); } });
+ this.input.addEventListener('keydown', (e) => { if (e.isComposing || e.keyCode === 229) return; if (e.key === 'Enter') { e.preventDefault(); void this.change(false); } });
}
async start(): Promise {
diff --git a/frontend/src/ui/panels/type.ts b/frontend/src/ui/panels/type.ts
index f2c9288..4281fc0 100644
--- a/frontend/src/ui/panels/type.ts
+++ b/frontend/src/ui/panels/type.ts
@@ -281,7 +281,7 @@ export class TabsPanel {
const n = el(` `);
setText(q(n, '.cv-pf-label'), label); n.title = title;
const input = q(n, 'input');
- input.addEventListener('keydown', (e) => { e.stopPropagation(); if (e.key === 'Enter') input.blur(); });
+ input.addEventListener('keydown', (e) => { e.stopPropagation(); if (e.isComposing || e.keyCode === 229) return; if (e.key === 'Enter') input.blur(); });
input.addEventListener('change', () => change(input.value));
return { el: n, input };
};
diff --git a/frontend/src/ui/rail.ts b/frontend/src/ui/rail.ts
index 11fe32c..9f70bff 100644
--- a/frontend/src/ui/rail.ts
+++ b/frontend/src/ui/rail.ts
@@ -64,7 +64,7 @@ export class Rail {
box.appendChild(more);
this.applyHidden();
document.addEventListener('pointerdown', (e) => { if (!this.flyout.hidden && !this.flyout.contains(e.target as Node)) this.closeFlyout(); }, true);
- document.addEventListener('keydown', (e) => { if (e.key === 'Escape' && !this.flyout.hidden) { e.preventDefault(); this.closeFlyout(); } }, true);
+ document.addEventListener('keydown', (e) => { if (e.key === 'Escape' && !e.isComposing && e.keyCode !== 229 && !this.flyout.hidden) { e.preventDefault(); this.closeFlyout(); } }, true);
const colors = q(root, '.cv-colors');
colors.classList.add('cv-fs');
diff --git a/frontend/src/ui/titlebar-tools.ts b/frontend/src/ui/titlebar-tools.ts
index e59259f..96f548a 100644
--- a/frontend/src/ui/titlebar-tools.ts
+++ b/frontend/src/ui/titlebar-tools.ts
@@ -1,4 +1,5 @@
import type { Commands } from './commands';
+import { t } from '../i18n';
import { el, setClass, setHidden, setText } from './dom';
import { icon } from './icons';
import { readChoice, setTheme } from './themes';
@@ -64,6 +65,7 @@ export class TitleTools {
search.addEventListener('click', () => this.open());
input.addEventListener('input', () => { this.picked = 0; this.fill(input.value); });
input.addEventListener('keydown', (e) => {
+ if (e.isComposing || e.keyCode === 229) return;
const n = this.results.children.length;
if (e.key === 'Escape') { this.close(); return; }
if (e.key === 'ArrowDown' || e.key === 'ArrowUp') { e.preventDefault(); if (n) { this.picked = (this.picked + (e.key === 'ArrowDown' ? 1 : n - 1)) % n; this.mark(); } return; }
@@ -96,7 +98,7 @@ export class TitleTools {
private fill(q: string): void {
const c = this.d.commands, needle = q.trim().toLowerCase();
- const found = c.all().filter((cmd) => c.enabled(cmd) && c.label(cmd) && (!needle || c.label(cmd).toLowerCase().includes(needle))).slice(0, 8);
+ const found = c.all().filter((cmd) => c.enabled(cmd) && c.label(cmd) && (!needle || c.label(cmd).toLowerCase().includes(needle) || t(c.label(cmd)).toLowerCase().includes(needle))).slice(0, 8);
this.results.textContent = '';
for (const cmd of found) {
const b = el(' ');
From 1404a7d1626f494eb7b46a2f24a8b63855f7a9ee Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 12:39:10 -0500
Subject: [PATCH 04/74] fix(text): characters past U+FFFF are never cut in
half, and libraries named in any script keep their own id
---
frontend/HASHOUT_LOG.md | 18 ++++++++++++++++++
frontend/src/app.ts | 8 ++++----
frontend/src/engine/doc.ts | 2 +-
frontend/src/engine/swatch-libraries.ts | 2 +-
frontend/src/engine/symbol-libraries.ts | 2 +-
frontend/src/engine/text.ts | 3 +++
frontend/src/io/ase.ts | 2 +-
frontend/src/io/psd-write.ts | 2 +-
frontend/src/tools/type.ts | 2 +-
frontend/src/ui/panels/type.ts | 2 +-
10 files changed, 32 insertions(+), 11 deletions(-)
diff --git a/frontend/HASHOUT_LOG.md b/frontend/HASHOUT_LOG.md
index b1aae74..c6a9a85 100644
--- a/frontend/HASHOUT_LOG.md
+++ b/frontend/HASHOUT_LOG.md
@@ -5000,3 +5000,21 @@ Three small things for the same people, in the same files:
Run in headless Chrome, 4x CPU throttled, slow network: a layer renamed with a composition stays in the field after a 229 Enter and is committed by the real one; a full-width "123.5" in X moves the object to 123.5; the font button's tooltip reads the family. Layout shift 0, no console error. Not run: each of the other guarded fields one by one; WebKit.
Looked at and left: the Content panel's head, the status bar's selection and the Appearance panel's head show a text object's own words through the translation walker, so an object reading "Copy" is shown translated there. Skipping those three elements would also stop "No Document" and "3 Objects" from being translated, so they need a `translate="no"` set with the label, which is its own change. The numeric fields of the options bar and the zoom field keep their handlers.
+
+### src/engine/text.ts, src/engine/doc.ts, library ids, src/io/psd-write.ts · characters outside the basic plane and names outside Latin are kept whole (issue 17)
+- refers-to: src/engine/text.ts :: styleSpans (split); src/engine/doc.ts :: nodeLabel; src/tools/type.ts :: the Glyph Touch readout; src/ui/panels/type.ts :: the one-character test; src/app.ts :: the `file_` and `user_` library ids; src/engine/swatch-libraries.ts :: libraryFromDoc; src/engine/symbol-libraries.ts :: symbolLibraryFromDoc; src/io/ase.ts :: readAse; src/io/psd-write.ts :: the `luni` block
+- kind: fix
+- logged: v0.60.0 · 2026-11-26
+
+A character past U+FFFF is two UTF-16 units (the rarer Chinese characters of Hong Kong and Taiwan names, and every emoji). Four places counted or cut by unit:
+
+- `touchSpans` styles `index` to `index + 1`, which put the first half of such a character in one span and the second half in the next; each half then drew as a replacement glyph and was saved that way. `styleSpans` now widens a range edge that falls between the two halves, so no caller can split a pair.
+- `nodeLabel` cut a text object's name at 28 units; when the 28th was a first half, the Layers row, the Content panel and the status bar ended in a replacement character. It cuts at 27 there.
+- The Glyph Touch readout and the Character panel's one-character test took one unit; they take one code point.
+- The PSD writer's Unicode layer name (`luni`) gave its length in code points but wrote UTF-16 units, so Photoshop read a name with such a character one unit short.
+
+A library made from a document or an .ase file got its id from its name with everything but `a-z0-9` turned into `_`, so every name in Chinese, Japanese, Korean, Cyrillic, Greek or Thai came to the same id (`user__`), and saving a second library replaced the first. The seven places keep letters and digits of any script (`\p{L}\p{N}`). A name in plain ASCII gets the id it had; a name with accented letters gets a new one, so a library saved under such a name before stays in the list beside a newly saved one.
+
+Run outside the repository (a scratch vitest file importing these functions): a touch on either half of an astral character, and a range ending inside it, leave every span well formed; a label cut at a pair is well formed. `tsc` clean. Not run: the PSD in Photoshop.
+
+Left: other cuts by unit that only shorten a name for display or a file stem (`engine/index.ts` 1069 and 2141, `engine/variables.ts` 124, `ui/panels/actions.ts` 70, `ui/panels/generative.ts` 222, `automation/agent-bridge.ts` 637, `io/width-profiles.ts` 25, `io/gen-options.ts` 205).
diff --git a/frontend/src/app.ts b/frontend/src/app.ts
index b432987..c665a78 100644
--- a/frontend/src/app.ts
+++ b/frontend/src/app.ts
@@ -1380,17 +1380,17 @@ export function startApp(): void {
if (!/\.fpth$/i.test(f.name)) throw new Error('Symbol libraries are formpath projects (.fpth).');
const d = await libraryDoc(f);
if (!d.symbols.length) throw new Error(`${f.name} holds no symbols.`);
- showSymbolLib(symbolLibraryFromDoc(d, name, `file_${name.toLowerCase().replace(/[^a-z0-9]+/g, '_')}`));
+ showSymbolLib(symbolLibraryFromDoc(d, name, `file_${name.toLowerCase().replace(/[^\p{L}\p{N}]+/gu, '_')}`));
return;
}
if (kind === 'brush') {
if (!/\.fpth$/i.test(f.name)) throw new Error('Brush libraries are formpath projects (.fpth).');
const d = await libraryDoc(f);
if (!d.brushes.length) throw new Error(`${f.name} holds no brushes.`);
- showBrushLib({ id: `file_${name.toLowerCase().replace(/[^a-z0-9]+/g, '_')}`, name, brushes: d.brushes.map(({ id: _id, ...b }) => { void _id; return b; }), user: true });
+ showBrushLib({ id: `file_${name.toLowerCase().replace(/[^\p{L}\p{N}]+/gu, '_')}`, name, brushes: d.brushes.map(({ id: _id, ...b }) => { void _id; return b; }), user: true });
return;
}
- const lib = /\.ase$/i.test(f.name) ? readAse(await f.arrayBuffer(), f.name) : libraryFromDoc(await libraryDoc(f), name, `file_${name.toLowerCase().replace(/[^a-z0-9]+/g, '_')}`);
+ const lib = /\.ase$/i.test(f.name) ? readAse(await f.arrayBuffer(), f.name) : libraryFromDoc(await libraryDoc(f), name, `file_${name.toLowerCase().replace(/[^\p{L}\p{N}]+/gu, '_')}`);
if (!lib.groups.length) throw new Error(`${f.name} holds no swatches.`);
showSwatchLib(lib);
} catch (err) { toast(message(err), 'error'); }
@@ -1454,7 +1454,7 @@ export function startApp(): void {
const v = await askForm('Save Brushes', [{ kind: 'text', key: 'name', label: 'Library name', value: `${p.name} Brushes` }, { kind: 'note', text: 'Saves the document’s brushes as a formpath project to open later with Open Brush Library; it also appears under User Defined.' }], { ok: 'Save' });
if (!v) return;
const name = String(v.name).trim() || 'Brushes';
- keepUserBrushLibrary({ id: `user_${name.toLowerCase().replace(/[^a-z0-9]+/g, '_')}`, name, brushes: p.doc.brushes.map(({ id: _id, ...b }) => { void _id; return b; }) });
+ keepUserBrushLibrary({ id: `user_${name.toLowerCase().replace(/[^\p{L}\p{N}]+/gu, '_')}`, name, brushes: p.doc.brushes.map(({ id: _id, ...b }) => { void _id; return b; }) });
await deliver(await libraryProject(name, { brushes: p.doc.brushes }), `${name}.fpth`);
}
diff --git a/frontend/src/engine/doc.ts b/frontend/src/engine/doc.ts
index 1778740..2e695a3 100644
--- a/frontend/src/engine/doc.ts
+++ b/frontend/src/engine/doc.ts
@@ -189,7 +189,7 @@ export function nodeLabel(n: VNode): string {
case 'group': return n.clip ? 'Clip Group' : 'Group';
case 'path': return n.live ? ({ rect: 'Rectangle', ellipse: 'Ellipse', polygon: 'Polygon', star: 'Star', line: 'Line' }[n.live.kind]) : n.guide ? 'Guide' : 'Path';
case 'compound': return 'Compound Path';
- case 'text': { const t = n.spans.map((s) => s.text).join('').replace(/\s+/g, ' ').trim(); return t ? (t.length > 28 ? t.slice(0, 28) + '…' : t) : 'Type'; }
+ case 'text': { const t = n.spans.map((s) => s.text).join('').replace(/\s+/g, ' ').trim(); return t ? (t.length > 28 ? t.slice(0, /[\ud800-\udbff]/.test(t[27]) ? 27 : 28) + '…' : t) : 'Type'; }
case 'image': return 'Image';
case 'symbol': return 'Symbol';
case 'blend': return 'Blend';
diff --git a/frontend/src/engine/swatch-libraries.ts b/frontend/src/engine/swatch-libraries.ts
index 25733b7..2ab8812 100644
--- a/frontend/src/engine/swatch-libraries.ts
+++ b/frontend/src/engine/swatch-libraries.ts
@@ -119,7 +119,7 @@ export function swatchLibrary(key: string, extra: SwatchLibrary[] = []): SwatchL
return [...SWATCH_LIBRARIES, ...extra].find((l) => l.id.toLowerCase() === k || l.name.toLowerCase() === k);
}
-export function libraryFromDoc(doc: Doc, name: string, id = `user_${name.toLowerCase().replace(/[^a-z0-9]+/g, '_')}`): SwatchLibrary {
+export function libraryFromDoc(doc: Doc, name: string, id = `user_${name.toLowerCase().replace(/[^\p{L}\p{N}]+/gu, '_')}`): SwatchLibrary {
const groups: LibGroup[] = [];
const at = (g: string): LibGroup => { let x = groups.find((y) => y.name === g); if (!x) { x = { name: g, swatches: [] }; groups.push(x); } return x; };
for (const s of doc.swatches) {
diff --git a/frontend/src/engine/symbol-libraries.ts b/frontend/src/engine/symbol-libraries.ts
index 859ff78..f9840a5 100644
--- a/frontend/src/engine/symbol-libraries.ts
+++ b/frontend/src/engine/symbol-libraries.ts
@@ -114,6 +114,6 @@ export function symbolLibrary(key: string, extra: SymbolLibrary[] = []): SymbolL
return [...SYMBOL_LIBRARIES, ...extra].find((l) => l.id === k || l.id === key || l.name.toLowerCase() === key.trim().toLowerCase());
}
-export function symbolLibraryFromDoc(doc: Doc, name: string, id = `user_${name.toLowerCase().replace(/[^a-z0-9]+/g, '_')}`): SymbolLibrary {
+export function symbolLibraryFromDoc(doc: Doc, name: string, id = `user_${name.toLowerCase().replace(/[^\p{L}\p{N}]+/gu, '_')}`): SymbolLibrary {
return { id, name, user: true, symbols: doc.symbols.map((s) => ({ name: s.name, art: s.art, type: s.type ?? 'static', slice: s.slice ?? null })) };
}
diff --git a/frontend/src/engine/text.ts b/frontend/src/engine/text.ts
index 3598575..55395de 100644
--- a/frontend/src/engine/text.ts
+++ b/frontend/src/engine/text.ts
@@ -855,6 +855,9 @@ export function setPlainText(n: TextNode, text: string): Span[] {
}
export function styleSpans(spans: Span[], start: number, end: number, patch: Partial): Span[] {
+ const all = spans.map((s) => s.text).join(''), split = (k: number): boolean => k > 0 && k < all.length && /[\udc00-\udfff]/.test(all[k]) && /[\ud800-\udbff]/.test(all[k - 1]);
+ if (split(start)) start--;
+ if (split(end)) end++;
const out: Span[] = [];
let pos = 0;
for (const sp of spans) {
diff --git a/frontend/src/io/ase.ts b/frontend/src/io/ase.ts
index 561d3e0..a8eb61d 100644
--- a/frontend/src/io/ase.ts
+++ b/frontend/src/io/ase.ts
@@ -46,7 +46,7 @@ export function readAse(data: ArrayBuffer, name = 'Library'): SwatchLibrary {
}
at = body + len;
}
- const id = `user_${name.toLowerCase().replace(/\.ase$/, '').replace(/[^a-z0-9]+/g, '_')}`;
+ const id = `user_${name.toLowerCase().replace(/\.ase$/, '').replace(/[^\p{L}\p{N}]+/gu, '_')}`;
return { id, name: name.replace(/\.ase$/i, ''), groups: groups.filter((g) => g.swatches.length), user: true };
}
diff --git a/frontend/src/io/psd-write.ts b/frontend/src/io/psd-write.ts
index 13092a1..ce7ebcf 100644
--- a/frontend/src/io/psd-write.ts
+++ b/frontend/src/io/psd-write.ts
@@ -125,7 +125,7 @@ export function encodePsd(o: PsdOpts): Blob {
const extra = new Out();
extra.u32(0); extra.u32(0); extra.bytes(pascal(L.name));
const uni = new Out(), name = Array.from(L.name);
- uni.u32(name.length);
+ uni.u32(L.name.length);
for (const c of name) { const code = c.codePointAt(0) ?? 63; if (code > 0xffff) { const v = code - 0x10000; uni.u16(0xd800 + (v >> 10)); uni.u16(0xdc00 + (v & 0x3ff)); } else uni.u16(code); }
uni.pad(4);
extra.tag('8BIM'); extra.tag('luni'); extra.u32(uni.n); extra.bytes(uni.done());
diff --git a/frontend/src/tools/type.ts b/frontend/src/tools/type.ts
index 66ed847..692d176 100644
--- a/frontend/src/tools/type.ts
+++ b/frontend/src/tools/type.ts
@@ -158,7 +158,7 @@ function touchOptions(e: Engine): OptionSpec[] {
const num = (label: string, key: keyof CharTouch, unit: string, min: number, max: number): OptionSpec => ({ kind: 'number', label, unit, min, max, step: 1, get: () => { const c = cur(); return c ? Math.round(c[key] * 100) / 100 : null; }, set: (v) => put({ [key]: v }) });
return [
{ kind: 'title', text: 'Glyph Touch' },
- { kind: 'readout', label: 'Character', get: () => { const n = TT.id ? e.nodeById(TT.id) : null; return n?.kind === 'text' && TT.index >= 0 ? `“${plainText(n).slice(TT.index, TT.index + 1)}”` : 'None'; } },
+ { kind: 'readout', label: 'Character', get: () => { const n = TT.id ? e.nodeById(TT.id) : null; return n?.kind === 'text' && TT.index >= 0 ? `“${String.fromCodePoint(plainText(n).codePointAt(TT.index) ?? 32)}”` : 'None'; } },
num('X', 'x', 'pt', -10000, 10000), num('Y', 'y', 'pt', -10000, 10000), num('H', 'sx', '%', 1, 10000), num('V', 'sy', '%', 1, 10000), num('Rotate', 'r', '°', -180, 180),
{ kind: 'button', label: 'Reset', run: () => { if (TT.id && TT.index >= 0) e.setCharTouch(TT.id, TT.index, null, 'Reset Glyph Touch'); } },
];
diff --git a/frontend/src/ui/panels/type.ts b/frontend/src/ui/panels/type.ts
index 4281fc0..fccd7df 100644
--- a/frontend/src/ui/panels/type.ts
+++ b/frontend/src/ui/panels/type.ts
@@ -377,7 +377,7 @@ export class GlyphsPanel {
private async syncAlts(): Promise {
const ed = typing.editor, n = ed?.node(), r = ed?.range() ?? null;
- const ch = n && r && r[1] - r[0] === 1 ? plainText(n).slice(r[0], r[1]) : '';
+ const picked = n && r ? plainText(n).slice(r[0], r[1]) : '', ch = Array.from(picked).length === 1 ? picked : '';
const st = n && ch && r ? styleAt(n.spans, r[0]) : null;
const key = st && r && n ? `${n.id}|${r[0]}|${ch}|${st.font}|${st.style}|${st.alt ?? ''}` : '';
if (key === this.altKey) return;
From 92fed1d468f093465327dc2325eefac3cda0b211 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 12:40:23 -0500
Subject: [PATCH 05/74] fix(fonts): a character the font lacks is outlined in a
face of its own region, and shaped type falls back instead of drawing an
empty box
---
frontend/HASHOUT_LOG.md | 13 +++++++++++++
frontend/src/engine/text.ts | 2 +-
frontend/src/io/fonts.ts | 13 ++++++++++++-
3 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/frontend/HASHOUT_LOG.md b/frontend/HASHOUT_LOG.md
index c6a9a85..0178de6 100644
--- a/frontend/HASHOUT_LOG.md
+++ b/frontend/HASHOUT_LOG.md
@@ -5018,3 +5018,16 @@ A library made from a document or an .ase file got its id from its name with eve
Run outside the repository (a scratch vitest file importing these functions): a touch on either half of an astral character, and a range ending inside it, leave every span well formed; a label cut at a pair is well formed. `tsc` clean. Not run: the PSD in Photoshop.
Left: other cuts by unit that only shorten a name for display or a file stem (`engine/index.ts` 1069 and 2141, `engine/variables.ts` 124, `ui/panels/actions.ts` 70, `ui/panels/generative.ts` 222, `automation/agent-bridge.ts` 637, `io/width-profiles.ts` 25, `io/gen-options.ts` 205).
+
+### src/io/fonts.ts, src/engine/text.ts · a character the font lacks: Traditional Chinese, Japanese and Korean faces first, and no empty box in shaped type (issue 17)
+- refers-to: src/io/fonts.ts :: HAN_FIRST, hanFirst, fallbackGlyph; src/engine/text.ts :: itemsOf (the shaped branch)
+- kind: fix
+- logged: v0.60.0 · 2026-11-26
+
+When type is outlined (Create Outlines, PDF, EPS, outlined SVG) and its font has no glyph for a character, `fallbackGlyph` walks a list of families. For Han characters that list began with the Simplified Chinese faces and had no Traditional one at all, so on Windows a Traditional Chinese text set in a Latin font was outlined in Microsoft YaHei, with mainland letterforms, while the screen (the browser's own fallback, led by the page language) showed Microsoft JhengHei. Japanese text got the Chinese forms too. `hanFirst` puts the faces of one region first: by the family's own name when it says (TC, HK, JP, KR, JhengHei, MingLiU, Hiragino, Malgun and so on; SC, YaHei and SimSun keep the old order), else by the page language (`zh-TW`, `zh-HK`, `ja`, `ko`), which the i18n module sets from the language chosen in Preferences. The old list follows unchanged.
+
+In `itemsOf`, a run that goes through the shaper (features, a glyph alternate or variable axes are set) kept glyph id 0 for a character the font lacks, and the renderer drew the font's empty box for it; type without those settings never did, because the browser falls back per character. A shaped glyph with id 0 is now pushed as a plain character, so it is measured and drawn the way unshaped type is, and the rest of the run stays shaped.
+
+`tsc` clean, `npm test` 61 pass. Not run: the order on a Windows or macOS machine with those faces; a variable font with Chinese in it on screen.
+
+Found and not changed here: type whose font is not installed is left out of a PDF, an EPS and an outlined SVG without a word (`outlineText` returns null when `fontFor` does, and the exporters then write nothing for that object), and the PDF reader names Helvetica as the nearest match for every font it does not know, a family Windows does not have. Create Outlines says so; the exporters do not. That is the next change in this area.
diff --git a/frontend/src/engine/text.ts b/frontend/src/engine/text.ts
index 55395de..e1e80ee 100644
--- a/frontend/src/engine/text.ts
+++ b/frontend/src/engine/text.ts
@@ -198,7 +198,7 @@ function itemsOf(spans: Span[]): Item[] {
const shaped = (feats.length || st.alt !== undefined || hasAxes(st)) && shaping ? shaping.shape(st, piece, feats) : null;
if (shaped) {
let k = 0;
- for (const g of shaped) { const ch = piece.slice(k, k + g.chars); out.push({ ch, st, index: i, gid: g.gid, adv: g.adv }); i += ch.length; k += g.chars; }
+ for (const g of shaped) { const ch = piece.slice(k, k + g.chars); out.push(g.gid ? { ch, st, index: i, gid: g.gid, adv: g.adv } : { ch, st, index: i }); i += ch.length; k += g.chars; }
continue;
}
for (const ch of piece) {
diff --git a/frontend/src/io/fonts.ts b/frontend/src/io/fonts.ts
index 22b7745..a42832a 100644
--- a/frontend/src/io/fonts.ts
+++ b/frontend/src/io/fonts.ts
@@ -146,6 +146,17 @@ export function fontFor(family: string, style: string): Promise {
const CJK_FALLBACKS = ['PingFang SC', 'Hiragino Sans GB', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Apple SD Gothic Neo', 'Noto Sans CJK SC', 'Noto Sans CJK JP', 'Noto Sans CJK KR', 'Source Han Sans SC', 'Microsoft YaHei', 'Yu Gothic', 'Meiryo', 'Malgun Gothic', 'SimSun', 'MS Gothic', 'WenQuanYi Micro Hei', 'Droid Sans Fallback', 'Songti SC', 'Arial Unicode MS'];
const GENERAL_FALLBACKS = ['Helvetica Neue', 'Arial', 'Segoe UI', 'Noto Sans', 'DejaVu Sans', 'Liberation Sans', 'Lucida Grande', 'Arial Unicode MS', 'Segoe UI Symbol', 'Apple Symbols', 'Noto Sans Symbols', 'Noto Sans Symbols 2'];
+const HAN_FIRST: Record = {
+ tw: ['Microsoft JhengHei', 'PingFang TC', 'Noto Sans CJK TC', 'Source Han Sans TC', 'Heiti TC', 'PMingLiU', 'MingLiU'],
+ hk: ['Microsoft JhengHei', 'PingFang HK', 'Noto Sans CJK HK', 'Noto Sans CJK TC', 'Source Han Sans HK', 'MingLiU_HKSCS'],
+ ja: ['Yu Gothic', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans CJK JP', 'Source Han Sans', 'Meiryo', 'MS Gothic'],
+ ko: ['Malgun Gothic', 'Apple SD Gothic Neo', 'Noto Sans CJK KR', 'Source Han Sans K'],
+};
+function hanFirst(family: string): string[] {
+ const lang = (globalThis.document?.documentElement.lang || globalThis.navigator?.language || '').toLowerCase();
+ const by = /\bHK\b|HKSCS/.test(family) ? 'hk' : /\bTC\b|JhengHei|MingLiU|Heiti TC/.test(family) ? 'tw' : /\bJP\b|Hiragino|Meiryo|Mincho|Yu Gothic|MS Gothic/.test(family) ? 'ja' : /\bKR?\b|Malgun|Gulim|Batang/.test(family) ? 'ko' : /\bSC\b|YaHei|SimSun|SimHei/.test(family) ? '' : /^zh-(hk|mo)/.test(lang) ? 'hk' : /^zh-(tw|hant)/.test(lang) ? 'tw' : lang.startsWith('ja') ? 'ja' : lang.startsWith('ko') ? 'ko' : '';
+ return HAN_FIRST[by] ?? [];
+}
const isCjk = (cp: number): boolean => (cp >= 0x2e80 && cp <= 0x9fff) || (cp >= 0xac00 && cp <= 0xd7af) || (cp >= 0xf900 && cp <= 0xfaff) || (cp >= 0xfe30 && cp <= 0xfe4f) || (cp >= 0xff00 && cp <= 0xffef) || (cp >= 0x20000 && cp <= 0x3ffff);
export interface FallbackGlyph { font: Font; gid: number; family: string; source: string }
@@ -179,7 +190,7 @@ export function fallbackGlyph(ch: string, family: string, style: string): Promis
p = (async () => {
const own = await bundledFallback(family, style, ch);
if (own) return own;
- const cp = ch.codePointAt(0) ?? 0, order = isCjk(cp) ? [...CJK_FALLBACKS, ...GENERAL_FALLBACKS] : [...GENERAL_FALLBACKS, ...CJK_FALLBACKS];
+ const cp = ch.codePointAt(0) ?? 0, order = isCjk(cp) ? [...hanFirst(family), ...CJK_FALLBACKS, ...GENERAL_FALLBACKS] : [...GENERAL_FALLBACKS, ...CJK_FALLBACKS];
for (const fam of [...new Set(order)].filter((f) => f !== family)) {
const font = await fontFor(fam, style).catch(() => null), gid = covers(font, ch);
if (font && gid) return { font, gid, family: fam, source: fam };
From d75a82cfd1e120e23153adb2d27ec507c4cab8a8 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 12:41:58 -0500
Subject: [PATCH 06/74] fix(engine): file names, project text, terminal output
and agent text outside ASCII come through whole
---
backend/HASHOUT_LOG.md | 17 +++++++++++++++++
backend/app/main.py | 9 ++++++++-
backend/app/routers/batch.py | 2 +-
backend/app/routers/io.py | 2 +-
backend/app/services/spell.py | 2 ++
backend/app/services/terminal.py | 8 +++++++-
backend/formpath_engine.py | 5 +++++
frontend/src/app.ts | 2 +-
setup/cli.py | 1 +
setup/mcp_stdio.py | 2 ++
10 files changed, 45 insertions(+), 5 deletions(-)
diff --git a/backend/HASHOUT_LOG.md b/backend/HASHOUT_LOG.md
index c02dd3c..81505c0 100644
--- a/backend/HASHOUT_LOG.md
+++ b/backend/HASHOUT_LOG.md
@@ -923,3 +923,20 @@ Reproduced on the engine before the change: a document of 1,200 objects (659 KB
After the change, same engine, same test: 4,000 objects (2,199 KB) and 30,000 objects (16,652 KB) save, and the file read back holds the same document that was sent; 64 MiB and 10 bytes is refused with the engine's own sentence; the package route takes the 2,199 KB document.
Not changed here: where a project is saved. Save still writes into the library folder by name, and an export still goes to the exports folder. Choosing a place in the system's own file window, and saving again to that place, is the next change.
+
+### app/routers/io.py, app/routers/batch.py, app/main.py, formpath_engine.py, app/services/terminal.py, app/services/spell.py, setup/mcp_stdio.py, setup/cli.py · names and text outside ASCII survive the engine (issue 17)
+- refers-to: app/routers/io.py :: SAFE, export; app/routers/batch.py :: SAFE, files_write; app/main.py :: AsciiJSON, app; formpath_engine.py :: the stream setup at the top; app/services/terminal.py :: PtyProcess, base_env; app/services/spell.py :: check; setup/mcp_stdio.py :: main; setup/cli.py :: main
+- kind: fix
+- logged: v0.60.0 · 2026-11-26
+
+Issue 17 asks for text input and non-English fonts to work across the product. The engine had these faults for anyone whose names and words are not ASCII; each was read in the code, and the ones marked run were run here on Linux.
+
+- An exported file lost its name. `SAFE` in `io.py` (every export of the desktop app goes through `/api/io/export`) and in `batch.py` (`/api/files/write`: actions, batch, data merge, unembed) kept only ASCII letters, digits and a few signs and turned the rest into `_`. A poster named in Chinese was written as `_.pdf`, the next as `_ 2.pdf`; through `files/write`, which overwrites, a batch of Chinese-named files left only the last. Both now remove only what a file name cannot hold on Windows, macOS or Linux (`\ / : * ? " < > |` and control characters), the rule `projects.py` NAME and `package.py` already follow. Run: the issue's own document name comes back unchanged from both. The window's unembed name (`frontend/src/app.ts`) follows the same rule.
+- A project holding half of a surrogate pair saved and then never opened again. The window sends such a half as the escape `\ud83d`; `json.loads` accepts it and the file is written with ASCII escapes, but the web framework renders every answer with `ensure_ascii=False` and then encodes it as UTF-8, which raises on a lone half, so opening that project answered 500 every time. `AsciiJSON` is the app's default response class: the same JSON with every character outside ASCII escaped, which a lone half survives and the window reads back as the same string. Answers with Chinese text are larger on the wire (six bytes a character for three); the window and the engine are on one machine. Run: the body for a string with a lone half is valid ASCII JSON; `pytest` 196 pass.
+- The frozen engine wrote its messages in the ANSI code page (cp950 on a Traditional Chinese Windows) while the desktop shell reads them as UTF-8, so a start failure that names the data folder under a Chinese user name showed replacement characters, and a character outside Big5 raised on a strict stream. `formpath_engine.py` sets both streams to UTF-8 with `backslashreplace` when they can be reconfigured. Not run on Windows.
+- The terminal's reader died on one byte that is not UTF-8 (`cat` of a Big5 file): `PtyProcessUnicode` decodes strictly, the read raised, the thread ended with the chunk, and the tab froze with the session still marked alive. `PtyProcess` is now a subclass that decodes with `replace`. Run: Big5 bytes followed by UTF-8 text arrive as two replacement characters and the text. Windows (`winpty`) is untouched and not examined.
+- A shell started from the Dock or a launcher with no locale ran in the C locale, where typed Chinese echoes as escapes and `ls` prints question marks. `base_env` sets `LANG=en_US.UTF-8` when none of `LC_ALL`, `LC_CTYPE` and `LANG` is set, off Windows only.
+- Check Spelling marked every Chinese, Japanese, Thai or Cyrillic word as misspelt and offered English two-letter words for it, because a language with no dictionary falls back to English and `isalpha` is true for those letters. `check` passes over a word that has a letter the dictionary's own alphabet does not hold (`word_frequency.letters`). Run: of a Chinese word, a Russian word, a Vietnamese word and "helo", only "helo" is reported.
+- The stdio bridge (`./formpath mcp`, the Claude Desktop bundle) read standard input in the ANSI code page on Windows. MCP is UTF-8, so text with Chinese in it ended the bridge with a decode error or reached the engine as other characters. `main` reconfigures both streams to UTF-8 and writes plain newlines. `cli.py` does the same for its output, with `backslashreplace`, so a label with a character the console cannot show no longer raises when the output is piped. The decode failure was reproduced by the audit with the stream forced to cp950; the fix was not run on Windows.
+
+Looked at and left: text files read and written with no encoding (`core/config.py` library.json, `routers/projects.py`, `services/llm.py`) hold ASCII JSON, so the code page does not reach them; the package summary header is cut at 4000 characters and can end mid-escape when many missing links have long Chinese paths; `services/dwg.py` decodes LibreDWG's DXF as UTF-8 with replacement, which loses text in a drawing older than 2007; a chat message with a line break is cut when Claude Code is a `.cmd` shim on Windows; `formpath.bat` splits `key=value` arguments at the `=`.
diff --git a/backend/app/main.py b/backend/app/main.py
index 49f4984..aae22d7 100644
--- a/backend/app/main.py
+++ b/backend/app/main.py
@@ -1,8 +1,10 @@
+import json
import mimetypes
from contextlib import asynccontextmanager
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
+from fastapi.responses import JSONResponse
from fastapi.staticfiles import StaticFiles
from app.core import config
@@ -28,7 +30,12 @@ async def lifespan(_: FastAPI):
terminals.close_all()
-app = FastAPI(title=config.APP_NAME, version=config.VERSION, lifespan=lifespan)
+class AsciiJSON(JSONResponse):
+ def render(self, content) -> bytes:
+ return json.dumps(content, ensure_ascii=True, allow_nan=False, separators=(",", ":")).encode("ascii")
+
+
+app = FastAPI(title=config.APP_NAME, version=config.VERSION, lifespan=lifespan, default_response_class=AsciiJSON)
app.add_middleware(CORSMiddleware, allow_origins=config.cors_origins(), allow_methods=["*"], allow_headers=["*"])
app.add_middleware(WindowKeyGuard)
app.add_middleware(LocalGuard, origins=config.window_origins())
diff --git a/backend/app/routers/batch.py b/backend/app/routers/batch.py
index df0a018..9492bf0 100644
--- a/backend/app/routers/batch.py
+++ b/backend/app/routers/batch.py
@@ -10,7 +10,7 @@
from app.routers.mcp import _app_origin
router = APIRouter(tags=["batch"])
-SAFE = re.compile(r"[^A-Za-z0-9 ._()\[\]+&,'@-]+")
+SAFE = re.compile(r'[\\/:*?"<>|\x00-\x1f\x7f]+')
SET_NAME = re.compile(r"^[^\\/:*?\"<>|\x00-\x1f]{1,80}$")
READABLE = {".fpth", ".svg", ".svgz", ".pdf", ".ai", ".png", ".jpg", ".jpeg", ".webp", ".gif", ".bmp", ".psd", ".psb", ".tif", ".tiff", ".csv", ".tsv", ".txt", ".json", ".xml", ".fpaction"}
WRITABLE = {".fpth", ".svg", ".pdf", ".png", ".jpg", ".jpeg", ".webp", ".txt", ".csv", ".json", ".fpaction", ".zip"}
diff --git a/backend/app/routers/io.py b/backend/app/routers/io.py
index 97a63c4..bfce1a5 100644
--- a/backend/app/routers/io.py
+++ b/backend/app/routers/io.py
@@ -8,7 +8,7 @@
from app.services import dwg
router = APIRouter(prefix="/api/io", tags=["io"])
-SAFE = re.compile(r"[^A-Za-z0-9 ._()-]+")
+SAFE = re.compile(r'[\\/:*?"<>|\x00-\x1f\x7f]+')
MAX = 512 * 1024 * 1024
diff --git a/backend/app/services/spell.py b/backend/app/services/spell.py
index 6287f78..4ce1443 100644
--- a/backend/app/services/spell.py
+++ b/backend/app/services/spell.py
@@ -68,6 +68,8 @@ def check(words: list[str], lang: str) -> list[dict[str, object]]:
continue
seen.add(word)
low = word.lower().strip("'")
+ if any(ch.isalpha() and ch not in spell.word_frequency.letters for ch in low):
+ continue
if low in known or not spell.unknown([low]):
continue
found = spell.candidates(low) or set()
diff --git a/backend/app/services/terminal.py b/backend/app/services/terminal.py
index 128c79e..86a4970 100644
--- a/backend/app/services/terminal.py
+++ b/backend/app/services/terminal.py
@@ -12,7 +12,11 @@
if os.name == "nt":
from winpty import PtyProcess
else:
- from ptyprocess import PtyProcessUnicode as PtyProcess
+ from ptyprocess import PtyProcessUnicode
+
+ class PtyProcess(PtyProcessUnicode):
+ def __init__(self, pid, fd, encoding="utf-8", codec_errors="replace"):
+ super().__init__(pid, fd, encoding, codec_errors)
SCROLLBACK = 256 * 1024
MIN_COLS, MIN_ROWS = 10, 4
@@ -87,6 +91,8 @@ def base_env() -> dict:
env["FORMPATH_URL"] = engine_url()
env.pop("FORMPATH_WINDOW_KEY_STDOUT", None)
env.pop("FORMPATH_INAPP_TOKEN", None)
+ if os.name != "nt" and not (env.get("LC_ALL") or env.get("LC_CTYPE") or env.get("LANG")):
+ env["LANG"] = "en_US.UTF-8"
if not getattr(sys, "frozen", False):
env["PATH"] = str(config.REPO_DIR) + os.pathsep + env.get("PATH", "")
return env
diff --git a/backend/formpath_engine.py b/backend/formpath_engine.py
index 3c174f2..b3bcc28 100644
--- a/backend/formpath_engine.py
+++ b/backend/formpath_engine.py
@@ -11,6 +11,11 @@
sys.stdout = open(os.devnull, "w", encoding="utf-8")
if sys.stderr is None:
sys.stderr = open(os.devnull, "w", encoding="utf-8")
+for _stream in (sys.stdout, sys.stderr):
+ try:
+ _stream.reconfigure(encoding="utf-8", errors="backslashreplace")
+ except (AttributeError, ValueError):
+ pass
def resource_dir() -> str:
diff --git a/frontend/src/app.ts b/frontend/src/app.ts
index c665a78..472ef13 100644
--- a/frontend/src/app.ts
+++ b/frontend/src/app.ts
@@ -713,7 +713,7 @@ export function startApp(): void {
if (!p || !raw || n.linked) return false;
const ext = raw.type === 'image/jpeg' ? 'jpg' : raw.type === 'image/webp' ? 'webp' : 'png';
const blob = ext === 'png' && raw.type !== 'image/png' ? await (async () => { const b = await createImageBitmap(raw), c = new OffscreenCanvas(b.width, b.height); c.getContext('2d')?.drawImage(b, 0, 0); b.close(); return c.convertToBlob({ type: 'image/png' }); })() : raw;
- const base = (n.name ?? n.link ?? 'Image').replace(/\.[a-z0-9]+$/i, '').replace(/[^A-Za-z0-9 ._()-]+/g, '_').trim() || 'Image', fname = `${base}.${ext}`;
+ const base = (n.name ?? n.link ?? 'Image').replace(/\.[a-z0-9]+$/i, '').replace(/[\\/:*?"<>|\x00-\x1f\x7f]+/g, '_').trim() || 'Image', fname = `${base}.${ext}`;
let f: LinkFile | null = null;
if (caps && !useHandles()) {
const lib = (await api.libraryFolder())?.folder ?? caps.libraryDir;
diff --git a/setup/cli.py b/setup/cli.py
index b8bac34..ba038dc 100755
--- a/setup/cli.py
+++ b/setup/cli.py
@@ -76,6 +76,7 @@ def params(args: list[str]) -> dict:
def main(argv: list[str]) -> int:
+ sys.stdout.reconfigure(encoding="utf-8", errors="backslashreplace")
if not argv or argv[0] in ("-h", "--help", "help"):
print(USAGE)
return 0
diff --git a/setup/mcp_stdio.py b/setup/mcp_stdio.py
index b1bf480..0d5df1b 100644
--- a/setup/mcp_stdio.py
+++ b/setup/mcp_stdio.py
@@ -114,6 +114,8 @@ def main() -> None:
print(f"{flag}: not an option. ./formpath mcp takes --attach.", file=sys.stderr)
sys.exit(2)
ATTACH = True
+ sys.stdin.reconfigure(encoding="utf-8")
+ sys.stdout.reconfigure(encoding="utf-8", newline="\n")
for line in sys.stdin:
if not line.strip():
continue
From b6e86ebbcd4861af56eac6e513429421764ae3a8 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 12:43:18 -0500
Subject: [PATCH 07/74] fix(io): a CSV, a DXF or an SVG that is not UTF-8 is
read in its own charset instead of as replacement characters
---
frontend/HASHOUT_LOG.md | 19 +++++++++++++++++++
frontend/src/app.ts | 9 +++++----
frontend/src/io/dxf.ts | 9 +++++++++
frontend/src/io/text-decode.ts | 25 +++++++++++++++++++++++++
frontend/src/ui/panels/graph-data.ts | 3 ++-
frontend/src/ui/panels/variables.ts | 3 ++-
6 files changed, 62 insertions(+), 6 deletions(-)
create mode 100644 frontend/src/io/text-decode.ts
diff --git a/frontend/HASHOUT_LOG.md b/frontend/HASHOUT_LOG.md
index 0178de6..9906e69 100644
--- a/frontend/HASHOUT_LOG.md
+++ b/frontend/HASHOUT_LOG.md
@@ -99,6 +99,7 @@ frontend/
│ ├── svg-refs.ts SVG import: patterns, masks, clip paths and markers
│ ├── svg-filter.ts SVG import: filter chains to live effects
│ ├── svg-text.ts SVG import: text, tspans and text on a path to live type
+ │ ├── text-decode.ts bytes of a text file to a string: byte order marks, UTF-8, then a legacy charset
│ ├── pdf.ts PDF writer and native reader
│ ├── raster.ts region rendering, PNG, JPEG, WebP, screens zip
│ ├── trace.ts image trace: options, presets, worker run, nodes
@@ -194,6 +195,7 @@ Scripts with entries, in folder order. Every other script is in the map above wi
- src/io/svg-refs.ts
- src/io/svg-filter.ts
- src/io/svg-text.ts
+- src/io/text-decode.ts
- src/io/pdf.ts
- src/io/pdf-read.ts
- src/io/pdf-crypt.ts
@@ -5031,3 +5033,20 @@ In `itemsOf`, a run that goes through the shaper (features, a glyph alternate or
`tsc` clean, `npm test` 61 pass. Not run: the order on a Windows or macOS machine with those faces; a variable font with Chinese in it on screen.
Found and not changed here: type whose font is not installed is left out of a PDF, an EPS and an outlined SVG without a word (`outlineText` returns null when `fontFor` does, and the exporters then write nothing for that object), and the PDF reader names Helvetica as the nearest match for every font it does not know, a family Windows does not have. Create Outlines says so; the exporters do not. That is the next change in this area.
+
+### src/io/text-decode.ts, src/io/dxf.ts, src/app.ts, src/ui/panels/variables.ts, src/ui/panels/graph-data.ts · a text file that is not UTF-8 is read in its own charset (issue 17)
+- refers-to: src/io/text-decode.ts :: decodeText, fileText, localeLabel; src/io/dxf.ts :: decodeDxf, CODE_PAGES; src/app.ts :: svgText, the DXF branch of the opener; src/ui/panels/variables.ts :: the data file import; src/ui/panels/graph-data.ts :: the data import
+- kind: fix
+- logged: v0.60.0 · 2026-11-26
+
+`Blob.text()` is UTF-8 and nothing else: any byte that is not UTF-8 becomes U+FFFD, with no error. Four readers used it for files that are often not UTF-8.
+
+- Variables (data merge) and Graph Data read a CSV or TSV. Excel's plain "CSV" on a Traditional Chinese Windows is Big5, on a Japanese one Shift-JIS, and its "Unicode Text" is UTF-16LE: every cell with such text came in as replacement characters.
+- A DXF up to AutoCAD 2004, and one from several other CAD programs on Chinese, Japanese and Korean Windows, holds its text in the code page named by `$DWGCODEPAGE` (ANSI_950, ANSI_936, ANSI_932, ANSI_949, ANSI_1251 and so on).
+- An SVG saved as UTF-16, or with `encoding="Big5"` or `ISO-8859-1` in its XML declaration.
+
+`decodeText` is the one place for it: a byte order mark decides (UTF-8, UTF-16LE, UTF-16BE); else UTF-8 when the bytes are valid UTF-8; else the charset the caller names (the DXF's code page, the SVG's declared encoding), strictly; else the legacy charset of the language the system is set to (`localeLabel`: Big5 for zh-TW and zh-HK, GB18030 for other Chinese, Shift-JIS, EUC-KR, the Windows code pages for Cyrillic, Greek, Turkish, Hebrew, Arabic, Thai, Vietnamese, Central European and Baltic), strictly; else windows-1252, which cannot fail. A file that is UTF-8 is read exactly as before. `decodeDxf` reads `$ACADVER` and `$DWGCODEPAGE` from the first 64 KB; from AC1021 (2007) on a DXF is UTF-8 and no code page is given.
+
+The module has no DOM and no imports. Run outside the repository (a scratch vitest file): Big5 with the hint, UTF-8 with an emoji, UTF-16LE with its mark, the language table, and a DXF header naming ANSI_950 followed by Big5 text. `tsc` clean. Not run: the Variables and Graph Data pickers with a real Excel file in the window.
+
+Left: the `\M+` multibyte escapes and `%%` codes of DXF text; the native DWG reader, which reads every drawing older than 2007 as windows-1252; `zip.ts` entry names without the UTF-8 flag; OBJ and MTL files; a PSD layer name with no Unicode block.
diff --git a/frontend/src/app.ts b/frontend/src/app.ts
index 472ef13..84f1589 100644
--- a/frontend/src/app.ts
+++ b/frontend/src/app.ts
@@ -18,7 +18,8 @@ import { ensureFace, installShaping, onFontsLoaded, outlineText, systemFonts } f
import { exportPdf, readPdfNative } from './io/pdf';
import { buildPrintPdf, printPdf } from './io/print';
import { PrintDialog } from './ui/print-dialog';
-import { DXF_UNITS, dxfToDoc, exportDxf, parseDxf, type DxfFile, type DxfImportOptions, type DxfUnit } from './io/dxf';
+import { decodeDxf, DXF_UNITS, dxfToDoc, exportDxf, parseDxf, type DxfFile, type DxfImportOptions, type DxfUnit } from './io/dxf';
+import { decodeText } from './io/text-decode';
import { exportDwg } from './io/dwg-write';
import { DwgUnsupportedError, parseDwg } from './io/dwg';
import { exportEps, readEpsNative } from './io/eps';
@@ -442,8 +443,8 @@ export function startApp(): void {
}
async function svgText(f: File): Promise {
- if (/\.svgz$/i.test(f.name) && typeof DecompressionStream !== 'undefined') return new Response(f.stream().pipeThrough(new DecompressionStream('gzip'))).text();
- return f.text();
+ const bytes = new Uint8Array(/\.svgz$/i.test(f.name) && typeof DecompressionStream !== 'undefined' ? await new Response(f.stream().pipeThrough(new DecompressionStream('gzip'))).arrayBuffer() : await f.arrayBuffer());
+ return decodeText(bytes, /^\s*<\?xml[^>]*encoding=["']([\w.:-]+)/.exec(new TextDecoder('latin1').decode(bytes.subarray(0, 200)))?.[1]);
}
async function imageSize(blob: Blob): Promise<{ w: number; h: number }> { const b = await createImageBitmap(blob); const s = { w: b.width, h: b.height }; b.close(); return s; }
@@ -479,7 +480,7 @@ export function startApp(): void {
file = parseDxf(conv.text);
how = ` through ${conv.converter}`;
}
- } else file = parseDxf(await f.text());
+ } else file = parseDxf(decodeDxf(new Uint8Array(await f.arrayBuffer())));
const o = await dxfOptions(file, dxf);
if (!o) return null;
const r = dxfToDoc(file, o, title);
diff --git a/frontend/src/io/dxf.ts b/frontend/src/io/dxf.ts
index 89fade4..2b27eba 100644
--- a/frontend/src/io/dxf.ts
+++ b/frontend/src/io/dxf.ts
@@ -10,6 +10,7 @@ import { instanceArt } from '../engine/symbolism';
import { fill as fillItem, gradientAt, linearGradient, resolvePaint, stop, stroke as strokeItem, toRgb } from '../engine/paint';
import { DEFAULT_CHAR, DEFAULT_PARA, layoutText } from '../engine/text';
import type { Anchor, Color, Doc, LayerNode, Mat, PathData, Pt, Project, Rect, SubPath, TextNode, VNode } from '../engine';
+import { decodeText } from './text-decode';
export type DxfUnit = 'unitless' | 'in' | 'ft' | 'yd' | 'mi' | 'mm' | 'cm' | 'm' | 'km' | 'pt' | 'px';
export const DXF_UNITS: ReadonlyArray = [['mm', 'Millimeters'], ['cm', 'Centimeters'], ['m', 'Meters'], ['km', 'Kilometers'], ['in', 'Inches'], ['ft', 'Feet'], ['yd', 'Yards'], ['mi', 'Miles'], ['pt', 'Points'], ['px', 'Pixels']];
@@ -29,6 +30,14 @@ const g = (e: Ent, code: number, d = ''): string => { for (const [k, v] of e.c)
const gn = (e: Ent, code: number, d = 0): number => { for (const [k, v] of e.c) if (k === code) { const n = parseFloat(v); return Number.isFinite(n) ? n : d; } return d; };
const has = (e: Ent, code: number): boolean => e.c.some(([k]) => k === code);
+const CODE_PAGES: Record = { ANSI_874: 'windows-874', ANSI_932: 'shift_jis', ANSI_936: 'gbk', ANSI_949: 'euc-kr', ANSI_950: 'big5', ANSI_1250: 'windows-1250', ANSI_1251: 'windows-1251', ANSI_1252: 'windows-1252', ANSI_1253: 'windows-1253', ANSI_1254: 'windows-1254', ANSI_1255: 'windows-1255', ANSI_1256: 'windows-1256', ANSI_1257: 'windows-1257', ANSI_1258: 'windows-1258' };
+
+export function decodeDxf(bytes: Uint8Array): string {
+ const head = new TextDecoder('latin1').decode(bytes.subarray(0, 65536));
+ const version = /\$ACADVER\s*\r?\n\s*1\s*\r?\n\s*AC(\d{4})/.exec(head)?.[1], page = /\$DWGCODEPAGE\s*\r?\n\s*3\s*\r?\n\s*(\w+)/.exec(head)?.[1]?.toUpperCase();
+ return decodeText(bytes, version && Number(version) >= 1021 ? null : CODE_PAGES[page ?? ''] ?? null);
+}
+
export function parseDxf(text: string): DxfFile {
if (text.startsWith('AutoCAD Binary DXF')) throw new Error('This is a binary DXF. Save it as an ASCII DXF from your CAD program, then open it.');
const lines = text.split(/\r\n|\r|\n/);
diff --git a/frontend/src/io/text-decode.ts b/frontend/src/io/text-decode.ts
new file mode 100644
index 0000000..7c99132
--- /dev/null
+++ b/frontend/src/io/text-decode.ts
@@ -0,0 +1,25 @@
+const LEGACY: Record = {
+ 'zh-tw': 'big5', 'zh-hk': 'big5', 'zh-mo': 'big5', 'zh-hant': 'big5', zh: 'gb18030', ja: 'shift_jis', ko: 'euc-kr',
+ ru: 'windows-1251', uk: 'windows-1251', bg: 'windows-1251', sr: 'windows-1251', el: 'windows-1253', tr: 'windows-1254', he: 'windows-1255', ar: 'windows-1256', th: 'windows-874', vi: 'windows-1258',
+ pl: 'windows-1250', cs: 'windows-1250', hu: 'windows-1250', sk: 'windows-1250', ro: 'windows-1250', lt: 'windows-1257', lv: 'windows-1257', et: 'windows-1257',
+};
+
+export function localeLabel(lang?: string): string {
+ const l = (lang ?? globalThis.navigator?.language ?? 'en').toLowerCase();
+ return LEGACY[l] ?? LEGACY[l.split('-').slice(0, 2).join('-')] ?? LEGACY[l.split('-')[0]] ?? 'windows-1252';
+}
+
+function decode(bytes: Uint8Array, label: string, fatal: boolean): string | null {
+ try { return new TextDecoder(label, { fatal }).decode(bytes); } catch { return null; }
+}
+
+export function decodeText(bytes: Uint8Array, hint?: string | null): string {
+ if (bytes[0] === 0xef && bytes[1] === 0xbb && bytes[2] === 0xbf) return decode(bytes.subarray(3), 'utf-8', false) ?? '';
+ if (bytes[0] === 0xff && bytes[1] === 0xfe) return decode(bytes.subarray(2), 'utf-16le', false) ?? '';
+ if (bytes[0] === 0xfe && bytes[1] === 0xff) return decode(bytes.subarray(2), 'utf-16be', false) ?? '';
+ return decode(bytes, 'utf-8', true) ?? (hint ? decode(bytes, hint, true) : null) ?? decode(bytes, localeLabel(), true) ?? decode(bytes, 'windows-1252', false) ?? '';
+}
+
+export async function fileText(file: Blob, hint?: string | null): Promise {
+ return decodeText(new Uint8Array(await file.arrayBuffer()), hint);
+}
diff --git a/frontend/src/ui/panels/graph-data.ts b/frontend/src/ui/panels/graph-data.ts
index 629c803..129717a 100644
--- a/frontend/src/ui/panels/graph-data.ts
+++ b/frontend/src/ui/panels/graph-data.ts
@@ -1,5 +1,6 @@
import { cleanData, parseGrid, parseNumber, parseTable } from '../../engine/graph';
import type { Engine, GraphData } from '../../engine';
+import { fileText } from '../../io/text-decode';
import { el, patchList, q, setClass, setDisabled, setHidden, setText, setValue } from '../dom';
import { icon } from '../icons';
@@ -32,7 +33,7 @@ export class GraphDataWindow {
const [imp, trans, swap, revert, apply] = Array.from(this.el.querySelectorAll('.cv-gdw-tools button'));
const file = q(this.el, 'input[type="file"]');
imp.addEventListener('click', () => file.click());
- file.addEventListener('change', () => { const f = file.files?.[0]; file.value = ''; if (f) void f.text().then((t) => { this.draft = this.normal(gridOf(parseTable(t))); this.touch(); }); });
+ file.addEventListener('change', () => { const f = file.files?.[0]; file.value = ''; if (f) void fileText(f).then((t) => { this.draft = this.normal(gridOf(parseTable(t))); this.touch(); }); });
trans.addEventListener('click', () => { const w = Math.max(...this.draft.map((r) => r.length)); this.draft = this.normal(Array.from({ length: w }, (_, c) => this.draft.map((r) => r[c] ?? ''))); this.touch(); });
swap.addEventListener('click', () => { this.draft = this.draft.map((r) => [r[0] ?? '', ...this.swapPairs(r.slice(1))]); this.touch(); });
revert.addEventListener('click', () => { this.load(true); });
diff --git a/frontend/src/ui/panels/variables.ts b/frontend/src/ui/panels/variables.ts
index c038186..7ca7894 100644
--- a/frontend/src/ui/panels/variables.ts
+++ b/frontend/src/ui/panels/variables.ts
@@ -2,6 +2,7 @@ import { findNode } from '../../engine/doc';
import { boundLabel, kindFits, parseDataFile, VARIABLE_KINDS } from '../../engine/variables';
import type { Engine, Variable, VariableKind } from '../../engine';
import { exportDataSets, showDataSet } from '../../io/data-merge';
+import { fileText } from '../../io/text-decode';
import { promptName } from '../dialogs';
import { el, patchList, q, setClass, setDisabled, setText, setTitle, setValue } from '../dom';
import { askForm } from '../form-dialog';
@@ -89,7 +90,7 @@ export class VariablesPanel {
const e = this.engine, d = e.doc;
if (!d) return;
try {
- const r = parseDataFile(d, await f.text(), /\.json$/i.test(f.name) ? 'json' : 'csv');
+ const r = parseDataFile(d, await fileText(f), /\.json$/i.test(f.name) ? 'json' : 'csv');
if (!e.addDataSets(r.variables, r.sets)) { e.notice('That file has no data sets.', 'error'); return; }
const unbound = r.variables.filter((v) => !v.node).length;
e.notice(`Imported ${r.sets.length} data set${r.sets.length === 1 ? '' : 's'}.${unbound ? ` ${unbound} variable${unbound === 1 ? ' is' : 's are'} unbound: pick each and bind it to an object.` : ''}`);
From dbd26f9fbbf2e17ec509cb9e409f85e67f210b2a Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 12:48:16 -0500
Subject: [PATCH 08/74] chore(release): 0.60.0
---
CHANGELOG.md | 29 +++++++++++++++++++++++++++++
README.md | 2 +-
backend/app/__init__.py | 2 +-
frontend/package-lock.json | 4 ++--
frontend/package.json | 2 +-
frontend/src/version.ts | 2 +-
src-tauri/Cargo.lock | 2 +-
src-tauri/Cargo.toml | 2 +-
src-tauri/tauri.conf.json | 2 +-
9 files changed, 38 insertions(+), 9 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e8a7ab7..1bd01c3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,35 @@
Versions follow `v*.*.*` with dots. Dates are UTC.
+## 0.60.0 · 2026-11-26
+
+Typing and reading text that is not English: Chinese, Japanese, Korean and other scripts (issue 17). Run in a Chromium window on Linux with composition events sent by a test driver; no real input method on Windows, macOS or Linux has typed into this build yet.
+
+- Type tool: the words you are composing with an input method (Bopomofo, Cangjie, Pinyin, Japanese, Hangul and others) now show at the caret while you type them, in the text's own size. Before, nothing showed until the words were confirmed.
+- Type tool: the candidate window follows the caret and the size of the text, also after a click, a zoom or a pan.
+- Type tool: the keys an input method is using are left to it. On macOS and Linux the Enter that confirms a word also added a new line, and Backspace, the arrows, Tab and Escape acted on the text as well.
+- Type tool: words still being composed are kept when you click elsewhere or change tool. They were thrown away.
+- Type tool: choosing a font or a style while editing no longer ends the edit, and the next keys go into the text. Opening the font menu ended it, and the keys that followed switched tools or deleted the object.
+- Type tool: Backspace removes a whole emoji (a family, a flag) in one press; a double click selects a word in Chinese, Japanese and accented text; AltGr letters (Polish and others) no longer run Select All or Undo; pasted text that arrives decomposed is joined.
+- Opening a PDF or a PDF-compatible .ai file: characters the file gives no Unicode value for are no longer set as replacement characters (the two question marks in a diamond). The message after opening says that characters were left out, and for which font. Their shapes are not drawn yet.
+- Opening a PDF: type in fonts that use the older Chinese, Japanese and Korean encodings (Big5, GB, Shift-JIS, EUC, KS) and the UTF-16 ones is read. It came in empty or wrong.
+- Opening a PDF: a font named in Chinese, Japanese or Korean is named readably in the message about fonts that are not installed, and layer names in UTF-8 or UTF-16LE are read.
+- Names, prompts and number fields: Enter and Escape are left to an input method that is composing, so confirming a word no longer sends the prompt, commits a half-typed name or closes the dialog. Number fields read full-width digits.
+- The search in the title bar also finds a command by its name in the language shown.
+- A font name cut short in the options bar shows in full when the pointer rests on it.
+- A character past the common range (rarer Chinese characters, emoji) is no longer cut in half by Glyph Touch or in a long object name, which showed as a replacement character.
+- Libraries of swatches, symbols and brushes named in Chinese, Japanese, Korean, Cyrillic, Greek or Thai no longer replace one another when saved.
+- When a font lacks a character, outlines for Traditional Chinese, Hong Kong, Japanese and Korean text use a font of that region first. Type with OpenType features or variable axes no longer shows an empty box for such a character.
+- Exported files keep their names. A file named in Chinese was written as `_.pdf` by the desktop app, and a batch of such files could overwrite one another.
+- A project that holds half of a split character opens again. It saved and then failed to open.
+- The terminal no longer freezes when a program prints bytes that are not UTF-8, and on macOS and Linux a shell started by the app with no language set uses UTF-8.
+- Check Spelling no longer marks Chinese, Japanese, Thai or Cyrillic words as misspelt.
+- Variables and Graph Data read a CSV or TSV that is not UTF-8 (Big5, Shift-JIS, GBK, UTF-16 as Excel writes them); a DXF with a code page and an SVG that declares another encoding are read in it. They came in as replacement characters.
+- Agents on Windows: `./formpath mcp` reads and writes UTF-8, so text in Chinese sent by an outside agent no longer ends the connection or arrives as other characters.
+- A PSD layer named with an emoji or a rarer Chinese character keeps its last character.
+- Not in this release: Arabic and Hebrew still run left to right, Indic scripts are not shaped, and Thai has no word breaking; type whose font is not installed is still left out of a PDF without a message; shortcuts are still matched by key position, so AZERTY and QWERTZ keep that behaviour.
+- The three demos are not rebuilt and still say 0.59.0.
+
## 0.59.1 · 2026-11-26
- Saving a large drawing works. Save stopped with "Part exceeded maximum size of 1024KB." once the drawing itself, without its images, passed 1024 KB of data, which a few thousand objects do. The limit came from the web framework under the engine, not from FormPath, whose own limit for a drawing is 64 MiB and is now the one that applies. Collecting a project into a package had the same stop and is fixed with it.
diff --git a/README.md b/README.md
index 7e1dc20..1f07932 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@
-
+
diff --git a/backend/app/__init__.py b/backend/app/__init__.py
index ccbded1..5684ec7 100644
--- a/backend/app/__init__.py
+++ b/backend/app/__init__.py
@@ -1 +1 @@
-__version__ = "0.59.1"
+__version__ = "0.60.0"
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index 7c3d14b..b89452f 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "formpath",
- "version": "0.59.1",
+ "version": "0.60.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "formpath",
- "version": "0.59.1",
+ "version": "0.60.0",
"license": "Apache-2.0",
"dependencies": {
"@fontsource/inter": "5.3.0",
diff --git a/frontend/package.json b/frontend/package.json
index d36672d..d0f0973 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -1,7 +1,7 @@
{
"name": "formpath",
"private": true,
- "version": "0.59.1",
+ "version": "0.60.0",
"description": "formpath · vector illustration editor in the NodeMode style",
"license": "Apache-2.0",
"type": "module",
diff --git a/frontend/src/version.ts b/frontend/src/version.ts
index 40cfc17..69005f7 100644
--- a/frontend/src/version.ts
+++ b/frontend/src/version.ts
@@ -1 +1 @@
-export const VERSION = '0.59.1';
+export const VERSION = '0.60.0';
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index 6ffab60..204d984 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -893,7 +893,7 @@ dependencies = [
[[package]]
name = "formpath"
-version = "0.59.1"
+version = "0.60.0"
dependencies = [
"objc2",
"objc2-app-kit",
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index 3491562..46a5cdc 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "formpath"
-version = "0.59.1"
+version = "0.60.0"
description = "formpath desktop shell"
authors = ["nodemode-ai"]
license = "Apache-2.0"
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 497bc06..3345134 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "FormPath",
- "version": "0.59.1",
+ "version": "0.60.0",
"identifier": "ai.nodemode.formpath",
"build": {
"frontendDist": "../frontend/dist"
From a6adac71adbe3efe2624103e46f8426876cb9f5f Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:45:10 -0500
Subject: [PATCH 09/74] fix(pdf): type a PDF gives no characters for is kept as
shapes, drawn from the font inside the file
---
backend/HASHOUT_LOG.md | 19 ++++
backend/app/main.py | 3 +-
backend/app/routers/outlines.py | 27 ++++++
backend/app/services/outlines.py | 151 +++++++++++++++++++++++++++++++
frontend/HASHOUT_LOG.md | 28 ++++++
frontend/src/app.ts | 2 +-
frontend/src/io/api.ts | 8 ++
frontend/src/io/pdf-read.ts | 103 ++++++++++++++++-----
8 files changed, 315 insertions(+), 26 deletions(-)
create mode 100644 backend/app/routers/outlines.py
create mode 100644 backend/app/services/outlines.py
diff --git a/backend/HASHOUT_LOG.md b/backend/HASHOUT_LOG.md
index 81505c0..aea66fb 100644
--- a/backend/HASHOUT_LOG.md
+++ b/backend/HASHOUT_LOG.md
@@ -24,6 +24,7 @@ backend/
│ ├── system.py health, version, capabilities
│ ├── projects.py .fpth library: list, save with conflict copies, package, import, folder
│ ├── fonts.py installed fonts: list, find, file
+ │ ├── outlines.py glyph outlines of a font program the window sends (a PDF's embedded font)
│ ├── io.py writes exports for the window
│ ├── mcp.py MCP endpoint, the TOOLS catalogue, the window bridge
│ ├── batch.py action library, folder listing, file read and write for batch and data merge
@@ -34,6 +35,7 @@ backend/
├── project_format.py .fpth package validation and writing
├── sessions.py temporary opened-project sessions, pruned at start
├── fonts.py system font folders scan and lookup
+ ├── outlines.py reads a TrueType, OpenType or bare CFF program and draws its glyphs as cubic paths
├── llm.py Ollama and OpenAI-compatible clients
├── secrets.py API keys in the system keyring
└── outbound.py outbound URL checks and errors for NodeMode
@@ -53,6 +55,8 @@ Scripts with entries, in folder order. Every other script is in the map above wi
- app/routers/projects.py
- app/routers/fonts.py
- app/services/fonts.py
+- app/routers/outlines.py
+- app/services/outlines.py
- app/main.py
- formpath and setup (the launchers)
@@ -940,3 +944,18 @@ Issue 17 asks for text input and non-English fonts to work across the product. T
- The stdio bridge (`./formpath mcp`, the Claude Desktop bundle) read standard input in the ANSI code page on Windows. MCP is UTF-8, so text with Chinese in it ended the bridge with a decode error or reached the engine as other characters. `main` reconfigures both streams to UTF-8 and writes plain newlines. `cli.py` does the same for its output, with `backslashreplace`, so a label with a character the console cannot show no longer raises when the output is piped. The decode failure was reproduced by the audit with the stream forced to cp950; the fix was not run on Windows.
Looked at and left: text files read and written with no encoding (`core/config.py` library.json, `routers/projects.py`, `services/llm.py`) hold ASCII JSON, so the code page does not reach them; the package summary header is cut at 4000 characters and can end mid-escape when many missing links have long Chinese paths; `services/dwg.py` decodes LibreDWG's DXF as UTF-8 with replacement, which loses text in a drawing older than 2007; a chat message with a line break is cut when Claude Code is a `.cmd` shim on Windows; `formpath.bat` splits `key=value` arguments at the `=`.
+
+### app/services/outlines.py, app/routers/outlines.py, app/main.py · the glyph outlines of a font program the window sends (issue 17)
+- refers-to: app/services/outlines.py :: Program, _Pen, load, glyphs, MAX_BYTES, MAX_IDS, WHOLE, KEPT; app/routers/outlines.py :: font_outlines; app/main.py :: the router list
+- kind: decision
+- logged: v0.61.0 · 2026-11-26
+
+The PDF reader in the window meets type whose characters the file does not name (see the frontend log, "type a PDF gives no characters for is kept as shapes"). The file still carries the font program, so the letters can be drawn; reading a font program is fontTools' work, which the engine already ships for subsetting, so the window sends the program here and gets outlines back. Nothing new is installed.
+
+`POST /api/fonts/outlines` takes `ids` (a JSON list), `kind` (`gid`: the ids are glyph indices, for a TrueType program; `cid`: character ids, for a CFF one) and either `file` (the program, at most 64 MiB) or `key` (what an earlier call answered). It answers `{key, upm, whole, glyphs}`: each glyph is a flat list of `"M", x, y`, `"L", x, y`, `"C", x1, y1, x2, y2, x, y` and `"Z"` in font units, y up, quadratic curves already made cubic by the pen. When the program has at most 2500 glyphs every one is sent and `whole` is true, so a subset font costs one request for a whole document; a larger one answers only the ids asked for, at most 4000 a call. An id the program does not hold is left out.
+
+`Program` reads an sfnt (TrueType, OpenType, the first face of a collection) through `TTFont`, or a bare CFF table (what a PDF's `FontFile3` of subtype `CIDFontType0C` or `Type1C` holds) through `CFFFontSet`. A PDF's TrueType subset often has no `post` or `cmap` table; glyph names then come from `maxp` alone. In a CID-keyed CFF the charset names are `cidNNNNN` and a `cid` id is looked up by that number; in a name-keyed one the id is the glyph index. A glyph that fails to draw is left out, never an error for the whole call.
+
+Parsed programs are kept by the first 32 hex digits of their SHA-256, the last six used, behind one lock (fontTools objects are not safe to share between threads, and the route runs in the thread pool). An unknown key answers 409 and the window sends the program again. The route sits behind the same window key and local guard as every other route and reads no file of this computer, only the bytes it is sent.
+
+Run against the programs embedded in nine public PDFs of the pdf.js test corpus (TrueType in Arial Unicode MS, AokinMincho, four Arabic faces, two test faces; CFF CID in Neo Sans Intel and Reitam) and a 141 KB CFF CID subset of Noto Sans CJK TC: every one loads and draws. `pytest` 196 pass. Not read: a Type 1 program (`FontFile`), which a simple font carries; the window does not ask for those.
diff --git a/backend/app/main.py b/backend/app/main.py
index aae22d7..25af7f5 100644
--- a/backend/app/main.py
+++ b/backend/app/main.py
@@ -12,7 +12,7 @@
from app.core.window_key import WindowKeyGuard
import asyncio
-from app.routers import batch, claude_code, color, commands, fonts, io, llm, mcp, nodemode, plugins, projects, spell, system, terminal
+from app.routers import batch, claude_code, color, commands, fonts, io, llm, mcp, nodemode, outlines, plugins, projects, spell, system, terminal
from app.services import claude_code as claude_service, sessions
from app.services import terminal as terminals
@@ -42,6 +42,7 @@ def render(self, content) -> bytes:
app.include_router(system.router, prefix="/api")
app.include_router(projects.router, prefix="/api/projects")
app.include_router(fonts.router)
+app.include_router(outlines.router)
app.include_router(io.router)
app.include_router(llm.router)
app.include_router(mcp.router)
diff --git a/backend/app/routers/outlines.py b/backend/app/routers/outlines.py
new file mode 100644
index 0000000..16142e7
--- /dev/null
+++ b/backend/app/routers/outlines.py
@@ -0,0 +1,27 @@
+import json
+
+from fastapi import APIRouter, File, Form, HTTPException, UploadFile
+
+from app.services import outlines
+
+router = APIRouter(prefix="/api/fonts", tags=["fonts"])
+
+
+@router.post("/outlines")
+def font_outlines(ids: str = Form(...), kind: str = Form("gid"), key: str = Form(""), file: UploadFile | None = File(None)) -> dict:
+ try:
+ wanted = [int(i) for i in json.loads(ids)]
+ except (ValueError, TypeError):
+ raise HTTPException(status_code=422, detail="ids must be a JSON list of glyph or character ids.")
+ if kind not in ("gid", "cid"):
+ raise HTTPException(status_code=422, detail="kind is gid or cid.")
+ if file is not None:
+ data = file.file.read(outlines.MAX_BYTES + 1)
+ try:
+ key = outlines.load(data)
+ except outlines.OutlineError as exc:
+ raise HTTPException(status_code=422, detail=str(exc))
+ found = outlines.glyphs(key, kind, wanted) if key else None
+ if found is None:
+ raise HTTPException(status_code=409, detail="Send the font program again; the engine no longer holds it.")
+ return found
diff --git a/backend/app/services/outlines.py b/backend/app/services/outlines.py
new file mode 100644
index 0000000..1b0da32
--- /dev/null
+++ b/backend/app/services/outlines.py
@@ -0,0 +1,151 @@
+import hashlib
+import io
+import threading
+from collections import OrderedDict
+
+from fontTools.cffLib import CFFFontSet
+from fontTools.pens.basePen import BasePen
+from fontTools.ttLib import TTFont
+
+MAX_BYTES = 64 * 1024 * 1024
+MAX_IDS = 4000
+WHOLE = 2500
+KEPT = 6
+
+_lock = threading.Lock()
+_programs: "OrderedDict[str, Program]" = OrderedDict()
+
+
+class OutlineError(Exception):
+ pass
+
+
+def _n(v: float) -> float | int:
+ r = round(v, 2)
+ return int(r) if r == int(r) else r
+
+
+class _Pen(BasePen):
+ def __init__(self, glyphs) -> None:
+ super().__init__(glyphs)
+ self.out: list = []
+ self.open = False
+
+ def _moveTo(self, p) -> None:
+ self._endPath()
+ self.out += ["M", _n(p[0]), _n(p[1])]
+ self.open = True
+
+ def _lineTo(self, p) -> None:
+ self.out += ["L", _n(p[0]), _n(p[1])]
+
+ def _curveToOne(self, a, b, c) -> None:
+ self.out += ["C", _n(a[0]), _n(a[1]), _n(b[0]), _n(b[1]), _n(c[0]), _n(c[1])]
+
+ def _closePath(self) -> None:
+ self._endPath()
+
+ def _endPath(self) -> None:
+ if self.open:
+ self.out.append("Z")
+ self.open = False
+
+
+class Program:
+ def __init__(self, data: bytes) -> None:
+ self.upm = 1000
+ self.cids: dict[int, str] | None = None
+ head = data[:4]
+ if head in (b"\x00\x01\x00\x00", b"true", b"OTTO", b"ttcf"):
+ font = TTFont(io.BytesIO(data), fontNumber=0, lazy=True)
+ self.font = font
+ if "head" in font:
+ self.upm = font["head"].unitsPerEm or 1000
+ if "glyf" in font:
+ try:
+ self.order = font.getGlyphOrder()
+ except Exception:
+ count = int(font["maxp"].numGlyphs)
+ self.order = [".notdef"] + ["glyph%.5d" % i for i in range(1, count)]
+ font.setGlyphOrder(self.order)
+ self.glyphs = font.getGlyphSet()
+ elif "CFF " in font:
+ self._cff(font["CFF "].cff)
+ else:
+ raise OutlineError("This font program has no outlines the engine can read.")
+ elif data[:1] == b"\x01":
+ cff = CFFFontSet()
+ cff.decompile(io.BytesIO(data), None)
+ self._cff(cff)
+ else:
+ raise OutlineError("This font program is not TrueType, OpenType or CFF.")
+
+ def _cff(self, cff) -> None:
+ top = cff[0]
+ self.glyphs = top.CharStrings
+ self.order = list(top.charset)
+ matrix = getattr(top, "FontMatrix", None)
+ if matrix and matrix[0]:
+ self.upm = round(1 / matrix[0]) or 1000
+ if hasattr(top, "ROS"):
+ self.cids = {0: self.order[0]} if self.order else {}
+ for name in self.order:
+ if name.startswith("cid") and name[3:].isdigit():
+ self.cids[int(name[3:])] = name
+
+ def name(self, kind: str, index: int) -> str | None:
+ if kind == "cid" and self.cids is not None:
+ return self.cids.get(index)
+ return self.order[index] if 0 <= index < len(self.order) else None
+
+ def ids(self, kind: str) -> list[int]:
+ return sorted(self.cids) if kind == "cid" and self.cids is not None else list(range(len(self.order)))
+
+ def draw(self, kind: str, index: int) -> list | None:
+ name = self.name(kind, index)
+ if name is None:
+ return None
+ pen = _Pen(self.glyphs)
+ try:
+ self.glyphs[name].draw(pen)
+ except Exception:
+ return None
+ pen._endPath()
+ return pen.out
+
+
+def load(data: bytes) -> str:
+ if len(data) > MAX_BYTES:
+ raise OutlineError("The font program is larger than 64 MiB.")
+ key = hashlib.sha256(data).hexdigest()[:32]
+ with _lock:
+ if key in _programs:
+ _programs.move_to_end(key)
+ return key
+ try:
+ program = Program(data)
+ except OutlineError:
+ raise
+ except Exception as exc:
+ raise OutlineError(f"The font program could not be read ({type(exc).__name__}).") from exc
+ with _lock:
+ _programs[key] = program
+ while len(_programs) > KEPT:
+ _programs.popitem(last=False)
+ return key
+
+
+def glyphs(key: str, kind: str, wanted: list[int]) -> dict | None:
+ with _lock:
+ program = _programs.get(key)
+ if program is None:
+ return None
+ _programs.move_to_end(key)
+ every = program.ids(kind)
+ whole = len(every) <= WHOLE
+ out = {}
+ for index in every if whole else wanted[:MAX_IDS]:
+ drawn = program.draw(kind, index)
+ if drawn is not None:
+ out[str(index)] = drawn
+ return {"key": key, "upm": program.upm, "whole": whole, "glyphs": out}
diff --git a/frontend/HASHOUT_LOG.md b/frontend/HASHOUT_LOG.md
index 9906e69..0903e9d 100644
--- a/frontend/HASHOUT_LOG.md
+++ b/frontend/HASHOUT_LOG.md
@@ -5050,3 +5050,31 @@ Found and not changed here: type whose font is not installed is left out of a PD
The module has no DOM and no imports. Run outside the repository (a scratch vitest file): Big5 with the hint, UTF-8 with an emoji, UTF-16LE with its mark, the language table, and a DXF header naming ANSI_950 followed by Big5 text. `tsc` clean. Not run: the Variables and Graph Data pickers with a real Excel file in the window.
Left: the `\M+` multibyte escapes and `%%` codes of DXF text; the native DWG reader, which reads every drawing older than 2007 as windows-1252; `zip.ts` entry names without the UTF-8 flag; OBJ and MTL files; a PSD layer name with no Unicode block.
+
+### src/io/pdf-read.ts, src/io/api.ts, src/app.ts · type a PDF gives no characters for is kept as shapes, drawn from the font inside the file (issue 17)
+- refers-to: src/io/pdf-read.ts :: FontProgram, FontInfo (shown, vertical, dw2, program, high), SEVEN_BIT_CMAPS, BROKEN, Painter.show, Painter.shapes, Painter.font, outlineOf, parseCMap (put), FontNames.resolve (shown), FontNames.outlined, PdfImport.outlined; src/io/api.ts :: api.fontOutlines, FontOutlines; src/app.ts :: the sentence after a PDF is opened
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+0.60.0 stopped replacement characters from being stored and left such type out with a sentence. For the issue's picture that meant the two-character label would vanish. The owner asked for the real fix and for it to be tried on real files.
+
+What happens now. In `show`, a run is "lost" when any of its codes has no character: a two-byte code with no mapping, or a code the ToUnicode table maps to nothing usable. If the font is a composite one with `/Encoding` Identity-H or Identity-V and its descriptor carries a program (`FontFile2`, or `FontFile3`), `shapes` draws the whole run as one filled path instead of a text object: each code is the character id, mapped through `/CIDToGIDMap` when that is a stream, the outlines come from the engine (`api.fontOutlines`, see the backend log), and each glyph is placed by the same text matrix, size, horizontal scaling, rise, character spacing and `/W` widths the PDF asks for, so the shapes sit exactly where the type did. Fill and stroke follow the text rendering mode. The whole run becomes shapes, not only the unnamed characters, so its letters stay on one baseline in one object. When the engine cannot be reached or cannot read the program, the old behaviour stands: what can be read is kept as type and the sentence says characters were left out. The sentence after opening gains "Type the file gives no characters for was kept as shapes: [fonts]."
+
+Why only Identity. Under Identity the code is the character id, which is what the font program is keyed by. Under any other CMap (a predefined one, or a CMap stream in the file) the code must first be mapped to a character id by that CMap, which this reader does not do; drawing with the code would draw the wrong letters, so those runs are still left out and named.
+
+Three corrections to 0.60.0 found while trying real files:
+- `parseCMap` dropped a mapping to U+FFFD. For a simple (one-byte) font that made `show` fall through to guessing the character from the code, which gives a wrong Latin letter. A broken mapping is now stored as an empty string, `show` treats it as "named as nothing" and guesses nothing, and the Differences glyph name is still tried first.
+- U+FFFE and U+FFFF count as broken too: one public file (Arial Unicode MS written by OpenOffice) maps every glyph to ``, and 0.60.0 showed four of them in the Layers panel.
+- The left-out sentence named the substitute family ("Helvetica"); it names the file's own font (`shown`).
+
+Vertical writing. A font whose CMap name ends in `-V` (or whose CMap stream says `WMode 1`) advances down the page: `show` now moves by the vertical displacement (`/DW2`, default 880 and -1000; `/W2` is not read) and returns a vertical move, and `shapes` shifts each glyph by the position vector. Readable vertical type is still set as horizontal text objects, one per show, but each now starts where the PDF puts it.
+
+The 7-bit CMaps (`H`, `V`, `Ext-H`, `Add-H`, `GB-H`, `KSC-H`) are read by setting the high bit of each byte and decoding as EUC-JP, GBK or EUC-KR (`high`).
+
+Tried on real files, in the built window, against 0.59.1 and 0.60.0 built side by side:
+- A CFF CID subset of Noto Sans CJK TC (141 KB, the reporter's font) as Type0, Identity-H, `CIDFontType0C`, with the two characters of a white label on a blue box mapped to ``: 0.59.1 gives one text object reading two replacement characters (the issue's picture; `pdftotext` gives the same two); 0.60.0 leaves the label out; now the label is a path and the page matches the reference render. The same with a PDF written by the fpdf2 library from WenQuanYi Zen Hei (Type0, `CIDFontType2`, a `/CIDToGIDMap` stream).
+- Public files from the pdf.js test corpus (Apache-2.0): `arial_unicode_en_cidfont.pdf` (OpenOffice, no ToUnicode) opened blank in 0.60.0 and now reads "This is an Arial Unicode PDF from OpenOffice." as shapes; `arial_unicode_ab_cidfont.pdf` (the `` one) the same; `vertical.pdf` (AokinMincho, Identity-V, no ToUnicode) opened blank and now shows its two vertical columns of Japanese; `noembed-jis7.pdf` now reads its kana through `H`; `90ms_rksj_h_sample.pdf`, `noembed-sjis.pdf`, `noembed-eucjp.pdf` and `perf_text_cjk_nonembedded.pdf` read their Japanese and Chinese through the 0.60.0 byte CMaps.
+- Fifteen PDFs (Latin, Type 3, Arabic, CFF CID with a good ToUnicode, the LibreOffice and fpdf2 originals) give the same objects and the same sentence in 0.60.0 and now, apart from the font name in the left-out sentence.
+`npm test` 61 pass.
+
+Still left out, by name: type in a composite font with no program in the file and no usable CMap (`noembed-identity.pdf`: Ryumin, Identity-H, Japan1, nothing embedded; reading it needs Adobe's character collection tables); type under a CMap stream in the file (`perf_text_cmap_mixed.pdf`). Not done: the same for a simple font, whose program is Type 1, TrueType or name-keyed CFF and whose glyph is chosen by an encoding (LibreOffice writes CJK that way; such a file with broken ToUnicode entries is left out with the sentence); `/W2`; `/ActualText`.
diff --git a/frontend/src/app.ts b/frontend/src/app.ts
index 84f1589..40ba960 100644
--- a/frontend/src/app.ts
+++ b/frontend/src/app.ts
@@ -568,7 +568,7 @@ export function startApp(): void {
adopt(tagged.doc, title, r.assets);
if (tagged.name) toast(`The PDF colours use the CMYK profile ${tagged.name}; it is now this document's CMYK working space.`);
const subs =r.fonts.slice(0, 4).map(([from, to]) => `${from} as ${to}`).join(', ') + (r.fonts.length > 4 ? ` and ${r.fonts.length - 4} more` : '');
- toast(`Opened ${f.name}: ${r.pages === 1 ? 'one page as an artboard' : `${r.pages} pages as artboards`}.${r.fonts.length ? ` Fonts not installed, set in their nearest match: ${subs}.` : ''}${r.skipped.length ? ` Left out: ${r.skipped.join(', ')}.` : ''}`);
+ toast(`Opened ${f.name}: ${r.pages === 1 ? 'one page as an artboard' : `${r.pages} pages as artboards`}.${r.fonts.length ? ` Fonts not installed, set in their nearest match: ${subs}.` : ''}${r.outlined.length ? ` Type the file gives no characters for was kept as shapes: ${r.outlined.join(', ')}.` : ''}${r.skipped.length ? ` Left out: ${r.skipped.join(', ')}.` : ''}`);
} else if (f.type.startsWith('image/') || /\.(png|jpe?g|webp|gif|bmp)$/i.test(lower)) {
const s = await imageSize(f);
const p = engine.newDocument(s.w, s.h, { title: f.name.replace(/\.[^.]+$/, ''), units: 'px' });
diff --git a/frontend/src/io/api.ts b/frontend/src/io/api.ts
index 02aae22..a28c45b 100644
--- a/frontend/src/io/api.ts
+++ b/frontend/src/io/api.ts
@@ -9,6 +9,7 @@ export interface FontInfo { id: string; family: string; style: string; full: str
export interface ColorProfileInfo { id: string; name: string; space: string; class: string; size: number; source: 'builtin' | 'user' | 'system' }
export interface SpellHit { word: string; suggestions: string[] }
export interface SimilarFont { id: string; family: string; style: string; score: number }
+export interface FontOutlines { key: string; upm: number; whole: boolean; glyphs: Record> }
export interface LlmStatus { configured: boolean; baseUrl: string; model: string; hasKey: boolean; store: 'system' | 'file'; vision?: boolean }
export interface BridgeItem { id: string; name: string; arguments: Record; inapp?: boolean; once?: boolean }
const BRIDGE_HEADER = 'X-Formpath-Bridge';
@@ -116,6 +117,13 @@ export const api = {
return { data: new Uint8Array(await res.arrayBuffer()), cff: res.headers.get('X-Font-Outlines') === 'cff' };
} catch { return null; }
},
+ async fontOutlines(src: { key: string } | { bytes: Uint8Array }, kind: 'gid' | 'cid', ids: number[]): Promise {
+ const body = new FormData();
+ body.append('ids', JSON.stringify(ids));
+ body.append('kind', kind);
+ if ('key' in src) body.append('key', src.key); else body.append('file', new Blob([src.bytes as BlobPart]), 'font.bin');
+ try { return await json(await request('/fonts/outlines', { method: 'POST', body })); } catch (e) { return e instanceof ApiError && e.status === 409 ? 'gone' : null; }
+ },
async dwgToDxf(file: Blob): Promise<{ text: string; converter: string }> {
const body = new FormData();
diff --git a/frontend/src/io/pdf-read.ts b/frontend/src/io/pdf-read.ts
index 7a1c013..7915829 100644
--- a/frontend/src/io/pdf-read.ts
+++ b/frontend/src/io/pdf-read.ts
@@ -1,10 +1,10 @@
import { makeLayer, newDoc, newId } from '../engine/doc';
-import { apply, IDENTITY, mul } from '../engine/geometry';
+import { apply, IDENTITY, mul, transformPath } from '../engine/geometry';
import { cmyk, fill, gray, rgb, solid, stroke as strokeItem, NONE, stop } from '../engine/paint';
import { cssFont, DEFAULT_CHAR, DEFAULT_PARA, layoutText } from '../engine/text';
import type { Anchor, BlendMode, Cap, CharStyle, Color, Doc, Gradient, GroupNode, ImageAsset, ImageNode, Join, LayerNode, Mat, MeshNode, Paint, PathData, PathNode, PatternDef, Pt, Span, SubPath, TextNode, VNode } from '../engine';
import { families, systemFonts } from './fonts';
-import type { FontInfo as InstalledFont } from './api';
+import { api, type FontInfo as InstalledFont } from './api';
import { openCrypt, type CryptMethod, type CryptParams, type PdfCrypt } from './pdf-crypt';
import { gridMesh, latticeMesh, patchTriangles, rasterTriangles, readLattice, readPatches, readTriangles, type MeshSpec, type Patch, type RV } from './pdf-mesh';
@@ -298,9 +298,11 @@ class PdfFile {
const strict = (b: Uint8Array, label: string): string | null => { try { return new TextDecoder(label, { fatal: true }).decode(b); } catch { return null; } };
const BYTE_CMAPS: Array<[RegExp, string]> = [[/^(B5pc|ETen-B5|ETenms-B5|HKscs-B5|HKdl[ab]-B5|HKgccs-B5|HKm\d+-B5)-/, 'big5'], [/^(GBK-EUC|GBKp-EUC|GBK2K|GB-EUC|GBpc-EUC)-/, 'gb18030'], [/^(90msp?-RKSJ|90pv-RKSJ|83pv-RKSJ|Add-RKSJ|Ext-RKSJ)-/, 'shift_jis'], [/^EUC-/, 'euc-jp'], [/^(KSCms-UHC|KSC-EUC|KSCpc-EUC)-/, 'euc-kr']];
+const SEVEN_BIT_CMAPS: Array<[RegExp, string]> = [[/^(Ext-|Add-)?[HV]$/, 'euc-jp'], [/^GB-[HV]$/, 'gbk'], [/^KSC-[HV]$/, 'euc-kr']];
const ORDERINGS: Record = { CNS1: 'big5', GB1: 'gbk', Japan1: 'shift_jis', Korea1: 'euc-kr' };
-const BROKEN = /�|[\ud800-\udbff](?![\udc00-\udfff])|(?:^|[^\ud800-\udbff])[\udc00-\udfff]/;
-interface FontInfo { family: string; style: string; widths: Map; dw: number; two: boolean; direct: boolean; bytes: string; uni: Map | null; enc: Map | null; type3: { matrix: Mat; procs: PDict; res: PDict | null; names: Map } | null }
+const BROKEN = /[�-]|[\ud800-\udbff](?![\udc00-\udfff])|(?:^|[^\ud800-\udbff])[\udc00-\udfff]/;
+interface FontProgram { data: Stream; kind: 'gid' | 'cid'; map: Val | undefined; table: Uint8Array | null; key: string; whole: boolean; dead: boolean; upm: number; glyphs: Map }
+interface FontInfo { family: string; style: string; shown: string; vertical: boolean; dw2: [number, number]; program: FontProgram | null; widths: Map; dw: number; two: boolean; direct: boolean; bytes: string; high: boolean; uni: Map | null; enc: Map | null; type3: { matrix: Mat; procs: PDict; res: PDict | null; names: Map } | null }
interface GS {
ctm: Mat; fill: Paint; stroke: Paint; fa: number; sa: number; lw: number; cap: Cap; join: Join; miter: number; dash: number[]; phase: number; blend: BlendMode;
fcs: Val[]; scs: Val[]; target: VNode[]; sm: { g: GroupNode; outer: VNode[] } | null; font: FontInfo | null; size: number; tc: number; tw: number; th: number; tl: number; rise: number; tr: number;
@@ -344,15 +346,16 @@ class FontNames {
private readonly known = new Map();
private readonly postscript = new Map();
readonly substituted = new Map();
+ readonly outlined = new Set();
constructor(list: string[], installed: InstalledFont[]) {
for (const f of list) if (!this.known.has(squash(f))) this.known.set(squash(f), f);
for (const f of installed) if (f.postscript) this.postscript.set(squash(f.postscript), { family: f.family, style: f.style });
}
- resolve(name: string, charset?: string): { family: string; style: string } {
+ resolve(name: string, charset?: string): { family: string; style: string; shown: string } {
const bytes = /[\x80-\xff]/.test(name) ? Uint8Array.from(name, (c) => c.charCodeAt(0) & 255) : null, base = (bytes && (strict(bytes, 'utf-8') ?? (charset ? strict(bytes, charset) : null))) || name;
const raw = base.replace(/^[A-Z]{6}\+/, ''), exact = this.postscript.get(squash(raw));
- if (exact) return exact;
+ if (exact) return { ...exact, shown: exact.family };
const [famPart, stylePart = ''] = raw.split(/[-,]/);
const s = `${stylePart} ${famPart}`;
const weight = /Black|Heavy/i.test(s) ? 'Black' : /Semi ?bold|Demi/i.test(s) ? 'Semibold' : /Bold/i.test(s) ? 'Bold' : /Medium/i.test(s) ? 'Medium' : /Light/i.test(s) ? 'Light' : '';
@@ -360,14 +363,14 @@ class FontNames {
const core = famPart.replace(/(PSMT|PS|MT)$/, '').replace(/(Bold|Italic|Oblique|Black|Light|Medium|Semibold|Regular)+$/i, '') || 'Helvetica';
const key = squash(core), alias = FONT_ALIAS[key];
const found = this.known.get(alias ? squash(alias) : key) ?? this.known.get(key.replace(/^lm/, 'latinmodern').replace(/\d+$/, '')) ?? this.known.get(key.replace(/\d+$/, ''));
- if (found) return { family: found, style };
- const fallback = MONO_FONT.test(core) ? 'Courier New' : SERIF_FONT.test(core) ? 'Times New Roman' : 'Helvetica';
- this.substituted.set(core.replace(/([a-z])([A-Z][a-z])/g, '$1 $2').replace(/([A-Z])([A-Z][a-z])/g, '$1 $2').replace(/([A-Za-z])(\d)/, '$1 $2'), fallback);
- return { family: fallback, style };
+ if (found) return { family: found, style, shown: found };
+ const fallback = MONO_FONT.test(core) ? 'Courier New' : SERIF_FONT.test(core) ? 'Times New Roman' : 'Helvetica', shown = core.replace(/([a-z])([A-Z][a-z])/g, '$1 $2').replace(/([A-Z])([A-Z][a-z])/g, '$1 $2').replace(/([A-Za-z])(\d)/, '$1 $2');
+ this.substituted.set(shown, fallback);
+ return { family: fallback, style, shown };
}
}
-export interface PdfImport { doc: Doc; assets: Map; pages: number; skipped: string[]; fonts: Array<[string, string]> }
+export interface PdfImport { doc: Doc; assets: Map; pages: number; skipped: string[]; fonts: Array<[string, string]>; outlined: string[] }
export type PdfBox = 'media' | 'crop' | 'bleed' | 'trim' | 'art';
export class PdfSession { pdf: PdfFile | null = null; }
@@ -499,7 +502,7 @@ export async function readPdfVector(data: ArrayBuffer, title: string, password?:
doc.layers = ordered.length ? ordered : [layer];
doc.images = images;
doc.patterns = patterns;
- return { doc, assets, pages: pages.length, skipped: [...skipped], fonts: [...names.substituted] };
+ return { doc, assets, pages: pages.length, skipped: [...skipped], fonts: [...names.substituted], outlined: [...names.outlined] };
}
function prune(list: VNode[]): VNode[] {
@@ -786,25 +789,25 @@ class Painter {
const start = tm, glyphs: Array<{ code: number; at: number }> = [], gaps = new Map();
const css = !t3 && !f.two && !f.widths.size ? cssFont({ ...DEFAULT_CHAR, font: f.family, style: f.style }, 100) : '';
for (const it of items) {
- if (typeof it === 'number') { adv += (-it / 1000) * size * gs.th; if (-it / 1000 > 0.18 && text && !text.endsWith(' ')) { gaps.set(text.length, -it / 1000); text += ' '; } continue; }
+ if (typeof it === 'number') { adv += (-it / 1000) * size * (f.vertical ? 1 : gs.th); if (-it / 1000 > 0.18 && text && !text.endsWith(' ')) { gaps.set(text.length, -it / 1000); text += ' '; } continue; }
if (!(it instanceof Str)) continue;
- const b = it.b, whole = f.bytes ? strict(b, f.bytes) : null;
+ const b = it.b, whole = f.bytes ? strict(f.high ? b.map((x) => x | 0x80) : b, f.bytes) : null;
if (whole !== null && !BROKEN.test(whole)) {
for (const ch of whole) { const cp = ch.codePointAt(0) as number; text += ch; adv += ((cp < 0x100 || (cp >= 0xff61 && cp <= 0xff9f) ? 0.5 : 1) * size + gs.tc + (cp === 32 ? gs.tw : 0)) * gs.th; if (ch.trim()) ink = adv; }
continue;
}
for (let i = 0; i < b.length; i += f.two ? 2 : 1) {
const code = f.two ? (b[i] << 8) | (b[i + 1] ?? 0) : b[i];
- const ch = f.uni?.get(code) ?? f.enc?.get(code) ?? (f.two ? (f.direct ? String.fromCharCode(code) : '') : code >= 32 && code < 127 ? String.fromCharCode(code) : WIN[code] ?? (code >= 160 ? String.fromCharCode(code) : ''));
- if (!ch && f.two) lost++;
+ const named = f.uni?.get(code), ch = named || f.enc?.get(code) || (named === '' ? '' : f.two ? (f.direct ? String.fromCharCode(code) : '') : code >= 32 && code < 127 ? String.fromCharCode(code) : WIN[code] ?? (code >= 160 ? String.fromCharCode(code) : ''));
+ if (!ch && (f.two || named === '')) lost++;
text += ch;
- if (t3) glyphs.push({ code, at: adv });
+ if (t3 || f.program) glyphs.push({ code, at: adv });
const w = t3 ? (f.widths.get(code) ?? 0) * t3.matrix[0] : css ? emOf(css, ch || ' ') : (f.widths.get(code) ?? f.dw) / 1000;
- adv += (w * size + gs.tc + (code === 32 && !f.two ? gs.tw : 0)) * gs.th;
+ adv += f.vertical ? (f.dw2[1] / 1000) * size + gs.tc : (w * size + gs.tc + (code === 32 && !f.two ? gs.tw : 0)) * gs.th;
if (ch.trim()) ink = adv;
}
}
- const next = mul(tm, [1, 0, 0, 1, adv, 0]);
+ const next = mul(tm, f.vertical ? [1, 0, 0, 1, 0, adv] : [1, 0, 0, 1, adv, 0]);
if (gs.tr === 3 || gs.tr === 7) return next;
if (t3) {
for (const g of glyphs) {
@@ -815,7 +818,8 @@ class Painter {
}
return next;
}
- if (lost) this.skipped.add(`characters of type in ${f.family} that the file gives no Unicode value for`);
+ if (lost && (await this.shapes(f, glyphs, gs, start, size))) return next;
+ if (lost) this.skipped.add(`characters of type in ${f.shown} that the file gives no Unicode value for`);
if (!text.trim()) return next;
const xf = mul(gs.ctm, mul(start, [gs.th, 0, 0, -1, 0, gs.rise]));
const filled = gs.tr === 1 || gs.tr === 5 ? NONE : gs.fill, stroked = gs.tr === 1 || gs.tr === 2 || gs.tr === 5 || gs.tr === 6 ? gs.stroke : NONE;
@@ -835,6 +839,37 @@ class Painter {
return next;
}
+ private async shapes(f: FontInfo, glyphs: Array<{ code: number; at: number }>, gs: GS, start: Mat, size: number): Promise {
+ const p = f.program;
+ if (!p || p.dead) return false;
+ try {
+ if (p.map instanceof Stream && !p.table) p.table = await this.pdf.decode(p.map);
+ const table = p.table, idOf = (code: number): number => (table ? ((table[code * 2] ?? 0) << 8) | (table[code * 2 + 1] ?? 0) : code);
+ const need = [...new Set(glyphs.map((g) => idOf(g.code)))].filter((id) => !p.glyphs.has(id));
+ if (need.length && !p.whole) {
+ let got = await api.fontOutlines(p.key ? { key: p.key } : { bytes: await this.pdf.decode(p.data) }, p.kind, need);
+ if (got === 'gone') got = await api.fontOutlines({ bytes: await this.pdf.decode(p.data) }, p.kind, need);
+ if (!got || got === 'gone') { p.dead = true; return false; }
+ p.key = got.key; p.upm = got.upm || 1000; p.whole = got.whole;
+ for (const [id, cmds] of Object.entries(got.glyphs)) p.glyphs.set(Number(id), outlineOf(cmds));
+ for (const id of need) if (!p.glyphs.has(id)) p.glyphs.set(id, []);
+ }
+ const d: PathData = [], k = 1 / p.upm;
+ for (const g of glyphs) {
+ const shape = p.glyphs.get(idOf(g.code));
+ if (!shape?.length) continue;
+ const w0 = (f.widths.get(g.code) ?? f.dw) / 1000;
+ d.push(...transformPath(shape, mul(gs.ctm, mul(start, f.vertical ? [size * gs.th * k, 0, 0, size * k, (-w0 / 2) * size * gs.th, g.at - (f.dw2[0] / 1000) * size + gs.rise] : [size * gs.th * k, 0, 0, size * k, g.at, gs.rise]))));
+ }
+ const filled = gs.tr === 1 || gs.tr === 5 ? NONE : gs.fill, stroked = gs.tr === 1 || gs.tr === 2 || gs.tr === 5 || gs.tr === 6 ? gs.stroke : NONE, s = Math.sqrt(Math.abs(gs.ctm[0] * gs.ctm[3] - gs.ctm[1] * gs.ctm[2])), items = [];
+ if (filled.type !== 'none') items.push({ ...fill(filled), opacity: gs.fa });
+ if (stroked.type !== 'none') items.push({ ...strokeItem(stroked, Math.max(0.05, gs.lw * s), { cap: gs.cap, join: gs.join, miter: gs.miter }), opacity: gs.sa });
+ if (d.length && items.length) gs.target.push({ id: newId('p'), kind: 'path', d, rule: 'nonzero', opacity: 1, blend: gs.blend, ap: { items, effects: [] } } as PathNode);
+ this.names.outlined.add(f.shown);
+ return true;
+ } catch { p.dead = true; return false; }
+ }
+
private readonly leads = new WeakMap();
/** Puts a line of type on the target; a line that sits directly under the previous one (same matrix, same left edge, same style, an even step) joins it as one text object with several lines, so a PDF written one line per Tj reopens as paragraphs rather than a node per line. */
@@ -867,7 +902,7 @@ class Painter {
if (hit) return hit;
const sub = nameOf(d.get('Subtype')), two = sub === 'Type0', desc = two ? pdf.dict(pdf.arr(d.get('DescendantFonts'))[0]) : null;
const ordering = pdf.get(pdf.dict(desc?.get('CIDSystemInfo'))?.get('Ordering'));
- const { family, style } = this.names.resolve(nameOf(d.get('BaseFont')) || nameOf(desc?.get('BaseFont')) || 'Helvetica', ordering instanceof Str ? ORDERINGS[latin(ordering.b)] : undefined);
+ const { family, style, shown } = this.names.resolve(nameOf(d.get('BaseFont')) || nameOf(desc?.get('BaseFont')) || 'Helvetica', ordering instanceof Str ? ORDERINGS[latin(ordering.b)] : undefined);
const widths = new Map();
let dw = 500;
if (two && desc) {
@@ -891,8 +926,10 @@ class Painter {
for (const x of pdf.arr(e.get('Differences'))) { const v = pdf.get(x); if (typeof v === 'number') code = v; else if (v instanceof Name) { names.set(code, v.v); const ch = glyphChar(v.v); if (ch) enc.set(code, ch); code++; } }
}
const t3 = sub === 'Type3' ? { matrix: mat6(pdf.nums(d.get('FontMatrix'))) ?? ([0.001, 0, 0, 0.001, 0, 0] as Mat), procs: pdf.dict(d.get('CharProcs')) ?? new Map(), res: pdf.dict(d.get('Resources')) ?? res, names } : null;
- const cmap = two && e instanceof Name ? e.v : '';
- const info: FontInfo = { family, style, widths, dw, two, direct: /-(UCS2|UTF16)-/.test(cmap), bytes: BYTE_CMAPS.find(([re]) => re.test(cmap))?.[1] ?? '', uni: null, enc, type3: t3 };
+ const cmap = two && e instanceof Name ? e.v : '', seven = SEVEN_BIT_CMAPS.find(([re]) => re.test(cmap))?.[1] ?? '';
+ const fd = two ? pdf.dict(desc?.get('FontDescriptor')) : null, f2 = pdf.get(fd?.get('FontFile2')), f3 = pdf.get(fd?.get('FontFile3')), data = f2 instanceof Stream ? f2 : f3 instanceof Stream ? f3 : null, v = desc ? pdf.nums(desc.get('DW2')) : [];
+ const program: FontProgram | null = data && /^Identity-[HV]$/.test(cmap) ? { data, kind: nameOf(desc?.get('Subtype')) === 'CIDFontType2' ? 'gid' : 'cid', map: pdf.get(desc?.get('CIDToGIDMap')), table: null, key: '', whole: false, dead: false, upm: 1000, glyphs: new Map() } : null;
+ const info: FontInfo = { family, style, shown, vertical: two && (/(^|-)V$/.test(cmap) || (e instanceof Stream && pdf.n(e.dict.get('WMode')) === 1)), dw2: [v[0] ?? 880, v[1] ?? -1000], program, widths, dw, two, direct: /-(UCS2|UTF16)-/.test(cmap), bytes: seven || (BYTE_CMAPS.find(([re]) => re.test(cmap))?.[1] ?? ''), high: !!seven, uni: null, enc, type3: t3 };
this.fonts.set(d, info);
return info;
}
@@ -1184,10 +1221,28 @@ function evalFn(pdf: PdfFile, f: PDict, x: number[]): number[] | null {
return null;
}
+function outlineOf(cmds: Array): PathData {
+ const out: PathData = [], n = (i: number): number => Number(cmds[i]) || 0;
+ let cur: Anchor[] | null = null;
+ const flush = (): void => {
+ if (cur && cur.length > 1) { const a = cur[0], z = cur[cur.length - 1]; if (cur.length > 2 && Math.abs(a.x - z.x) < 1e-6 && Math.abs(a.y - z.y) < 1e-6) { a.ix = z.ix; a.iy = z.iy; cur.pop(); } out.push({ closed: true, pts: cur }); }
+ cur = null;
+ };
+ for (let i = 0; i < cmds.length;) {
+ const c = cmds[i];
+ if (c === 'M') { flush(); cur = [corner({ x: n(i + 1), y: n(i + 2) })]; i += 3; }
+ else if (c === 'L') { cur?.push(corner({ x: n(i + 1), y: n(i + 2) })); i += 3; }
+ else if (c === 'C') { const last = cur?.[cur.length - 1]; if (cur && last) { last.ox = n(i + 1); last.oy = n(i + 2); cur.push({ x: n(i + 5), y: n(i + 6), ix: n(i + 3), iy: n(i + 4), ox: n(i + 5), oy: n(i + 6) }); } i += 7; }
+ else { if (c === 'Z') flush(); i += 1; }
+ }
+ flush();
+ return out;
+}
+
function parseCMap(src: string): Map {
const out = new Map(), hex = (h: string): number => parseInt(h, 16);
const uni = (raw: string): string => { const h = raw.replace(/\s/g, ''); let s = ''; for (let i = 0; i + 4 <= h.length; i += 4) s += String.fromCharCode(parseInt(h.slice(i, i + 4), 16)); if (h.length === 2) s = String.fromCharCode(parseInt(h, 16)); return s; };
- const put = (code: number, s: string): void => { if (s && !BROKEN.test(s)) out.set(code, s); };
+ const put = (code: number, s: string): void => { out.set(code, BROKEN.test(s) ? '' : s); };
for (const block of src.match(/beginbfchar([\s\S]*?)endbfchar/g) ?? []) for (const m of block.matchAll(/<([0-9a-fA-F]+)>\s*<([0-9a-fA-F\s]*)>/g)) put(hex(m[1]), uni(m[2]));
for (const block of src.match(/beginbfrange([\s\S]*?)endbfrange/g) ?? []) {
for (const m of block.matchAll(/<([0-9a-fA-F]+)>\s*<([0-9a-fA-F]+)>\s*(?:<([0-9a-fA-F\s]*)>|\[([^\]]*)\])/g)) {
From e3f6f57b198bdaede32c58689600afe63116961b Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:40:03 -0500
Subject: [PATCH 10/74] fix(type): Thai, Chinese and Japanese wrap at words and
keep marks on their letters, justified lines without spaces are justified,
and empty lines after CRLF get the right caret index
---
frontend/src/engine/text.ts | 69 ++++++++++++++++++++++++++++---------
1 file changed, 52 insertions(+), 17 deletions(-)
diff --git a/frontend/src/engine/text.ts b/frontend/src/engine/text.ts
index e1e80ee..e8478bf 100644
--- a/frontend/src/engine/text.ts
+++ b/frontend/src/engine/text.ts
@@ -151,7 +151,7 @@ export function glyphShape(g: Glyph): PathData | null {
}
export function fontHasFeature(st: CharStyle, feature: string): boolean { return !!shaping?.has(st, feature); }
-interface Item { ch: string; st: CharStyle; index: number; gid?: number; adv?: number; up?: boolean; vadv?: number; vorg?: number; syn?: boolean }
+interface Item { ch: string; st: CharStyle; index: number; gid?: number; adv?: number; up?: boolean; vadv?: number; vorg?: number; syn?: boolean; len?: number; j?: boolean }
const EM_ORG = 0.88;
const UPRIGHT: ReadonlyArray = [[0xa7, 0xa7], [0xa9, 0xa9], [0xae, 0xae], [0xb1, 0xb1], [0xbc, 0xbe], [0xd7, 0xd7], [0xf7, 0xf7], [0x1100, 0x11ff], [0x2030, 0x2031], [0x203b, 0x203b], [0x2100, 0x218f], [0x2460, 0x24ff], [0x25a0, 0x27bf], [0x2e80, 0xa4cf], [0xa960, 0xa97f], [0xac00, 0xd7ff], [0xe000, 0xfaff], [0xfe10, 0xfe1f], [0xfe30, 0xfe6f], [0xff00, 0xff60], [0xffe0, 0xffe7], [0x1f000, 0x1faff], [0x20000, 0x3ffff]];
const TURNED: ReadonlyArray = [[0x2329, 0x232a], [0x3008, 0x3011], [0x3014, 0x301f], [0x3030, 0x3030], [0x30a0, 0x30a0], [0x30fc, 0x30fc], [0xfe59, 0xfe5e], [0xff08, 0xff09], [0xff0d, 0xff0d], [0xff1c, 0xff1e], [0xff3b, 0xff3b], [0xff3d, 0xff3d], [0xff3f, 0xff3f], [0xff5b, 0xff60], [0xffe3, 0xffe3]];
@@ -160,9 +160,37 @@ export function verticalClass(ch: string): 'upright' | 'rotated' | 'turned' {
const cp = ch.codePointAt(0) ?? 0;
return inRanges(cp, TURNED) ? 'turned' : inRanges(cp, UPRIGHT) ? 'upright' : 'rotated';
}
-const NO_START = /^[、。,.・:;?!)」』】〕〉》ーぁぃぅぇぉっゃゅょゎァィゥェォッャュョヮヵヶ]$/;
+const NO_START = /^[、。,.・:;?!)」』】〕〉》ーぁぃぅぇぉっゃゅょゎゕゖァィゥェォッャュョヮヵヶㇰ-ㇿ”’〗〙]}…‥々〻ゝゞヽヾ〜%‰℃。」、・ー)\]},.:;!?%"']$/;
+const NO_END = /^[「『(【〔〈《〖〘[{‘“([{"']$/;
+const JOINS = /^[\p{M}ำຳ︀-️\u{e0020}-\u{e007f}\u{e0100}-\u{e01ef}\u{1f3fb}-\u{1f3ff}]/u;
+const joinsCh = (ch: string): boolean => { const c = ch.charCodeAt(0); return c >= 0x300 && !(c >= 0x3400 && c <= 0xa4cf) && !(c >= 0xac00 && c <= 0xd7af) && JOINS.test(ch); };
+const joins = (it: Item | undefined): boolean => !!it?.j;
+const glued = (a: Item | undefined, b: Item | undefined): boolean => joins(b) || a?.ch === '';
+const isCjk = (ch: string): boolean => (ch.codePointAt(0) ?? 0) >= 0x2e80 && verticalClass(ch) !== 'rotated';
function cjkBreakAfter(ch: string, next: string | undefined): boolean {
- return (ch.codePointAt(0) ?? 0) >= 0x2e80 && verticalClass(ch) !== 'rotated' && !/^[「『(【〔〈《]$/.test(ch) && !NO_START.test(next ?? '');
+ return (isCjk(ch) || (next !== undefined && isCjk(next))) && !NO_END.test(ch) && !NO_START.test(next ?? '');
+}
+const isSea = (c: number): boolean => (c >= 0xe00 && c <= 0xeff) || (c >= 0x1780 && c <= 0x17ff);
+let wordSeg: Intl.Segmenter | null | undefined;
+const wordCache = new Map();
+function seaBreaks(p: Item[]): Uint8Array | null {
+ if (!p.some((x) => isSea(x.ch.charCodeAt(0)))) return null;
+ if (wordSeg === undefined) wordSeg = typeof Intl !== 'undefined' && typeof Intl.Segmenter === 'function' ? new Intl.Segmenter(undefined, { granularity: 'word' }) : null;
+ if (!wordSeg) return null;
+ const s = p.map((x) => x.ch).join('');
+ let offs = wordCache.get(s);
+ if (!offs) {
+ offs = [];
+ for (const w of wordSeg.segment(s)) if (w.index > 0 && isSea(s.charCodeAt(w.index - 1)) && isSea(s.charCodeAt(w.index))) offs.push(w.index);
+ if (wordCache.size > 256) wordCache.clear();
+ wordCache.set(s, offs);
+ }
+ const out = new Uint8Array(p.length + 1);
+ for (let k = 0, o = 0, q = 0; k < p.length && q < offs.length; o += p[k].ch.length, k++) {
+ while (q < offs.length && offs[q] < o) q++;
+ if (offs[q] === o) out[k] = 1;
+ }
+ return out;
}
function orient(out: Item[]): Item[] {
for (const it of out) {
@@ -194,7 +222,7 @@ function itemsOf(spans: Span[]): Item[] {
const feats = smcp ? [...st.features, 'smcp'] : st.features;
for (const piece of text.split(/(\r\n|\r|\n)/)) {
if (!piece) continue;
- if (piece === '\n' || piece === '\r' || piece === '\r\n') { out.push({ ch: '\n', st, index: i }); i += piece.length; continue; }
+ if (piece === '\n' || piece === '\r' || piece === '\r\n') { out.push(piece.length > 1 ? { ch: '\n', st, index: i, len: piece.length } : { ch: '\n', st, index: i }); i += piece.length; continue; }
const shaped = (feats.length || st.alt !== undefined || hasAxes(st)) && shaping ? shaping.shape(st, piece, feats) : null;
if (shaped) {
let k = 0;
@@ -208,6 +236,7 @@ function itemsOf(spans: Span[]): Item[] {
}
}
}
+ for (const it of out) if (joinsCh(it.ch)) it.j = true;
return out;
}
@@ -215,13 +244,13 @@ function effSize(st: CharStyle): number { return st.position === 'normal' ? st.s
function effShift(st: CharStyle): number { return st.baseline + (st.position === 'super' ? -st.size * 0.333 : st.position === 'sub' ? st.size * 0.15 : 0); }
function advance(it: Item, next: Item | undefined): number {
- const size = effSize(it.st), opt = next && it.st.kerning === 'optical' && !next.syn ? opticalKern(it.st, it.ch, next.st, next.ch) : null;
- if (it.adv !== undefined) return (it.adv + (opt ?? 0)) * size * (it.st.hscale / 100) + (it.st.tracking / 1000) * it.st.size;
+ const size = effSize(it.st), opt = next && it.st.kerning === 'optical' && !next.syn ? opticalKern(it.st, it.ch, next.st, next.ch) : null, tr = glued(it, next) ? 0 : (it.st.tracking / 1000) * it.st.size;
+ if (it.adv !== undefined) return (it.adv + (opt ?? 0)) * size * (it.st.hscale / 100) + tr;
const font = cssFont(it.st, size);
let w = charWidth(font, it.ch) * (it.st.hscale / 100);
if (opt !== null) w += opt * size * (it.st.hscale / 100);
else if (next && next.st === it.st && it.st.kerning !== 'none') w += pairKern(font, it.ch, next.ch) * (it.st.hscale / 100);
- return w + (it.st.tracking / 1000) * it.st.size;
+ return w + tr;
}
function leadingOf(st: CharStyle): number { return st.leading ?? st.size * 1.2; }
@@ -232,7 +261,7 @@ function uprightWidth(it: Item): number {
}
function vAdvance(it: Item, next: Item | undefined): number {
if (!it.up) return advance(it, next);
- return (it.vadv ?? 1) * effSize(it.st) * (it.st.vscale / 100) + (it.st.tracking / 1000) * it.st.size;
+ return (it.vadv ?? 1) * effSize(it.st) * (it.st.vscale / 100) + (glued(it, next) ? 0 : (it.st.tracking / 1000) * it.st.size);
}
function lineMetrics(st: CharStyle, size: number, vertical: boolean): { ascent: number; descent: number } {
return vertical ? { ascent: size / 2, descent: size / 2 } : metrics(st, size);
@@ -342,8 +371,8 @@ function layoutLines(n: TextNode): TextLayout {
const vertical = !!n.vertical, all = items(n.spans, vertical), para = n.para, frame = n.mode === 'area' && n.frame ? n.frame : null;
const cells: Cell[] = frame ? areaCells(n.area, frame, vertical) : [{ x: 0, w: Infinity, top: 0, bottom: Infinity }];
const lines: Line[] = [];
- const paragraphs: Item[][] = [[]];
- for (const it of all) { if (it.ch === '\n' || it.ch === '\r') paragraphs.push([]); else paragraphs[paragraphs.length - 1].push(it); }
+ const paragraphs: Item[][] = [[]], brks: Item[] = [];
+ for (const it of all) { if (it.ch === '\n' || it.ch === '\r') { paragraphs.push([]); brks.push(it); } else paragraphs[paragraphs.length - 1].push(it); }
let y = 0, col = 0, first = true, overflowAt = -1;
const startCol = (c: number): number => (frame ? cells[c].x : 0);
const step = (it: Item, next: Item | undefined): number => (vertical ? vAdvance(it, next) : advance(it, next));
@@ -369,7 +398,7 @@ function layoutLines(n: TextNode): TextLayout {
const b = step(it, next);
if (!J) return { w: b, shrink: 0 };
if (it.ch === ' ') return { w: (b * J.wordDes) / 100, shrink: (b * Math.max(0, J.wordDes - J.wordMin)) / 100 };
- const sw = spaceW(it.st);
+ const sw = glued(it, next) ? 0 : spaceW(it.st);
return { w: (b * J.glyphDes) / 100 + (sw * J.letterDes) / 100, shrink: (b * Math.max(0, J.glyphDes - J.glyphMin)) / 100 + (sw * Math.max(0, J.letterDes - J.letterMin)) / 100 };
};
const tabAt = (p: Item[], k: number, rel: number): { w: number; stop: TabStop | null } => {
@@ -393,6 +422,7 @@ function layoutLines(n: TextNode): TextLayout {
const marker: Item[] = list ? Array.from(listMarker(list, (list.start ?? 1) + listNo - 1), (ch) => ({ ch, st: mst, index: pIndex, syn: true })) : [];
const markerW = marker.reduce((s, it, k) => s + step(it, marker[k + 1]), 0), markerGap = marker.length ? mst.size * 0.5 : 0;
let i = 0, lineNo = 0, hyphRun = 0;
+ const wb = seaBreaks(p);
do {
const st0 = p[i]?.st ?? tail, lead0 = leadingOf(st0), m0 = lm(st0, st0.size), fb0 = frame ? firstBase(n.area, st0, st0.size, lead0, vertical) : 0;
let ly = first ? (frame ? cells[col].top + fb0 : 0) : y + lead0, fromTop = first && !!frame;
@@ -424,9 +454,13 @@ function layoutLines(n: TextNode): TextLayout {
while (j < p.length) {
const it = p[j], m = it.ch === '\t' ? { w: tabAt(p, j, lineAt + width).w, shrink: 0 } : measure(it, p[j + 1]);
if (width + m.w - (justified ? shrink + m.shrink : 0) > availW && j > i) {
- if (it.ch === ' ' || it.ch === '\t') end = j + 1;
+ if ((it.ch === ' ' || it.ch === '\t') && !glued(it, p[j + 1])) end = j + 1;
else {
end = lastBreak > i ? lastBreak : j;
+ if (end === j && glued(p[j - 1], p[j])) {
+ while (end > i + 1 && glued(p[end - 1], p[end])) end--;
+ if (glued(p[end - 1], p[end])) { end = j; while (end < p.length && glued(p[end - 1], p[end])) end++; }
+ }
if (H && (H.limit <= 0 || hyphRun < H.limit) && isLetter(it)) {
const at = (k: number): number => (k === j ? width : cum[k - i]), atS = (k: number): number => (k === j ? shrink : cumS[k - i]);
if (justified || H.zone <= 0 || lastBreak <= i || availW - at(lastBreak) >= H.zone) {
@@ -445,7 +479,7 @@ function layoutLines(n: TextNode): TextLayout {
}
cum.push(width); cumS.push(shrink);
width += m.w; shrink += m.shrink;
- if (it.ch === ' ' || it.ch === '\t' || it.ch === '-' || cjkBreakAfter(it.ch, p[j + 1]?.ch)) lastBreak = j + 1;
+ if ((it.ch === ' ' || it.ch === '\t' || it.ch === '-' || cjkBreakAfter(it.ch, p[j + 1]?.ch) || wb?.[j + 1] === 1) && !glued(it, p[j + 1])) lastBreak = j + 1;
j++;
}
const li = p.slice(i, end), lineFirst = i;
@@ -473,9 +507,10 @@ function layoutLines(n: TextNode): TextLayout {
let slack = availW - lineW;
const sp: number[] = [], letters: number[] = [];
visible.forEach((x, k) => { if (x.ch === ' ') sp.push(k); else if (x.ch !== '\t') letters.push(k); });
- const gaps = letters.filter((k) => k < visible.length - 1 || !!hy);
- if (!J) { if (sp.length) for (const k of sp) extra[k] = slack / sp.length; }
- else if (!sp.length && J.single !== 'justify') alignAs = J.single;
+ const gaps = letters.filter((k) => (k < visible.length - 1 || !!hy) && !glued(visible[k], visible[k + 1]));
+ const dense = !sp.length && visible.some((x) => isCjk(x.ch) || isSea(x.ch.charCodeAt(0)));
+ if (!J) { if (sp.length) for (const k of sp) extra[k] = slack / sp.length; else if (dense) { const cg = gaps.filter((k) => k < visible.length - 1), wg = wb ? cg.filter((k) => wb[lineFirst + k + 1] === 1) : [], ks = wg.length ? wg : cg; for (const k of ks) extra[k] = slack / ks.length; } }
+ else if (!sp.length && J.single !== 'justify' && !dense) alignAs = J.single;
else {
const grow = slack >= 0, base = visible.map((x, k) => step(x, visible[k + 1]));
const take = (ks: number[], cap: (k: number) => number): number => {
@@ -528,7 +563,7 @@ function layoutLines(n: TextNode): TextLayout {
y = lineY;
} while (i < p.length);
y += para.spaceAfter;
- paraStart = pIndex + p.reduce((s, it) => s + it.ch.length, 0) + 1;
+ paraStart = pIndex + p.reduce((s, it) => s + it.ch.length, 0) + (brks[pi]?.len ?? 1);
}
if (!lines.length) {
const st = n.spans[0]?.style ?? DEFAULT_CHAR;
From 5daaba81f7d36cd49803f4d606faf7235e0a9beb Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:28:14 -0500
Subject: [PATCH 11/74] fix(cad): a DWG drawing before 2007 is read in its own
code page, and \M+ and %%nnn character codes in DXF and DWG text are decoded
---
frontend/src/io/dwg-bits.ts | 8 ++++++--
frontend/src/io/dwg-file.ts | 10 ++++++----
frontend/src/io/dwg-header.ts | 2 +-
frontend/src/io/dwg.ts | 8 ++++----
frontend/src/io/dxf.ts | 17 +++++++++--------
frontend/src/io/text-decode.ts | 22 ++++++++++++++++++++++
6 files changed, 48 insertions(+), 19 deletions(-)
diff --git a/frontend/src/io/dwg-bits.ts b/frontend/src/io/dwg-bits.ts
index 4d82e73..f175327 100644
--- a/frontend/src/io/dwg-bits.ts
+++ b/frontend/src/io/dwg-bits.ts
@@ -1,7 +1,11 @@
+import { cadEscapes } from './text-decode';
+
export class DwgError extends Error {}
export class DwgUnsupportedError extends DwgError {}
const scratch = new DataView(new ArrayBuffer(8));
+const decoders = new Map();
+const decoderOf = (cp: string): TextDecoder => { let t = decoders.get(cp); if (!t) { t = new TextDecoder(cp); decoders.set(cp, t); } return t; };
export class Bits {
pos = 0;
@@ -84,13 +88,13 @@ export class Bits {
default: return v;
}
}
- tvCp(): string {
+ tvCp(cp = 'windows-1252'): string {
const n = this.bs();
if (n <= 0) return '';
const b = this.bytes(n);
let e = n;
while (e > 0 && b[e - 1] === 0) e--;
- return cp1252(b.subarray(0, e));
+ return cadEscapes(cp === 'windows-1252' ? cp1252(b.subarray(0, e)) : decoderOf(cp).decode(b.subarray(0, e)));
}
tuStr(): string {
const n = this.bs();
diff --git a/frontend/src/io/dwg-file.ts b/frontend/src/io/dwg-file.ts
index c11b976..17961b2 100644
--- a/frontend/src/io/dwg-file.ts
+++ b/frontend/src/io/dwg-file.ts
@@ -1,11 +1,12 @@
import { Bits, DwgError, DwgUnsupportedError, headerMask, lz77 } from './dwg-bits';
import { readContainer } from './dwg-r2007';
+import { dwgCodePage } from './text-decode';
const TAGS: Record = { AC1015: 15, AC1018: 18, AC1021: 21, AC1024: 24, AC1027: 27, AC1032: 32 };
const TAG_NAMES: Record = { AC1012: 'R13', AC1014: 'R14', AC1015: 'R2000', AC1018: 'R2004', AC1021: 'R2007', AC1024: 'R2010', AC1027: 'R2013', AC1032: 'R2018' };
// header and classes start at their RL size field; objects is the buffer the object map offsets point into
-export interface Sections { ver: number; tag: string; header: Uint8Array; classes: Uint8Array; handles: Uint8Array; objects: Uint8Array; maint: number }
+export interface Sections { ver: number; tag: string; header: Uint8Array; classes: Uint8Array; handles: Uint8Array; objects: Uint8Array; maint: number; cp?: string }
export interface ClassInfo { num: number; dxf: string; cpp: string; entity: boolean }
const u32 = (d: Uint8Array, p: number): number => (d[p] | (d[p + 1] << 8) | (d[p + 2] << 16) | (d[p + 3] << 24)) >>> 0;
@@ -97,9 +98,10 @@ function r2004(d: Uint8Array, tag: string, ver: number): Sections {
export function readSections(d: Uint8Array): Sections {
const { tag, ver } = versionOf(d);
- if (ver === 15) return r2000(d, tag);
+ const cp = dwgCodePage(d[0x13] | (d[0x14] << 8));
+ if (ver === 15) return { ...r2000(d, tag), cp };
if (ver === 21) return { ver, tag, ...readContainer(d), maint: d[0x0b] };
- return r2004(d, tag, ver);
+ return { ...r2004(d, tag, ver), cp };
}
export function objectMap(handles: Uint8Array): Map {
@@ -144,7 +146,7 @@ export function readClasses(s: Sections): Map {
limit = str ? str.pos : end;
}
if (ver >= 18) { b.bs(); b.rc(); b.rc(); b.bit(); }
- const t = (): string => (ver >= 21 ? (str ? str.tuStr() : '') : b.tvCp());
+ const t = (): string => (ver >= 21 ? (str ? str.tuStr() : '') : b.tvCp(s.cp));
try {
while (b.pos + 16 < limit) {
const num = b.bs();
diff --git a/frontend/src/io/dwg-header.ts b/frontend/src/io/dwg-header.ts
index 122f48d..54bee44 100644
--- a/frontend/src/io/dwg-header.ts
+++ b/frontend/src/io/dwg-header.ts
@@ -28,7 +28,7 @@ function walk(sec: Sections, out: HeaderVars): void {
str = stringStream(d, limit, b.pos);
}
const m = new Bits(d, limit, b.pos);
- const tv = (): string => (ver >= 21 ? (str ? str.tuStr() : '') : m.tvCp());
+ const tv = (): string => (ver >= 21 ? (str ? str.tuStr() : '') : m.tvCp(sec.cp));
// handles sit inline up to R2004 and in a stream of their own from R2007 on
const hd = (): void => { if (ver < 21) m.h(); };
const cmc = (): void => {
diff --git a/frontend/src/io/dwg.ts b/frontend/src/io/dwg.ts
index cfcebd9..77afef5 100644
--- a/frontend/src/io/dwg.ts
+++ b/frontend/src/io/dwg.ts
@@ -25,8 +25,8 @@ const num = (v: number): string => String(v);
const deg = (r: number): number => (r * 180) / Math.PI;
class Rd {
- constructor(readonly b: Bits, readonly s: Bits | null, readonly h: Bits, readonly ver: number) {}
- t(): string { return this.ver >= 21 ? (this.s ? this.s.tuStr() : '') : this.b.tvCp(); }
+ constructor(readonly b: Bits, readonly s: Bits | null, readonly h: Bits, readonly ver: number, readonly cp?: string) {}
+ t(): string { return this.ver >= 21 ? (this.s ? this.s.tuStr() : '') : this.b.tvCp(this.cp); }
}
interface Common {
@@ -153,7 +153,7 @@ function build(sec: Sections, classes: Map, omap: Map end || hs < b0.pos) throw new DwgError('Bad handle stream position.');
const str = ver >= 21 ? stringStream(d, hs, base) : null;
- const r = new Rd(new Bits(d, hs, b0.pos), str, new Bits(d, end, hs), ver);
+ const r = new Rd(new Bits(d, hs, b0.pos), str, new Bits(d, end, hs), ver, sec.cp);
const c = common(r, handle, entity);
commonHandles(r, c);
if (isTable) { table(r, kind, c, handle, tables); continue; }
@@ -465,7 +465,7 @@ function assemble(sec: Sections, recs: Rec[], t: Tables, unreadable: number, fai
const hdr = readHeader(sec);
const layerName = (h: number): string => t.layers.get(h)?.name ?? '0';
const file: DwgFile = {
- version: sec.tag, units: hdr.units, metric: hdr.metric, layers: new Map(), styles: new Map(), blocks: new Map(), ents: [], layouts: ['Model'],
+ version: sec.tag, units: hdr.units, metric: hdr.metric, layers: new Map(), styles: new Map(), blocks: new Map(), ents: [], layouts: ['Model'], codepage: sec.cp,
linetypes: new Map(), lineScale: hdr.ltscale, extents: hdr.extents, native: { version: sec.tag, objects: recs.length, unreadable, failures },
};
for (const L of t.layers.values()) file.layers.set(L.name, { name: L.name, color: Math.abs(L.color) || 7, rgb: L.rgb, lw: L.lw, off: L.off || L.frozen });
diff --git a/frontend/src/io/dxf.ts b/frontend/src/io/dxf.ts
index 2b27eba..32d75cc 100644
--- a/frontend/src/io/dxf.ts
+++ b/frontend/src/io/dxf.ts
@@ -10,7 +10,7 @@ import { instanceArt } from '../engine/symbolism';
import { fill as fillItem, gradientAt, linearGradient, resolvePaint, stop, stroke as strokeItem, toRgb } from '../engine/paint';
import { DEFAULT_CHAR, DEFAULT_PARA, layoutText } from '../engine/text';
import type { Anchor, Color, Doc, LayerNode, Mat, PathData, Pt, Project, Rect, SubPath, TextNode, VNode } from '../engine';
-import { decodeText } from './text-decode';
+import { cadEscapes, decodeText } from './text-decode';
export type DxfUnit = 'unitless' | 'in' | 'ft' | 'yd' | 'mi' | 'mm' | 'cm' | 'm' | 'km' | 'pt' | 'px';
export const DXF_UNITS: ReadonlyArray = [['mm', 'Millimeters'], ['cm', 'Centimeters'], ['m', 'Meters'], ['km', 'Kilometers'], ['in', 'Inches'], ['ft', 'Feet'], ['yd', 'Yards'], ['mi', 'Miles'], ['pt', 'Points'], ['px', 'Pixels']];
@@ -23,7 +23,7 @@ type Pair = [number, string];
interface Ent { type: string; c: Pair[] }
interface Layer { name: string; color: number; rgb: number | null; lw: number; off: boolean }
interface Block { name: string; base: Pt; ents: Ent[] }
-export interface DxfFile { version: string; units: DxfUnit; metric: boolean; layers: Map; styles: Map; blocks: Map; ents: Ent[]; layouts: string[] }
+export interface DxfFile { version: string; units: DxfUnit; metric: boolean; layers: Map; styles: Map; blocks: Map; ents: Ent[]; layouts: string[]; codepage?: string }
export interface DxfImportOptions { units: DxfUnit; scale: number; layout: string; merge: boolean; fit: 'actual' | 'artboard' }
const g = (e: Ent, code: number, d = ''): string => { for (const [k, v] of e.c) if (k === code) return v; return d; };
@@ -45,7 +45,7 @@ export function parseDxf(text: string): DxfFile {
for (let i = 0; i + 1 < lines.length; i += 2) {
const code = parseInt(lines[i].trim(), 10);
if (!Number.isFinite(code)) { i--; continue; }
- pairs.push([code, lines[i + 1].replace(/\s+$/, '').replace(/\\U\+([0-9a-fA-F]{4})/g, (_, h: string) => String.fromCharCode(parseInt(h, 16)))]);
+ pairs.push([code, cadEscapes(lines[i + 1].replace(/\s+$/, ''))]);
}
if (!pairs.some(([k, v]) => k === 0 && v === 'SECTION')) throw new Error('This file is not a readable DXF.');
const file: DxfFile = { version: '', units: 'unitless', metric: false, layers: new Map(), styles: new Map(), blocks: new Map(), ents: [], layouts: ['Model'] };
@@ -73,6 +73,7 @@ export function parseDxf(text: string): DxfFile {
if (v === '$ACADVER') file.version = val.trim();
if (v === '$INSUNITS') file.units = INSUNITS[parseInt(val, 10)] ?? 'unitless';
if (v === '$MEASUREMENT') file.metric = parseInt(val, 10) === 1;
+ if (v === '$DWGCODEPAGE') file.codepage = CODE_PAGES[val.trim().toUpperCase()];
}
} else if (name === 'TABLES') {
for (const r of records(i + 2, j)) {
@@ -211,11 +212,11 @@ function bspline(deg: number, knots: number[], ctrl: Pt[], weights: number[], cl
}
function mtextPlain(s: string): string {
- return s.replace(/\\P/g, '\n').replace(/\\~/g, ' ').replace(/\\S([^;]*);/g, (_, x: string) => x.replace(/[#^]/g, '/'))
- .replace(/\\[fFHWQTACcp][^;]*;/g, '').replace(/\\[LlOoKkNX]/g, '').replace(/\\U\+([0-9a-fA-F]{4})/g, (_, h: string) => String.fromCharCode(parseInt(h, 16)))
+ return cadEscapes(s.replace(/\\P/g, '\n').replace(/\\~/g, ' ').replace(/\\S([^;]*);/g, (_, x: string) => x.replace(/[#^]/g, '/'))
+ .replace(/\\[fFHWQTACcp][^;]*;/g, '').replace(/\\[LlOoKkNX]/g, ''))
.replace(/\\\\/g, '\u0000').replace(/[{}]/g, '').replace(/\u0000/g, '\\');
}
-const textPlain = (s: string): string => s.replace(/%%[cC]/g, 'Ø').replace(/%%[dD]/g, '°').replace(/%%[pP]/g, '±').replace(/%%[uUoOkK]/g, '').replace(/%%%/g, '%').replace(/\\U\+([0-9a-fA-F]{4})/g, (_, h: string) => String.fromCharCode(parseInt(h, 16)));
+const textPlain = (s: string, cp?: string): string => cadEscapes(s, cp, true);
function fontFrom(file: string): string {
if (/times/.test(file)) return 'Times New Roman';
@@ -336,7 +337,7 @@ export function dxfToDoc(file: DxfFile, o: DxfImportOptions, title: string): { d
const at = useAlign ? { x: gn(e, 11), y: gn(e, 21) } : { x: gn(e, 10), y: gn(e, 20) };
const dy = v === 2 ? -height / 2 : v === 3 ? -height : v === 1 ? height * 0.25 : 0;
const rot = gn(e, 50, 0), ra = (rot * Math.PI) / 180;
- text(e, ctx, textPlain(g(e, 1)), { x: at.x - Math.sin(ra) * dy, y: at.y + Math.cos(ra) * dy }, height, rot, h === 1 || h === 4 ? 'center' : h === 2 ? 'right' : 'left', Math.round(gn(e, 41, 1) * 100));
+ text(e, ctx, textPlain(g(e, 1), file.codepage), { x: at.x - Math.sin(ra) * dy, y: at.y + Math.cos(ra) * dy }, height, rot, h === 1 || h === 4 ? 'center' : h === 2 ? 'right' : 'left', Math.round(gn(e, 41, 1) * 100));
break;
}
case 'MTEXT': {
@@ -419,7 +420,7 @@ export function dxfToDoc(file: DxfFile, o: DxfImportOptions, title: string): { d
const local = mul(mul(mul([1, 0, 0, 1, gn(e, 10), gn(e, 20)], R), [1, 0, 0, 1, cI * dx, r * dy]), mul([sx, 0, 0, sy, 0, 0], [1, 0, 0, 1, -b.base.x, -b.base.y]));
run(b.ents, { ...sub, m: mul(mul(ctx.m, ocs(e)), local) }, false);
}
- for (const at of attribs) if ((gn(at, 70, 0) & 1) === 0) { const h = gn(at, 72, 0), useAlign = h !== 0 && h !== 3 && h !== 5 && has(at, 11); text(at, ctx, textPlain(g(at, 1)), useAlign ? { x: gn(at, 11), y: gn(at, 21) } : { x: gn(at, 10), y: gn(at, 20) }, gn(at, 40, 2.5), gn(at, 50, 0), h === 1 || h === 4 ? 'center' : h === 2 ? 'right' : 'left'); }
+ for (const at of attribs) if ((gn(at, 70, 0) & 1) === 0) { const h = gn(at, 72, 0), useAlign = h !== 0 && h !== 3 && h !== 5 && has(at, 11); text(at, ctx, textPlain(g(at, 1), file.codepage), useAlign ? { x: gn(at, 11), y: gn(at, 21) } : { x: gn(at, 10), y: gn(at, 20) }, gn(at, 40, 2.5), gn(at, 50, 0), h === 1 || h === 4 ? 'center' : h === 2 ? 'right' : 'left'); }
break;
}
case 'POINT': skip('points'); break;
diff --git a/frontend/src/io/text-decode.ts b/frontend/src/io/text-decode.ts
index 7c99132..939667f 100644
--- a/frontend/src/io/text-decode.ts
+++ b/frontend/src/io/text-decode.ts
@@ -23,3 +23,25 @@ export function decodeText(bytes: Uint8Array, hint?: string | null): string {
export async function fileText(file: Blob, hint?: string | null): Promise {
return decodeText(new Uint8Array(await file.arrayBuffer()), hint);
}
+
+const DWG_CP: Record = {
+ 3: 'iso-8859-2', 4: 'iso-8859-3', 5: 'iso-8859-4', 6: 'iso-8859-5', 7: 'iso-8859-6', 8: 'iso-8859-7', 9: 'iso-8859-8', 10: 'iso-8859-9', 22: 'shift_jis', 23: 'macintosh', 24: 'big5', 25: 'euc-kr', 27: 'ibm866',
+ 28: 'windows-1250', 29: 'windows-1251', 30: 'windows-1252', 31: 'gbk', 32: 'windows-1253', 33: 'windows-1254', 34: 'windows-1255', 35: 'windows-1256', 36: 'windows-1257', 37: 'windows-874', 38: 'shift_jis', 39: 'gbk', 40: 'euc-kr', 41: 'big5',
+};
+export const dwgCodePage = (n: number): string => DWG_CP[n] ?? 'windows-1252';
+
+const MIF: Record = { 1: 'shift_jis', 2: 'big5', 3: 'euc-kr', 5: 'gbk' };
+const PCT: Record = { c: 'Ø', d: '°', p: '±', u: '', o: '', k: '', '%': '%' };
+
+export function cadEscapes(s: string, cp?: string | null, codes = false): string {
+ if (!s.includes('\\') && !(codes && s.includes('%%'))) return s;
+ const rx = codes ? /\\U\+([0-9a-fA-F]{4})|\\M\+([1-5])([0-9a-fA-F]{4})|%%(\d{3}|[cdpuokCDPUOK%])/g : /\\U\+([0-9a-fA-F]{4})|\\M\+([1-5])([0-9a-fA-F]{4})/g;
+ return s.replace(rx, (m: string, u?: string, n?: string, mb?: string, pc?: string) => {
+ if (u) return String.fromCharCode(parseInt(u, 16));
+ if (n && mb) { const l = MIF[n]; return l ? decode(Uint8Array.of(parseInt(mb.slice(0, 2), 16), parseInt(mb.slice(2), 16)), l, true) ?? m : m; }
+ if (!pc) return m;
+ if (pc.length === 1) return PCT[pc.toLowerCase()];
+ const c = Number(pc);
+ return c > 255 ? m : c < 128 ? String.fromCharCode(c) : decode(Uint8Array.of(c), cp || 'windows-1252', true) ?? m;
+ });
+}
From f64b477c708d363e20b11213365cb6a9f8ea1924 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:30:00 -0500
Subject: [PATCH 12/74] fix(dwg): a drawing opened through the installed
converter keeps its Chinese, Japanese, Korean or other legacy text instead of
replacement characters
---
backend/app/routers/io.py | 8 ++++----
backend/app/services/dwg.py | 4 ++--
frontend/src/app.ts | 2 +-
frontend/src/io/api.ts | 4 ++--
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/backend/app/routers/io.py b/backend/app/routers/io.py
index bfce1a5..1e0bffb 100644
--- a/backend/app/routers/io.py
+++ b/backend/app/routers/io.py
@@ -2,7 +2,7 @@
from pathlib import Path
from fastapi import APIRouter, File, Form, HTTPException, Request, UploadFile
-from fastapi.responses import PlainTextResponse
+from fastapi.responses import Response
from app.core import config
from app.services import dwg
@@ -26,16 +26,16 @@ def dwg_converters(request: Request) -> dict:
@router.post("/dwg/to-dxf")
-def dwg_to_dxf(request: Request, file: UploadFile = File(...)) -> PlainTextResponse:
+def dwg_to_dxf(request: Request, file: UploadFile = File(...)) -> Response:
_local(request)
data = file.file.read()
if len(data) > MAX:
raise HTTPException(status_code=413, detail="The drawing is larger than 512 MiB.")
try:
- text, used = dwg.to_dxf(data)
+ dxf, used = dwg.to_dxf(data)
except dwg.DwgError as exc:
raise HTTPException(status_code=422, detail=str(exc)) from exc
- return PlainTextResponse(text, headers={"X-Converter": used})
+ return Response(dxf, media_type="application/dxf", headers={"X-Converter": used})
@router.post("/export")
diff --git a/backend/app/services/dwg.py b/backend/app/services/dwg.py
index e9c16a7..7b0b5a8 100644
--- a/backend/app/services/dwg.py
+++ b/backend/app/services/dwg.py
@@ -52,7 +52,7 @@ def _run(argv: list[str]) -> subprocess.CompletedProcess:
return subprocess.run(argv, capture_output=True, timeout=TIMEOUT, env=env, check=False)
-def to_dxf(data: bytes) -> tuple[str, str]:
+def to_dxf(data: bytes) -> tuple[bytes, str]:
if not data.startswith(b"AC10"):
raise DwgError("This file is not a DWG drawing (it does not start with an AutoCAD version tag).")
found = converters()
@@ -82,7 +82,7 @@ def to_dxf(data: bytes) -> tuple[str, str]:
errors.append(f"{conv['name']}: {exc}")
continue
if hits and hits[0].stat().st_size > 0:
- return hits[0].read_bytes().decode("utf-8", errors="replace"), conv["name"]
+ return hits[0].read_bytes(), conv["name"]
tail = (res.stderr or res.stdout or b"").decode("utf-8", errors="replace").strip().splitlines()[-1:] or ["no output"]
errors.append(f"{conv['name']}: {tail[0]}")
raise DwgError("The DWG converter could not read this drawing. " + "; ".join(errors))
diff --git a/frontend/src/app.ts b/frontend/src/app.ts
index 40ba960..555c7bd 100644
--- a/frontend/src/app.ts
+++ b/frontend/src/app.ts
@@ -477,7 +477,7 @@ export function startApp(): void {
// only a version the native reader does not cover goes to the installed converter; a damaged file reports its own error
if (!(e instanceof DwgUnsupportedError)) throw e;
const conv = await api.dwgToDxf(f);
- file = parseDxf(conv.text);
+ file = parseDxf(decodeDxf(conv.bytes));
how = ` through ${conv.converter}`;
}
} else file = parseDxf(decodeDxf(new Uint8Array(await f.arrayBuffer())));
diff --git a/frontend/src/io/api.ts b/frontend/src/io/api.ts
index a28c45b..c1b179f 100644
--- a/frontend/src/io/api.ts
+++ b/frontend/src/io/api.ts
@@ -125,11 +125,11 @@ export const api = {
try { return await json(await request('/fonts/outlines', { method: 'POST', body })); } catch (e) { return e instanceof ApiError && e.status === 409 ? 'gone' : null; }
},
- async dwgToDxf(file: Blob): Promise<{ text: string; converter: string }> {
+ async dwgToDxf(file: Blob): Promise<{ bytes: Uint8Array; converter: string }> {
const body = new FormData();
body.append('file', file, 'drawing.dwg');
const res = await request('/io/dwg/to-dxf', { method: 'POST', body });
- return { text: await res.text(), converter: res.headers.get('X-Converter') ?? 'a DWG converter' };
+ return { bytes: new Uint8Array(await res.arrayBuffer()), converter: res.headers.get('X-Converter') ?? 'a DWG converter' };
},
async plugins(): Promise> { try { return await json>(await request('/plugins')); } catch { return []; } },
From 019e1ac31df8ca387f871abda86558c5fefa2a5b Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:31:49 -0500
Subject: [PATCH 13/74] fix(io): zip entry names, OBJ and MTL files and older
PSD layer names outside UTF-8 are read in their own charset, and a long
swatch name is never cut inside a character
---
frontend/src/io/ase.ts | 2 +-
frontend/src/io/model.ts | 5 +++--
frontend/src/io/psd-read.ts | 3 ++-
frontend/src/io/zip.ts | 6 ++++--
4 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/frontend/src/io/ase.ts b/frontend/src/io/ase.ts
index a8eb61d..3672ff9 100644
--- a/frontend/src/io/ase.ts
+++ b/frontend/src/io/ase.ts
@@ -53,7 +53,7 @@ export function readAse(data: ArrayBuffer, name = 'Library'): SwatchLibrary {
export function writeAse(lib: SwatchLibrary): { blob: Blob; skipped: number } {
const blocks: Uint8Array[] = [];
let count = 0, skipped = 0;
- const strBytes = (s: string): Uint8Array => { const t = s.slice(0, 200), b = new Uint8Array(2 + (t.length + 1) * 2), dv = new DataView(b.buffer); dv.setUint16(0, t.length + 1); for (let i = 0; i < t.length; i++) dv.setUint16(2 + i * 2, t.charCodeAt(i)); return b; };
+ const strBytes = (s: string): Uint8Array => { const t = s.slice(0, 200).replace(/[\uD800-\uDBFF]$/, ''), b =new Uint8Array(2 + (t.length + 1) * 2), dv = new DataView(b.buffer); dv.setUint16(0, t.length + 1); for (let i = 0; i < t.length; i++) dv.setUint16(2 + i * 2, t.charCodeAt(i)); return b; };
const block = (type: number, body: Uint8Array): void => { const b = new Uint8Array(6 + body.length), dv = new DataView(b.buffer); dv.setUint16(0, type); dv.setUint32(2, body.length); b.set(body, 6); blocks.push(b); count++; };
const entry = (name: string, c: Color, kind: 0 | 1 | 2): void => {
const nm = strBytes(name), vals = c.kind === 'cmyk' ? [c.c / 100, c.m / 100, c.y / 100, c.k / 100] : c.kind === 'gray' ? [1 - c.k / 100] : (() => { const v = toRgb(c); return [v.r / 255, v.g / 255, v.b / 255]; })();
diff --git a/frontend/src/io/model.ts b/frontend/src/io/model.ts
index abd2033..421ebef 100644
--- a/frontend/src/io/model.ts
+++ b/frontend/src/io/model.ts
@@ -3,6 +3,7 @@ import { buildModelMesh, encodeMesh, MESH_MIME, type Mesh } from '../engine/mode
import { imageAverage } from '../engine/texture';
import { parseGltf } from './gltf';
import { parseObj } from './obj';
+import { fileText } from './text-decode';
export const MODEL_FILE = /\.(obj|glb|gltf)$/i;
export const MODEL_PART = /\.(mtl|bin)$/i;
@@ -31,8 +32,8 @@ export async function importModel(f: File, parts: File[] = []): Promise;
if (lower.endsWith('.obj')) {
const mtl = new Map();
- for (const [k, p] of byName) if (k.endsWith('.mtl')) mtl.set(k, await p.text());
- const r = parseObj(await f.text(), (n) => mtl.get(base(n)) ?? null);
+ for (const [k, p] of byName) if (k.endsWith('.mtl')) mtl.set(k, await fileText(p));
+ const r = parseObj(await fileText(f), (n) => mtl.get(base(n)) ?? null);
raw = r.raw; faces = r.faces;
loose = r.imageNames.map((n) => { const p = byName.get(base(n)); return p && /\.(png|jpe?g|webp)$/i.test(p.name) ? { blob: p.slice(0, p.size, p.type || (/\.png$/i.test(p.name) ? 'image/png' : /\.webp$/i.test(p.name) ? 'image/webp' : 'image/jpeg')), label: n } : null; });
if (r.imageNames.length && loose.some((x) => !x)) notes.push('some texture images were not chosen with the file');
diff --git a/frontend/src/io/psd-read.ts b/frontend/src/io/psd-read.ts
index 7a2f203..3006fe3 100644
--- a/frontend/src/io/psd-read.ts
+++ b/frontend/src/io/psd-read.ts
@@ -1,4 +1,5 @@
import type { CmykToRgb } from './tiff-read';
+import { decodeText } from './text-decode';
export interface PsdInfo {
width: number;
@@ -153,7 +154,7 @@ class Psd {
p += 4 + ml;
p += 4 + dv.getUint32(p);
const nl = this.b[p];
- rec.name = new TextDecoder('latin1').decode(this.b.subarray(p + 1, p + 1 + nl));
+ rec.name = decodeText(this.b.subarray(p + 1, p + 1 + nl), 'macintosh');
p += 1 + nl;
p += (4 - ((1 + nl) & 3)) & 3;
while (p + 12 <= xend) {
diff --git a/frontend/src/io/zip.ts b/frontend/src/io/zip.ts
index dd923bd..ea9d4b8 100644
--- a/frontend/src/io/zip.ts
+++ b/frontend/src/io/zip.ts
@@ -1,3 +1,5 @@
+import { decodeText } from './text-decode';
+
export async function zipFiles(files: ReadonlyArray<{ name: string; blob: Blob }>): Promise {
const table = new Uint32Array(256);
for (let n = 0; n < 256; n++) { let c = n; for (let k = 0; k < 8; k++) c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1; table[n] = c >>> 0; }
@@ -35,8 +37,8 @@ export async function unzip(data: ArrayBuffer): Promise>
let at = v.getUint32(end + 16, true);
for (let k = 0; k < count; k++) {
if (at + 46 > data.byteLength || v.getUint32(at, true) !== 0x02014b50) throw new Error('a damaged ZIP directory');
- const method = v.getUint16(at + 10, true), packed = v.getUint32(at + 20, true), nameLen = v.getUint16(at + 28, true), extra = v.getUint16(at + 30, true), note = v.getUint16(at + 32, true), local = v.getUint32(at + 42, true);
- const name = dec.decode(new Uint8Array(data, at + 46, nameLen));
+ const flags = v.getUint16(at + 8, true), method = v.getUint16(at + 10, true), packed = v.getUint32(at + 20, true), nameLen = v.getUint16(at + 28, true), extra = v.getUint16(at + 30, true), note = v.getUint16(at + 32, true), local = v.getUint32(at + 42, true);
+ const nameBytes = new Uint8Array(data, at + 46, nameLen), name = flags & 0x800 ? dec.decode(nameBytes) : decodeText(nameBytes);
at += 46 + nameLen + extra + note;
if (local + 30 > data.byteLength || v.getUint32(local, true) !== 0x04034b50) throw new Error('a damaged ZIP entry');
const start = local + 30 + v.getUint16(local + 26, true) + v.getUint16(local + 28, true);
From 71a3d3d8aa7abdc6f6f4ff6e3c26e320e9945f80 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:21:18 -0500
Subject: [PATCH 14/74] fix(mcp): add_text and set_text say which characters no
installed font draws and ask for a font that covers them
---
frontend/src/automation/agent-bridge.ts | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/frontend/src/automation/agent-bridge.ts b/frontend/src/automation/agent-bridge.ts
index 006ce7b..a96b8bd 100644
--- a/frontend/src/automation/agent-bridge.ts
+++ b/frontend/src/automation/agent-bridge.ts
@@ -17,7 +17,7 @@ import { SYMBOL_REGISTRATIONS, type SymbolRegistration } from '../engine/symbols
import { BLACK, fill as fillItem, firstFill, parseColor, paintFromInput, solid, stroke as strokeItem, withFirstFill, withFirstStroke, hex } from '../engine/paint';
import { charStyleAt, DEFAULT_CHAR, layoutText, plainText, styleSpans } from '../engine/text';
import { DEFAULT_HYPH, DEFAULT_JUST } from '../engine/hyphen';
-import { variationOf } from '../io/fonts';
+import { missingGlyphs, variationOf } from '../io/fonts';
import { harmonyColors, variations, type HarmonyRule, type Variation } from '../engine/harmony';
import { CONVERT_KINDS, liveParams, type ConvertKind, type LivePatch } from '../engine/ops/live-shapes';
import { transformNode } from '../engine/transform';
@@ -248,6 +248,11 @@ export class AgentBridge {
return n.id;
}
+ private async uncovered(id: string): Promise {
+ const n = this.node(id), miss = n.kind === 'text' ? await missingGlyphs(n).catch(() => [] as string[]) : [];
+ return miss.length ? `No font on this computer draws ${miss.slice(0, 12).join(' ')}${miss.length > 12 ? ` or ${miss.length - 12} more` : ''}, so set font to a family that covers ${miss.length === 1 ? 'it' : 'them'}.` : '';
+ }
+
private describe(n: VNode): Record {
const doc = this.engine.doc;
if (!doc) return {};
@@ -842,7 +847,7 @@ export class AgentBridge {
if (mode === 'path') { const src = this.node(a.path_id); if (src.kind !== 'path') return fail('path_id must be a path.'); path = src.d; }
const id = e.addText(str('text'), num('x', 0), num('y', 0), { mode, width: num('width', 200), height: num('height', 100), path, style, para: has('align') ? { align: str('align') as 'left' } : undefined, name: str('name') || undefined, layer: this.layer(a), vertical: str('orientation') === 'vertical' });
if (!id) return fail('Could not add the type.');
- return text(`Added ${mode} type (id ${id}).`, this.describe(this.node(id)));
+ return text([`Added ${mode} type (id ${id}).`, await this.uncovered(id)].filter(Boolean).join(' '), this.describe(this.node(id)));
}
case 'edit_anchors': {
const n = this.node(a.id);
@@ -1677,7 +1682,7 @@ export class AgentBridge {
node.area = area;
}
if (Object.keys(node).length) e.setTextNode(n.id, node, has('orientation') && Object.keys(node).length === 1 ? 'Type Orientation' : cur.mode === 'path' ? 'Type on a Path Options' : cur.mode === 'area' ? 'Area Type Options' : 'Type Options');
- return text(['Changed the type.', ...notes].join(' '), this.describe(this.node(n.id)));
+ return text(['Changed the type.', ...notes, await this.uncovered(n.id)].filter(Boolean).join(' '), this.describe(this.node(n.id)));
}
case 'select_similar': {
const ref = has('id') ? this.node(a.id).id : e.selectedIds()[0];
From 21c650f97e22fe9f1711535d6e27e4149c09598b Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:21:36 -0500
Subject: [PATCH 15/74] fix(text): tab leaders, pattern names and plugin labels
from agents are cut by character, never inside one past U+FFFF
---
frontend/src/automation/agent-bridge.ts | 4 ++--
frontend/src/plugins/host.ts | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/frontend/src/automation/agent-bridge.ts b/frontend/src/automation/agent-bridge.ts
index a96b8bd..e710c94 100644
--- a/frontend/src/automation/agent-bridge.ts
+++ b/frontend/src/automation/agent-bridge.ts
@@ -639,7 +639,7 @@ export class AgentBridge {
const res = await patternVariations({ ...common, prompt: str('prompt'), colors, detail: common.detail ?? 4, density: num('density', 3), variations: Math.round(num('variations', 2)), tile: num('tile_size', 96), seamless: a.seamless !== false, layout, hs: num('h_spacing', 0), vs: num('v_spacing', 0), project: e.current });
const good = res.filter((r) => r.art);
if (!good.length) return fail(`The model gave no usable tile: ${res.map((r) => r.error).filter(Boolean).join('; ')}`);
- const base = (str('name') || str('prompt') || 'Generated Pattern').replace(/\s+/g, ' ').slice(0, 32);
+ const base = Array.from((str('name') || str('prompt') || 'Generated Pattern').replace(/\s+/g, ' ')).slice(0, 32).join('');
const fillIds = a.fill_selection === true ? (this.ids(a) ?? e.selectedIds()) : [];
const ids = e.addPatternSwatches(good.map((r, i) => ({ name: `${base} ${i + 1}`, tile: r.tile, art: r.art as VNode, type: r.layout?.type, hs: r.layout?.hs, vs: r.layout?.vs })), fillIds);
const defs = (e.doc?.patterns ?? []).filter((p) => ids.includes(p.id));
@@ -1641,7 +1641,7 @@ export class AgentBridge {
if (!t || typeof t.position !== 'number' || !Number.isFinite(t.position)) return fail('Each tab needs a position in points.');
const al = typeof t.align === 'string' ? t.align : 'left';
if (!['left', 'center', 'right', 'decimal'].includes(al)) return fail('A tab aligns left, center, right or decimal.');
- tabs.push({ pos: Math.max(0, t.position), align: al as TabStop['align'], ...(typeof t.leader === 'string' && t.leader ? { leader: t.leader.slice(0, 4) } : {}), ...(typeof t.align_on === 'string' && t.align_on ? { char: t.align_on.slice(0, 1) } : {}) });
+ tabs.push({ pos: Math.max(0, t.position), align: al as TabStop['align'], ...(typeof t.leader === 'string' && t.leader ? { leader: Array.from(t.leader).slice(0, 4).join('') } : {}), ...(typeof t.align_on === 'string' && t.align_on ? { char: [...t.align_on][0] } : {}) });
}
pp.tabs = tabs.length ? tabs : undefined;
}
diff --git a/frontend/src/plugins/host.ts b/frontend/src/plugins/host.ts
index 75f1318..74812ba 100644
--- a/frontend/src/plugins/host.ts
+++ b/frontend/src/plugins/host.ts
@@ -105,8 +105,8 @@ export class PluginHost {
case 'register': {
const cmds = Array.isArray(m.args?.commands) ? (m.args.commands as Array<{ id: string; label: string }>).slice(0, 40) : [];
for (const c of p.commands) this.commands.remove(this.id(p.name, c.id));
- p.label = String(m.args?.name ?? p.label).slice(0, 60);
- p.commands = cmds.map((c) => ({ id: String(c.id).slice(0, 60), label: String(c.label).slice(0, 80) }));
+ p.label = Array.from(String(m.args?.name ?? p.label)).slice(0, 60).join('');
+ p.commands = cmds.map((c) => ({ id: Array.from(String(c.id)).slice(0, 60).join(''), label: Array.from(String(c.label)).slice(0, 80).join('') }));
for (const c of p.commands) this.commands.add({ id: this.id(p.name, c.id), label: c.label, enabled: () => !!this.engine.current, run: () => this.run(p, c.id, c.label) });
this.onChange();
return;
From 6056baad6e7590d4c8c4a1d62171af3967489291 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:22:02 -0500
Subject: [PATCH 16/74] docs(harness): type in Chinese, Japanese, Korean and
other scripts takes a font that matches the language, and the agent reads the
note on characters no font draws
---
.../formpath-harness/sub-skills/type-and-layout/SUB-SKILL.md | 3 ++-
.../formpath-harness/sub-skills/type-and-layout/SUB-SKILL.md | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/.agents/skills/formpath-harness/sub-skills/type-and-layout/SUB-SKILL.md b/.agents/skills/formpath-harness/sub-skills/type-and-layout/SUB-SKILL.md
index ce964f5..54cf773 100644
--- a/.agents/skills/formpath-harness/sub-skills/type-and-layout/SUB-SKILL.md
+++ b/.agents/skills/formpath-harness/sub-skills/type-and-layout/SUB-SKILL.md
@@ -16,9 +16,10 @@ Positions and type sizes are in the plan.
## Procedure
1. **Point type** for titles and labels: `add_text` with x and the baseline y, `font` (Inter is always present), `style` (Regular, Bold, or a weight such as 600), `size` in points, `color` (black when omitted), `align`.
+ - **Chinese, Japanese, Korean and other non-Latin scripts**: set `font` to an installed family that covers the script and matches the language: Traditional Chinese Microsoft JhengHei (Windows), PingFang TC (macOS) or Noto Sans CJK TC; Simplified Chinese Microsoft YaHei, PingFang SC or Noto Sans CJK SC; Japanese Yu Gothic, Hiragino Sans or Noto Sans CJK JP; Korean Malgun Gothic, Apple SD Gothic Neo or Noto Sans CJK KR. Pass the words as plain Unicode, never escaped or transliterated, and read the result of `add_text`: when it says no font on this computer draws some characters, set `font` to a family that covers them.
2. **Area type** for paragraphs: `mode` area with x, y, width, height; text wraps in the frame. `set_text` with `area_rows`, `area_columns`, `area_row_gutter`, `area_gutter`, `area_inset` and `area_flow` splits the frame into a grid; `first_baseline` (ascent, cap, leading, x, em, fixed, legacy) with `first_baseline_min` sets how far the first line sits below the top.
3. **Type on a path**: draw the path, then `add_text` mode path with `path_id`. `set_text` with `path_effect` (rainbow, skew, ribbon, stair, gravity), `path_flip`, `path_align` (baseline, ascender, descender, center), `path_spacing` and `path_start` / `path_end` (fractions of the path) shapes and places it.
- - **Vertical type** for Japanese, Chinese and Korean: `add_text` with `orientation` vertical (point, area or path); columns run right to left, CJK stands upright and Latin turns 90 degrees clockwise (`set_text` `upright_latin` true stands it upright). Use a CJK font such as Noto Sans CJK JP so outlines and PDF carry every glyph; `set_text` `orientation` switches an existing object.
+ - **Vertical type** for Japanese, Chinese and Korean: `add_text` with `orientation` vertical (point, area or path); columns run right to left, CJK stands upright and Latin turns 90 degrees clockwise (`set_text` `upright_latin` true stands it upright). Use a CJK font that matches the language (as in step 1: Noto Sans CJK TC or SC for Chinese, JP for Japanese, KR for Korean) so outlines and PDF carry every glyph; `set_text` `orientation` switches an existing object.
4. **Edit**: `set_text` changes the words or styles a range (`start`, `end`), for example one word in a different colour. `caps` small gives small capitals; `features` turns on OpenType features (`frac` for fractions, `tnum` for tabular figures in tables, `liga`, `onum`, `ss01` and so on) where the font has them. `find_font` lists the fonts in use and replaces one everywhere.
5. **Spacing**: `tracking` in thousandths of an em (50 to 200 for spaced capitals), `leading` in points (about 1.2 times the size). `kerning` optical evens pairs from the letter shapes (good for display type and fonts with weak kerning).
- **Variable fonts**: with an installed variable font (find_font lists fonts in use; the result of `set_text` notes when a font has no axes), `axes` sets values by tag for a range, for example {"wght": 650} or {"wdth": 85}; {} returns to the default instance. A named instance also works as `style` (SemiBold).
diff --git a/.claude/skills/formpath-harness/sub-skills/type-and-layout/SUB-SKILL.md b/.claude/skills/formpath-harness/sub-skills/type-and-layout/SUB-SKILL.md
index ce964f5..54cf773 100644
--- a/.claude/skills/formpath-harness/sub-skills/type-and-layout/SUB-SKILL.md
+++ b/.claude/skills/formpath-harness/sub-skills/type-and-layout/SUB-SKILL.md
@@ -16,9 +16,10 @@ Positions and type sizes are in the plan.
## Procedure
1. **Point type** for titles and labels: `add_text` with x and the baseline y, `font` (Inter is always present), `style` (Regular, Bold, or a weight such as 600), `size` in points, `color` (black when omitted), `align`.
+ - **Chinese, Japanese, Korean and other non-Latin scripts**: set `font` to an installed family that covers the script and matches the language: Traditional Chinese Microsoft JhengHei (Windows), PingFang TC (macOS) or Noto Sans CJK TC; Simplified Chinese Microsoft YaHei, PingFang SC or Noto Sans CJK SC; Japanese Yu Gothic, Hiragino Sans or Noto Sans CJK JP; Korean Malgun Gothic, Apple SD Gothic Neo or Noto Sans CJK KR. Pass the words as plain Unicode, never escaped or transliterated, and read the result of `add_text`: when it says no font on this computer draws some characters, set `font` to a family that covers them.
2. **Area type** for paragraphs: `mode` area with x, y, width, height; text wraps in the frame. `set_text` with `area_rows`, `area_columns`, `area_row_gutter`, `area_gutter`, `area_inset` and `area_flow` splits the frame into a grid; `first_baseline` (ascent, cap, leading, x, em, fixed, legacy) with `first_baseline_min` sets how far the first line sits below the top.
3. **Type on a path**: draw the path, then `add_text` mode path with `path_id`. `set_text` with `path_effect` (rainbow, skew, ribbon, stair, gravity), `path_flip`, `path_align` (baseline, ascender, descender, center), `path_spacing` and `path_start` / `path_end` (fractions of the path) shapes and places it.
- - **Vertical type** for Japanese, Chinese and Korean: `add_text` with `orientation` vertical (point, area or path); columns run right to left, CJK stands upright and Latin turns 90 degrees clockwise (`set_text` `upright_latin` true stands it upright). Use a CJK font such as Noto Sans CJK JP so outlines and PDF carry every glyph; `set_text` `orientation` switches an existing object.
+ - **Vertical type** for Japanese, Chinese and Korean: `add_text` with `orientation` vertical (point, area or path); columns run right to left, CJK stands upright and Latin turns 90 degrees clockwise (`set_text` `upright_latin` true stands it upright). Use a CJK font that matches the language (as in step 1: Noto Sans CJK TC or SC for Chinese, JP for Japanese, KR for Korean) so outlines and PDF carry every glyph; `set_text` `orientation` switches an existing object.
4. **Edit**: `set_text` changes the words or styles a range (`start`, `end`), for example one word in a different colour. `caps` small gives small capitals; `features` turns on OpenType features (`frac` for fractions, `tnum` for tabular figures in tables, `liga`, `onum`, `ss01` and so on) where the font has them. `find_font` lists the fonts in use and replaces one everywhere.
5. **Spacing**: `tracking` in thousandths of an em (50 to 200 for spaced capitals), `leading` in points (about 1.2 times the size). `kerning` optical evens pairs from the letter shapes (good for display type and fonts with weak kerning).
- **Variable fonts**: with an installed variable font (find_font lists fonts in use; the result of `set_text` notes when a font has no axes), `axes` sets values by tag for a range, for example {"wght": 650} or {"wdth": 85}; {} returns to the default instance. A named instance also works as `style` (SemiBold).
From 38172a0618b89844a1dac18dcad77d4895dc7b10 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:23:58 -0500
Subject: [PATCH 17/74] fix(package): the zip summary keeps whole missing names
that fit and counts the rest, and a summary that cannot be read no longer
fails the package
---
backend/app/routers/projects.py | 25 ++++++++++++++++++++++++-
frontend/src/io/package.ts | 8 +++++---
2 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/backend/app/routers/projects.py b/backend/app/routers/projects.py
index 3cbb4d2..293726f 100644
--- a/backend/app/routers/projects.py
+++ b/backend/app/routers/projects.py
@@ -192,6 +192,29 @@ def _json_list(raw: str, what: str) -> list:
return value
+SUMMARY_HEADER_CHARS = 4000
+
+
+def _summary_header(summary: dict) -> str:
+ head = {k: v for k, v in summary.items() if k != "files"}
+ text = json.dumps(head)
+ if len(text) <= SUMMARY_HEADER_CHARS:
+ return text
+ full = {k: list(head.get(k) or []) for k in ("missingLinks", "missingFonts")}
+ kept: dict[str, list] = {k: [] for k in full}
+ head.update(kept)
+ head["missingMore"] = sum(len(v) for v in full.values())
+ for key in ("missingFonts", "missingLinks"):
+ for entry in full[key]:
+ kept[key].append(entry)
+ head["missingMore"] -= 1
+ if len(json.dumps(head)) > SUMMARY_HEADER_CHARS:
+ kept[key].pop()
+ head["missingMore"] += 1
+ break
+ return json.dumps(head)
+
+
@router.post("/package-full")
def package_full(
request: Request,
@@ -241,7 +264,7 @@ def package_full(
except OSError as exc:
raise HTTPException(status_code=400, detail=f"formpath could not write the package: {exc.strerror or exc}. Choose a folder you can write to.") from exc
if blob is not None:
- return Response(blob, media_type="application/zip", headers={"X-Package-Summary": json.dumps({k: v for k, v in summary.items() if k != "files"})[:4000]})
+ return Response(blob, media_type="application/zip", headers={"X-Package-Summary": _summary_header(summary)})
return Response(json.dumps(summary), media_type="application/json")
diff --git a/frontend/src/io/package.ts b/frontend/src/io/package.ts
index 2fd9124..2326366 100644
--- a/frontend/src/io/package.ts
+++ b/frontend/src/io/package.ts
@@ -14,7 +14,7 @@ export interface PackageOptions {
report: boolean;
zip?: boolean;
}
-export interface PackageResult { links: number; fonts: number; missingLinks: string[]; missingFonts: string[]; files?: string[]; folder?: string; zip?: Blob }
+export interface PackageResult { links: number; fonts: number; missingLinks: string[]; missingFonts: string[]; missingMore?: number; files?: string[]; folder?: string; zip?: Blob }
export async function packageProject(p: Project, o: PackageOptions): Promise {
const { manifest, files } = serialize(p);
@@ -40,8 +40,10 @@ export async function packageProject(p: Project, o: PackageOptions): Promise
Date: Thu, 26 Nov 2026 13:20:08 -0500
Subject: [PATCH 18/74] fix(keys): letter shortcuts follow the letter on the
key, so AZERTY, QWERTZ and Dvorak run the command they show
---
frontend/src/app.ts | 2 +-
frontend/src/dock-adapter.ts | 2 +-
frontend/src/ui/commands.ts | 2 +-
frontend/src/ui/text-editor.ts | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/frontend/src/app.ts b/frontend/src/app.ts
index 555c7bd..edb0490 100644
--- a/frontend/src/app.ts
+++ b/frontend/src/app.ts
@@ -2124,7 +2124,7 @@ export function startApp(): void {
window.addEventListener('keyup', (e) => { if (e.code === 'Space') stage.setSpace(false); });
window.addEventListener('blur', () => stage.setSpace(false));
function comboOfTool(e: KeyboardEvent): string {
- const k = e.code.startsWith('Key') ? e.code.slice(3) : e.code === 'Backslash' ? '\\' : e.code === 'Equal' ? '=' : e.code === 'Minus' ? '-' : e.code === 'Backquote' ? '~' : e.key;
+ const k = /^[a-z]$/i.test(e.key) ? e.key.toUpperCase() : e.code.startsWith('Key') ? e.code.slice(3) : e.code === 'Backslash' ? '\\' : e.code === 'Equal' ? '=' : e.code === 'Minus' ? '-' : e.code === 'Backquote' ? '~' : e.key;
return `${e.altKey ? 'Alt+' : ''}${e.shiftKey ? 'Shift+' : ''}${k}`;
}
diff --git a/frontend/src/dock-adapter.ts b/frontend/src/dock-adapter.ts
index ac87504..b0f281c 100644
--- a/frontend/src/dock-adapter.ts
+++ b/frontend/src/dock-adapter.ts
@@ -116,7 +116,7 @@ export function formpathDock(deps: DockDeps): DockAdapter<'antigravity'> {
sizes: { minHeight: 120, maxHeightShare: 0.7, defaultHeight: 280, minWidth: 320, maxWidthShare: 0.4, defaultWidth: 420 },
canDockRight: () => window.innerWidth >= DOCK_RIGHT_MIN,
},
- isDockChord: (e) => (isMac ? e.metaKey : e.ctrlKey) && e.altKey && e.shiftKey && e.code === 'KeyT',
+ isDockChord: (e) => (isMac ? e.metaKey : e.ctrlKey) && e.altKey && e.shiftKey && (/^[a-z]$/i.test(e.key) ? e.key.toUpperCase() === 'T' : e.code === 'KeyT'),
chordLabel: () => `${chord}T`,
tabs: () => ({ builtin: ['chat', 'shell', 'claude', 'codex', 'cursor', 'antigravity'] }),
classes: { iconButton: 'cv-icon-btn', button: 'cv-btn', primaryButton: 'cv-btn-primary', input: 'cv-input', select: 'cv-input', note: 'cv-note' },
diff --git a/frontend/src/ui/commands.ts b/frontend/src/ui/commands.ts
index c464e11..b45ac98 100644
--- a/frontend/src/ui/commands.ts
+++ b/frontend/src/ui/commands.ts
@@ -32,7 +32,7 @@ const CODE_KEYS: Record = {
export function comboOf(e: KeyboardEvent): string {
const c = e.code;
- const key = c.startsWith('Key') ? c.slice(3) : c.startsWith('Digit') ? c.slice(5) : c.startsWith('Numpad') && /\d$/.test(c) ? c.slice(6) : CODE_KEYS[c] ?? e.key;
+ const key = /^[a-z]$/i.test(e.key) ? e.key.toUpperCase() : c.startsWith('Key') ? c.slice(3) : c.startsWith('Digit') ? c.slice(5) : c.startsWith('Numpad') && /\d$/.test(c) ? c.slice(6) : CODE_KEYS[c] ?? e.key;
const parts: string[] = [];
if (e.altKey) parts.push('Alt');
if (e.shiftKey) parts.push('Shift');
diff --git a/frontend/src/ui/text-editor.ts b/frontend/src/ui/text-editor.ts
index 72593ba..9a9aa47 100644
--- a/frontend/src/ui/text-editor.ts
+++ b/frontend/src/ui/text-editor.ts
@@ -230,8 +230,8 @@ export class TextEditor {
case 'Home': e.preventDefault(); this.move(this.lineEdge(false), e.shiftKey); return;
case 'End': e.preventDefault(); this.move(this.lineEdge(true), e.shiftKey); return;
}
- if (mod && !e.altKey && e.code === 'KeyA') { e.preventDefault(); this.selectAll(); return; }
- if (mod && !e.altKey && e.code === 'KeyZ') { e.preventDefault(); if (e.shiftKey) this.engine.redo(); else this.engine.undo(); return; }
+ if (mod && !e.altKey && (/^[a-z]$/i.test(e.key) ? e.key.toUpperCase() === 'A' : e.code === 'KeyA')) { e.preventDefault(); this.selectAll(); return; }
+ if (mod && !e.altKey && (/^[a-z]$/i.test(e.key) ? e.key.toUpperCase() === 'Z' : e.code === 'KeyZ')) { e.preventDefault(); if (e.shiftKey) this.engine.redo(); else this.engine.undo(); return; }
}
private place(): void {
From 0f008cf5ecba0f63a7942dcfce675377ff65377b Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:20:08 -0500
Subject: [PATCH 19/74] fix(menu): the macOS menu bar takes only Cmd, Ctrl and
function key shortcuts, so Backspace and Tab stay with the page
---
frontend/src/ui/native-menu.ts | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/frontend/src/ui/native-menu.ts b/frontend/src/ui/native-menu.ts
index b710b7b..1f4854b 100644
--- a/frontend/src/ui/native-menu.ts
+++ b/frontend/src/ui/native-menu.ts
@@ -24,6 +24,16 @@ export function accelerator(combo: string | undefined): string | null {
return out.join('+');
}
+export function menuAccelerator(keys: string[] | undefined): string | null {
+ for (const k of keys ?? []) {
+ const parts = k.split('+');
+ if (!parts.includes('Mod') && !parts.includes('Ctrl') && !parts.some((p) => /^F([1-9]|1[0-2])$/.test(p))) continue;
+ const acc = accelerator(k);
+ if (acc) return acc;
+ }
+ return null;
+}
+
type Api = typeof import('@tauri-apps/api/menu');
const TEXT_EDITS = new Set(['undo', 'redo', 'cut', 'copy', 'paste', 'select-all']);
@@ -57,7 +67,7 @@ export class NativeMenus {
if (typeof spec === 'object') return api.Submenu.new({ text: t(spec.label), items: (await Promise.all(spec.items.map(make))) as never[] });
const cmd = this.commands.get(spec);
if (!cmd) return null;
- const text = t(this.commands.label(cmd)), acc = accelerator(cmd.keys?.[0]);
+ const text = t(this.commands.label(cmd)), acc = menuAccelerator(cmd.keys);
const opts = { text, enabled: this.enabled(spec), action: () => {
if (TEXT_EDITS.has(spec) && textFieldFocused()) void import('@tauri-apps/api/core').then((m) => m.invoke('text_edit', { action: spec })).catch(() => { document.execCommand(spec === 'select-all' ? 'selectAll' : spec); });
else this.commands.run(spec);
From c3ab5f51c050055062f576919d6982f4ee9eb79b Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:20:08 -0500
Subject: [PATCH 20/74] fix(spelling): Check Spelling and Auto Spell Check use
the dictionary of the interface language
---
frontend/src/ui/panels/spelling.ts | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/frontend/src/ui/panels/spelling.ts b/frontend/src/ui/panels/spelling.ts
index e7aa715..bd0892b 100644
--- a/frontend/src/ui/panels/spelling.ts
+++ b/frontend/src/ui/panels/spelling.ts
@@ -5,6 +5,7 @@ import { walk } from '../../engine/doc';
import { deleteText, insertText, plainText } from '../../engine/text';
import { Dialog } from '../dialogs';
import { el, patchList, q, setDisabled, setText } from '../dom';
+import { language } from '../../i18n';
export interface MisspelledRange { start: number; end: number; word: string; suggestions: string[] }
@@ -31,7 +32,7 @@ async function lookup(words: string[], lang: string): Promise {
for (const w of fresh) known.set(w, by.get(w) ?? null);
}
-export async function misspelledRanges(text: string, lang = 'en'): Promise {
+export async function misspelledRanges(text: string, lang = language()): Promise {
const toks = wordsOf(text);
await lookup(toks.map((t) => t.word), lang);
const out: MisspelledRange[] = [];
@@ -54,7 +55,7 @@ export class SpellingDialog extends Dialog {
private pos = { order: -1, start: -1 };
private busy = false;
- constructor(private readonly engine: Engine, private readonly lang = 'en') {
+ constructor(private readonly engine: Engine, private readonly lang = language()) {
super('Check Spelling', 640);
this.body.append(el('Not in dictionary
'), el('
'));
const ctx = q(this.body, '.cv-spell-context');
From 004077977ae670433a4748734209e9f5d25fee15 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:21:49 -0500
Subject: [PATCH 21/74] fix(i18n): an object's own name in the Properties head,
the status bar and the Appearance head is shown as written, not translated
---
frontend/src/engine/doc.ts | 2 ++
frontend/src/ui/dom.ts | 7 +++++++
frontend/src/ui/panels/appearance.ts | 8 ++++----
frontend/src/ui/properties.ts | 6 +++---
frontend/src/ui/status.ts | 6 +++---
5 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/frontend/src/engine/doc.ts b/frontend/src/engine/doc.ts
index 2e695a3..1155c4f 100644
--- a/frontend/src/engine/doc.ts
+++ b/frontend/src/engine/doc.ts
@@ -198,3 +198,5 @@ export function nodeLabel(n: VNode): string {
case 'repeat': return `Repeat ${n.spec.kind[0].toUpperCase()}${n.spec.kind.slice(1)}`;
}
}
+
+export const ownLabel = (n: VNode): boolean => !!n.name || (n.kind === 'text' && n.spans.some((s) => /\S/.test(s.text)));
diff --git a/frontend/src/ui/dom.ts b/frontend/src/ui/dom.ts
index 62c2b6c..7914268 100644
--- a/frontend/src/ui/dom.ts
+++ b/frontend/src/ui/dom.ts
@@ -67,6 +67,13 @@ export function setText(el: Element | null, text: string): void {
if (el && el.textContent !== text) el.textContent = text;
}
+export function setOwnText(el: Element, text: string, own: boolean): void {
+ const flip = el.hasAttribute('translate') !== own;
+ if (flip && own) el.setAttribute('translate', 'no');
+ else if (flip) el.removeAttribute('translate');
+ if (flip || el.textContent !== text) el.textContent = text;
+}
+
export function setClass(el: Element | null, cls: string, on: boolean): void {
if (!el) return;
if (el.classList.contains(cls) !== on) el.classList.toggle(cls, on);
diff --git a/frontend/src/ui/panels/appearance.ts b/frontend/src/ui/panels/appearance.ts
index 36dc41a..6c1f00d 100644
--- a/frontend/src/ui/panels/appearance.ts
+++ b/frontend/src/ui/panels/appearance.ts
@@ -1,10 +1,10 @@
-import { nodeLabel } from '../../engine/doc';
+import { nodeLabel, ownLabel } from '../../engine/doc';
import { effectDef } from '../../engine/effects';
import { basicAppearance, emptyAppearance, fill, NONE, solid, stroke, BLACK, WHITE } from '../../engine/paint';
import { renderNode } from '../../engine/render';
import type { Appearance, Color, Effect, Engine, GraphicStyle, Paint, VNode } from '../../engine';
import { STYLE_LIBRARIES } from '../../engine/style-libraries';
-import { el, patchList, q, setClass, setDisabled, setHidden, setStyleVar, setText, setTitle } from '../dom';
+import { el, patchList, q, setClass, setDisabled, setHidden, setOwnText, setStyleVar, setText, setTitle } from '../dom';
import { icon } from '../icons';
import { askForm } from '../form-dialog';
import { paintCss } from '../rail';
@@ -152,8 +152,8 @@ export class AppearancePanel {
const n = this.target(), count = this.engine.selected().length, layer = n?.kind === 'layer';
if (!n || n.id !== this.pickedFor) { this.picked = null; this.pickedFor = n?.id ?? null; }
const linked = this.engine.graphicStyleOf(n), style = linked ? this.engine.doc?.styles.find((s) => s.id === linked)?.name ?? '' : '';
- setText(q(this.head, '.cv-appp-kind'), n ? (layer ? 'Layer' : count > 1 ? 'Mixed Objects' : n.kind === 'path' ? 'Path' : n.kind === 'text' ? 'Type' : nodeLabel(n)) : 'No Selection');
- setText(q(this.head, '.cv-appp-name'), n && (layer || count === 1) ? [layer ? nodeLabel(n) : n.name ?? '', style].filter(Boolean).join(' · ') : '');
+ setOwnText(q(this.head, '.cv-appp-kind'), n ? (layer ? 'Layer' : count > 1 ? 'Mixed Objects' : n.kind === 'path' ? 'Path' : n.kind === 'text' ? 'Type' : nodeLabel(n)) : 'No Selection', !!n && !layer && count <= 1 && n.kind !== 'path' && n.kind !== 'text' && ownLabel(n));
+ setOwnText(q(this.head, '.cv-appp-name'), n && (layer || count === 1) ? [layer ? nodeLabel(n) : n.name ?? '', style].filter(Boolean).join(' · ') : '', !!n && (layer || count === 1) && !!n.name);
patchList(this.list, this.rows(), {
key: (r) => r.key,
create: (r) => { const row = el(`${icon('eye', 14)}
`); this.fill(row, r); return row; },
diff --git a/frontend/src/ui/properties.ts b/frontend/src/ui/properties.ts
index 1a267ca..90857fa 100644
--- a/frontend/src/ui/properties.ts
+++ b/frontend/src/ui/properties.ts
@@ -1,10 +1,10 @@
-import { nodeLabel } from '../engine/doc';
+import { nodeLabel, ownLabel } from '../engine/doc';
import { firstFill, firstStroke } from '../engine/paint';
import type { Engine, Rect, ShapeMode, Units } from '../engine';
import { PanelGroup } from './panel-group';
import type { AlignAction } from '../engine/ops/objects';
import type { PathfinderOp } from '../engine/ops/paths';
-import { el, q, setClass, setDisabled, setHidden, setHtml, setStyleVar, setText } from './dom';
+import { el, q, setClass, setDisabled, setHidden, setHtml, setOwnText, setStyleVar, setText } from './dom';
import { icon } from './icons';
import { paintCss } from './rail';
import { check, iconButton, numField, row, section, seg, selectCtl, slider } from './panels/kit';
@@ -193,7 +193,7 @@ export class PropertiesPanel {
for (const b of this.docButtons) setDisabled(b, !p);
const tile = q(this.head, '.cv-props-tile');
setHtml(tile, icon(!p ? 'newFile' : !has ? 'pArtboards' : sel.length > 1 ? 'layers' : n.kind === 'text' ? 'vType' : n.kind === 'group' ? 'folder' : n.kind === 'image' ? 'image' : n.kind === 'symbol' ? 'pSymbols' : 'vPen', 18), !p ? 'none' : !has ? 'doc' : sel.length > 1 ? 'many' : n.kind);
- setText(q(this.head, '.cv-props-name'), !p ? 'No Document' : !has ? 'Document' : sel.length > 1 ? `${sel.length} Objects` : nodeLabel(n));
+ setOwnText(q(this.head, '.cv-props-name'), !p ? 'No Document' : !has ? 'Document' : sel.length > 1 ? `${sel.length} Objects` : nodeLabel(n), !!p && sel.length === 1 && ownLabel(n));
if (has) {
this.xform.sync();
setHidden(this.shapeHead, !this.shape.sync());
diff --git a/frontend/src/ui/status.ts b/frontend/src/ui/status.ts
index ab78453..27492bb 100644
--- a/frontend/src/ui/status.ts
+++ b/frontend/src/ui/status.ts
@@ -1,7 +1,7 @@
-import { allNodes, nodeLabel } from '../engine/doc';
+import { allNodes, nodeLabel, ownLabel } from '../engine/doc';
import type { Engine, Pt } from '../engine';
import { getTool } from '../extensions/registry';
-import { el, pendingClass, q, setClass, setDisabled, setText, setTitle, setValue, type Disposer } from './dom';
+import { el, pendingClass, q, setClass, setDisabled, setOwnText, setText, setTitle, setValue, type Disposer } from './dom';
import { t } from '../i18n';
import { icon } from './icons';
@@ -187,7 +187,7 @@ export class StatusBar {
this.syncInfo();
this.syncHint();
const sel = e.selected();
- setText(this.sel, sel.length === 1 ? nodeLabel(sel[0]) : sel.length ? `${sel.length} objects` : '');
+ setOwnText(this.sel, sel.length === 1 ? nodeLabel(sel[0]) : sel.length ? `${sel.length} objects` : '', sel.length === 1 && ownLabel(sel[0]));
this.syncPos();
}
}
From c526cb20158c398d06019e7e3cf424ab79a38750 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:22:38 -0500
Subject: [PATCH 22/74] fix(text): names shortened for a message, a project, a
file, an action set, a pattern or a width profile never end in half a
character
---
frontend/src/engine/doc.ts | 4 +++-
frontend/src/engine/index.ts | 6 +++---
frontend/src/engine/variables.ts | 4 ++--
frontend/src/io/gen-options.ts | 3 ++-
frontend/src/io/width-profiles.ts | 3 ++-
frontend/src/ui/panels/actions.ts | 4 ++--
frontend/src/ui/panels/generative.ts | 3 ++-
7 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/frontend/src/engine/doc.ts b/frontend/src/engine/doc.ts
index 1155c4f..7499f32 100644
--- a/frontend/src/engine/doc.ts
+++ b/frontend/src/engine/doc.ts
@@ -182,6 +182,8 @@ export function inDocOrder(doc: Doc, ids: Iterable): string[] {
return [...new Set(ids)].filter((id) => idx.has(id)).sort((a, b) => comparePaths(idx.get(a) as IndexPath, idx.get(b) as IndexPath));
}
+export const clip = (s: string, n: number): string => s.slice(0, n > 0 && /[\ud800-\udbff]/.test(s[n - 1] ?? '') ? n - 1 : n);
+
export function nodeLabel(n: VNode): string {
if (n.name) return n.name;
switch (n.kind) {
@@ -189,7 +191,7 @@ export function nodeLabel(n: VNode): string {
case 'group': return n.clip ? 'Clip Group' : 'Group';
case 'path': return n.live ? ({ rect: 'Rectangle', ellipse: 'Ellipse', polygon: 'Polygon', star: 'Star', line: 'Line' }[n.live.kind]) : n.guide ? 'Guide' : 'Path';
case 'compound': return 'Compound Path';
- case 'text': { const t = n.spans.map((s) => s.text).join('').replace(/\s+/g, ' ').trim(); return t ? (t.length > 28 ? t.slice(0, /[\ud800-\udbff]/.test(t[27]) ? 27 : 28) + '…' : t) : 'Type'; }
+ case 'text': { const t = n.spans.map((s) => s.text).join('').replace(/\s+/g, ' ').trim(); return t ? (t.length > 28 ? clip(t, 28) + '…' : t) : 'Type'; }
case 'image': return 'Image';
case 'symbol': return 'Symbol';
case 'blend': return 'Blend';
diff --git a/frontend/src/engine/index.ts b/frontend/src/engine/index.ts
index 213f9cf..0def622 100644
--- a/frontend/src/engine/index.ts
+++ b/frontend/src/engine/index.ts
@@ -1,6 +1,6 @@
import { geomBounds, invalidateBounds, nodePath, selectionBounds, visualBounds } from './bounds';
import { artGuides, bristleKind, defaultBrushes, TILE_KEYS } from './brushes';
-import { allNodes, ancestors, childrenOf, cloneNode, findNode, inDocOrder, insertInto, isContainer, isLocked, isVisible, layerOf, makeLayer, newDoc, newId, nodeAt, nodeLabel, pathOf, removeNodes, topObjects, topSelectable, updateNodes, walk, type IndexPath } from './doc';
+import { allNodes, ancestors, childrenOf, clip, cloneNode, findNode, inDocOrder, insertInto, isContainer, isLocked, isVisible, layerOf, makeLayer, newDoc, newId, nodeAt, nodeLabel, pathOf, removeNodes, topObjects, topSelectable, updateNodes, walk, type IndexPath } from './doc';
import { EFFECT_IDS, effectDef, effectDefaults, has3d, onTraceReady, setTraceDraft, flipProfile, normalizeWidthPoints, widthProfileNamed } from './effects';
import { invalidateLayers } from './render';
import { Emitter } from './events';
@@ -1066,7 +1066,7 @@ export class Engine extends Emitter {
const made = new Map();
for (const t of texts) {
const d = await provider(t);
- if (!d || !d.length) { this.notice(`The outlines of “${plainText(t).slice(0, 30)}” need its font, ${t.spans[0]?.style.font}, which formpath could not load.`, 'error'); continue; }
+ if (!d || !d.length) { this.notice(`The outlines of “${clip(plainText(t), 30)}” need its font, ${t.spans[0]?.style.font}, which formpath could not load.`, 'error'); continue; }
const st = t.spans[0]?.style ?? DEFAULT_CHAR;
const items = [...(st.fill.type !== 'none' ? [fill(st.fill)] : []), ...(st.stroke.type !== 'none' ? [stroke(st.stroke, st.strokeWidth)] : []), ...t.ap.items];
made.set(t.id, { id: newId('c'), kind: 'compound', rule: 'nonzero', children: d.map((sp) => ({ id: newId(), kind: 'path', d: [sp], rule: 'nonzero', opacity: 1, blend: 'normal', ap: emptyAppearance() })), opacity: t.opacity, blend: t.blend, ap: { items, effects: t.ap.effects }, name: t.name });
@@ -2138,7 +2138,7 @@ export class Engine extends Emitter {
if (!p) return null;
const st = p.history.stateAt(index ?? p.history.steps().current);
if (!st) return null;
- const q = this.addProject(st.doc, `${p.name} ${st.name}`.slice(0, 80));
+ const q = this.addProject(st.doc, clip(`${p.name} ${st.name}`, 80));
for (const [k, b] of p.assets) q.assets.set(k, b);
q.history.markUnsaved();
this.emit('projects', null);
diff --git a/frontend/src/engine/variables.ts b/frontend/src/engine/variables.ts
index 484173d..23dc797 100644
--- a/frontend/src/engine/variables.ts
+++ b/frontend/src/engine/variables.ts
@@ -1,4 +1,4 @@
-import { findNode, newId, nodeLabel, updateNodes } from './doc';
+import { clip, findNode, newId, nodeLabel, updateNodes } from './doc';
import { cleanData, parseGrid, parseTable } from './graph';
import { plainText, setPlainText } from './text';
import type { DataSet, Doc, GraphData, ImageAsset, Mat, Variable, VariableKind, VariableValue, VNode } from './types';
@@ -121,6 +121,6 @@ export function boundLabel(doc: Doc, v: Variable): string { const n = v.node ? f
export function fileStem(doc: Doc, set: DataSet, varName: string | null, index: number): string {
const v = varName ? (doc.variables ?? []).find((x) => x.name === varName) : null;
const raw = v ? set.values[v.id] : set.name;
- const s = (typeof raw === 'string' || typeof raw === 'boolean' ? String(raw) : set.name).replace(/[\\/:*?"<>|\n\r\t]+/g, '-').trim().slice(0, 120);
+ const s = clip((typeof raw === 'string' || typeof raw === 'boolean' ? String(raw) : set.name).replace(/[\\/:*?"<>|\n\r\t]+/g, '-').trim(), 120);
return s || `data-set-${index + 1}`;
}
diff --git a/frontend/src/io/gen-options.ts b/frontend/src/io/gen-options.ts
index 542d50b..4784df0 100644
--- a/frontend/src/io/gen-options.ts
+++ b/frontend/src/io/gen-options.ts
@@ -1,5 +1,6 @@
import { geomBounds } from '../engine/bounds';
import { effectDefaults } from '../engine/effects';
+import { clip } from '../engine/doc';
import { collectColors, fitRowsToPalette, mapNodeColors, nearestFn, oklab, reduceRows, rowsFn, samplePalette } from '../engine/ops/recolor';
import { hex, parseColor } from '../engine/paint';
import type { Color, Doc, Effect, ImageNode, Project, Rect, VNode } from '../engine';
@@ -202,7 +203,7 @@ function summarize(doc: Doc, nodes: VNode[], box: Rect): string {
const pad = ' '.repeat(depth);
if (n.kind === 'group' || n.kind === 'layer') {
count++;
- const nm = n.name ? ` name="${n.name.replace(/[<>"&]/g, '').slice(0, 30)}"` : '';
+ const nm = n.name ? ` name="${clip(n.name.replace(/[<>"&]/g, ''), 30)}"` : '';
lines.push(`${pad}`);
if (depth < 3) walk(n.children, depth + 1); else lines.push(`${pad} `);
lines.push(`${pad} `);
diff --git a/frontend/src/io/width-profiles.ts b/frontend/src/io/width-profiles.ts
index dcd6d58..45ad6fc 100644
--- a/frontend/src/io/width-profiles.ts
+++ b/frontend/src/io/width-profiles.ts
@@ -1,4 +1,5 @@
import { CUSTOM_WIDTH_PROFILES, normalizeWidthPoints, WIDTH_PROFILES } from '../engine/effects';
+import { clip } from '../engine/doc';
import type { WidthPoint } from '../engine/types';
const KEY = 'formpath.widthProfiles';
@@ -22,7 +23,7 @@ export const isCustomProfile = (name: string): boolean => Object.prototype.hasOw
export const onWidthProfiles = (fn: () => void): void => { listeners.add(fn); };
export function saveWidthProfile(name: string, pts: ReadonlyArray>): string | null {
- const key = name.trim().slice(0, 60);
+ const key = clip(name.trim(), 60);
if (!key || clash(key) || !pts.length) return null;
CUSTOM_WIDTH_PROFILES[key] = normalizeWidthPoints(pts);
persist();
diff --git a/frontend/src/ui/panels/actions.ts b/frontend/src/ui/panels/actions.ts
index 42e3a58..29b5bca 100644
--- a/frontend/src/ui/panels/actions.ts
+++ b/frontend/src/ui/panels/actions.ts
@@ -1,5 +1,5 @@
import type { Engine, RecordedOp } from '../../engine';
-import { newId } from '../../engine/doc';
+import { clip, newId } from '../../engine/doc';
import { reflow } from '../../engine/flow';
import { applyDataSetDoc, fileStem } from '../../engine/variables';
import { api, engineStatus } from '../../io/api';
@@ -67,7 +67,7 @@ function validSet(x: unknown): ActionSet | null {
id: typeof a.id === 'string' ? a.id : newId('a'), name: a.name,
steps: a.steps.filter((s) => s && typeof s === 'object' && ['command', 'op', 'stop'].includes((s as ActionStep).kind)).map((s) => ({ ...s, on: (s as ActionStep).on !== false })) as ActionStep[],
}));
- return { id: newId('as'), name: o.name.slice(0, 80), actions };
+ return { id: newId('as'), name: clip(o.name, 80), actions };
}
interface Row { key: string; level: 0 | 1 | 2; label: string; set: ActionSet; action?: Action; step?: number }
diff --git a/frontend/src/ui/panels/generative.ts b/frontend/src/ui/panels/generative.ts
index 1581a18..7193cff 100644
--- a/frontend/src/ui/panels/generative.ts
+++ b/frontend/src/ui/panels/generative.ts
@@ -1,5 +1,6 @@
import type { Engine, Project, Rect, VNode } from '../../engine';
import { geomBounds } from '../../engine/bounds';
+import { clip } from '../../engine/doc';
import { clipToShape, artParts, modelState, PATTERN_LAYOUTS, patternVariations, shapeFillVariations, strengthMode, type ModelState, type PatternLayout, type PatternVariation, type Variation } from '../../io/generative';
import { reportText } from '../../io/gen-repair';
import { GenOptionsUi } from './gen-options';
@@ -219,7 +220,7 @@ export class PatternGenPanel extends ModelPanel {
}
private saveSwatches(): void {
- const base = (this.prompt.value.trim() || 'Generated Pattern').replace(/\s+/g, ' ').slice(0, 32);
+ const base = clip((this.prompt.value.trim() || 'Generated Pattern').replace(/\s+/g, ' '), 32);
const list = [...this.picked].sort().flatMap((i, k) => { const r = this.results[i]; return r?.art ? [{ name: `${base} ${k + 1}`, tile: r.tile, art: r.art, type: r.layout?.type, hs: r.layout?.hs, vs: r.layout?.vs }] : []; });
const fillIds = this.o.fill ? this.engine.selectedIds() : [];
const ids = this.engine.addPatternSwatches(list, fillIds);
From 0868e549e13c99a7896d5e82a32147d7bc75e159 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:23:13 -0500
Subject: [PATCH 23/74] fix(ui): a slider's number field reads a decimal comma
and full-width digits, and an emptied option field keeps its value
---
frontend/src/ui/options.ts | 2 +-
frontend/src/ui/panels/kit.ts | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/frontend/src/ui/options.ts b/frontend/src/ui/options.ts
index 8d53b1f..07d7c20 100644
--- a/frontend/src/ui/options.ts
+++ b/frontend/src/ui/options.ts
@@ -75,7 +75,7 @@ export class OptionsBar {
const range = q(n, 'input[type="range"]');
const num = q(n, 'input[type="number"]');
range.addEventListener('input', () => spec.set(Number(range.value)));
- num.addEventListener('change', () => { const v = Number(num.value); if (Number.isFinite(v)) spec.set(Math.min(spec.max, Math.max(spec.min, v))); num.blur(); });
+ num.addEventListener('change', () => { const v = num.value.trim() ? Number(num.value) : NaN; if (Number.isFinite(v)) spec.set(Math.min(spec.max, Math.max(spec.min, v))); else num.value = String(Math.round(spec.get() * 100) / 100); num.blur(); });
num.addEventListener('keydown', (e) => { e.stopPropagation(); if (e.key === 'Enter') num.blur(); });
sync.push(() => { const v = String(Math.round(spec.get() * 100) / 100); setValue(range, v); setValue(num, v); });
node.appendChild(n);
diff --git a/frontend/src/ui/panels/kit.ts b/frontend/src/ui/panels/kit.ts
index dcab4d1..ca48d78 100644
--- a/frontend/src/ui/panels/kit.ts
+++ b/frontend/src/ui/panels/kit.ts
@@ -73,7 +73,7 @@ export function slider(engine: Engine, label: string, min: number, max: number,
r.addEventListener('pointercancel', end);
r.addEventListener('input', () => change(Number(r.value)));
t.addEventListener('keydown', (e) => { e.stopPropagation(); if (e.isComposing || e.keyCode === 229) return; if (e.key === 'Enter') t.blur(); });
- t.addEventListener('change', () => { const v = parseFloat(t.value); if (!Number.isFinite(v)) { t.value = r.value; return; } const c = Math.min(max, Math.max(min, v)); r.value = String(c); t.value = fmtNum(c); change(c); });
+ t.addEventListener('change', () => { let v: number; try { v = evalNumber(t.value, o.unit ?? ''); } catch { v = NaN; } if (!Number.isFinite(v)) { t.value = r.value; return; } const c = Math.min(max, Math.max(min, v)); r.value = String(c); t.value = fmtNum(c); change(c); });
return { el: n, set: (v) => { const s = fmtNum(v); setValue(r, s); setValue(t, s); }, enable: (on) => { setDisabled(r, !on); setDisabled(t, !on); } };
}
From 89a6f8f4071ab04aa73ca5e88b22edd6c51e5ac6 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:24:40 -0500
Subject: [PATCH 24/74] fix(export): type in a font that is not installed is
exported in Inter with a note naming the family, instead of as a picture or
live text
---
frontend/src/app.ts | 20 +++++++++++---------
frontend/src/io/eps.ts | 4 ++--
frontend/src/io/fonts.ts | 35 +++++++++++++++++++++++++++--------
frontend/src/io/pdf-plates.ts | 6 +++---
frontend/src/io/pdf-text.ts | 14 +++++++-------
frontend/src/io/pdf.ts | 12 ++++++------
frontend/src/io/svg.ts | 4 ++--
7 files changed, 58 insertions(+), 37 deletions(-)
diff --git a/frontend/src/app.ts b/frontend/src/app.ts
index edb0490..82ae994 100644
--- a/frontend/src/app.ts
+++ b/frontend/src/app.ts
@@ -14,7 +14,7 @@ import { hex, solid, defaultGradient, NONE, toRgb, toCmyk, fill as fillItem, str
import { fontsChanged, plainText, textNode } from './engine/text';
import { toolHost, toolList, type Tool } from './extensions/registry';
import { api, type Capabilities, type OpenedProject } from './io/api';
-import { ensureFace, installShaping, onFontsLoaded, outlineText, systemFonts } from './io/fonts';
+import { ensureFace, installShaping, onFontsLoaded, outlineText, substituteNotes, systemFonts } from './io/fonts';
import { exportPdf, readPdfNative } from './io/pdf';
import { buildPrintPdf, printPdf } from './io/print';
import { PrintDialog } from './ui/print-dialog';
@@ -822,27 +822,28 @@ export function startApp(): void {
const p = engine.current;
if (!p) return null;
typing.end();
- const scope = c.scope, ab = c.artboard;
+ const scope = c.scope, ab = c.artboard, swapped = new Set();
+ const told = (v: T): T => { for (const s of substituteNotes(swapped)) (c.notes ?? ((note: string) => toast(note, 'info')))(s); return v; };
if (c.format === 'svg') {
const ids = scope === 'selection' ? engine.targetIds() : undefined;
- return new Blob([await exportSvg(p, { artboard: scope === 'all' ? 'all' : scope === 'art' ? 'art' : ab, outlineText: c.outlineText, preserve: c.preserve, precision: 3, ids })], { type: 'image/svg+xml' });
+ return told(new Blob([await exportSvg(p, { artboard: scope === 'all' ? 'all' : scope === 'art' ? 'art' : ab, outlineText: c.outlineText, preserve: c.preserve, precision: 3, ids, swapped })], { type: 'image/svg+xml' }));
}
if (c.format === 'pdf' || c.format === 'ai') return exportPdf(p, { artboards: scope === 'all' || scope === 'art' ? p.doc.artboards.map((_, i) => i) : c.artboards ?? [ab], preserve: c.format === 'ai' || c.preserve, aiPrivate: c.format === 'ai', ppi: p.doc.rasterPpi || 300, version: VERSION, marks: c.format === 'pdf' ? c.marks : undefined, liveText: c.liveText, standard: c.format === 'pdf' ? c.standard : 'none', layers: c.format === 'pdf' ? c.layers : true, compression: c.compression, security: c.format === 'pdf' ? c.security : undefined, notes: c.notes ?? ((note) => toast(note, 'info')) });
if (c.format === 'eps') {
- const one = (region: Rect, title: string): Promise => exportEps(p, { region, cmyk: c.cmyk ?? p.doc.colorMode === 'cmyk', preserve: c.preserve, ppi: p.doc.rasterPpi || 300, title, version: VERSION });
+ const one = (region: Rect, title: string): Promise => exportEps(p, { region, cmyk: c.cmyk ?? p.doc.colorMode === 'cmyk', preserve: c.preserve, ppi: p.doc.rasterPpi || 300, title, version: VERSION, swapped });
if (scope === 'all' && p.doc.artboards.length > 1) {
const files: Array<{ name: string; blob: Blob }> = [];
for (const a of p.doc.artboards) files.push({ name: `${p.name}-${a.name}.eps`.replace(/[\\/:*?"<>|]+/g, '-'), blob: await one(a, `${p.name} ${a.name}`) });
- return zipFiles(files);
+ return told(await zipFiles(files));
}
const r = scope === 'selection' ? regionOf(engine, 'selection') : scope === 'art' ? exportRegion(p, 'art') : exportRegion(p, ab);
- return r ? one(r, p.name) : null;
+ return r ? told(await one(r, p.name)) : null;
}
if (c.format === 'dxf' || c.format === 'dwg') {
const cad = c.cad ?? { version: '2000', units: 'mm', scale: 1, text: 'text', lineweights: false };
const region = scope === 'selection' ? regionOf(engine, 'selection') : scope === 'art' ? exportRegion(p, 'art') : scope === 'all' ? exportRegion(p, 'all') : exportRegion(p, ab);
if (!region) return null;
- return (c.format === 'dwg' ? exportDwg : exportDxf)(p, { region, ...cad, ids: scope === 'selection' ? engine.targetIds() : undefined }, async (n) => { await ensureFace(n.spans[0]?.style.font ?? 'Inter', n.spans[0]?.style.style ?? 'Regular'); return outlineText(n); });
+ return told(await (c.format === 'dwg' ? exportDwg : exportDxf)(p, { region, ...cad, ids: scope === 'selection' ? engine.targetIds() : undefined }, async (n) => { await ensureFace(n.spans[0]?.style.font ?? 'Inter', n.spans[0]?.style.style ?? 'Regular'); return outlineText(n, swapped); }));
}
const region = scope === 'selection' ? regionOf(engine, 'selection') : scope === 'art' ? exportRegion(p, 'art') : scope === 'all' ? exportRegion(p, 'all') : exportRegion(p, ab);
if (!region) return null;
@@ -884,11 +885,12 @@ export function startApp(): void {
await engine.task(async () => {
try {
if (c.artboards && c.artboards.length > 1 && c.format !== 'pdf' && c.format !== 'ai') {
- const files: Array<{ name: string; blob: Blob }> = [];
+ const files: Array<{ name: string; blob: Blob }> = [], said = new Set();
for (const i of c.artboards) {
- const one = await exportBlob({ ...c, artboard: i, artboards: undefined });
+ const one = await exportBlob({ ...c, artboard: i, artboards: undefined, notes: c.notes ?? ((s) => said.add(s)) });
if (one) files.push({ name: `${p.name}-${i + 1}.${rasterExt(c.format)}`.replace(/[\\/:*?"<>|]+/g, '-'), blob: one });
}
+ for (const s of said) toast(s, 'info');
if (!files.length) { toast('There is nothing to export there.', 'error'); return; }
await deliver(await zipFiles(files), `${p.name}.zip`.replace(/[\\/:*?"<>|]+/g, '-'));
return;
diff --git a/frontend/src/io/eps.ts b/frontend/src/io/eps.ts
index d75eb31..986aeb7 100644
--- a/frontend/src/io/eps.ts
+++ b/frontend/src/io/eps.ts
@@ -16,7 +16,7 @@ import { outlineText } from './fonts';
import { renderRegion } from './raster';
import { serialize } from './project-io';
-export interface EpsOptions { region: Rect; cmyk: boolean; preserve: boolean; ppi: number; title?: string; version?: string }
+export interface EpsOptions { region: Rect; cmyk: boolean; preserve: boolean; ppi: number; title?: string; version?: string; swapped?: Set }
const f = (v: number): string => { const r = Math.round(v * 1000) / 1000; return Object.is(r, -0) ? '0' : String(r); };
const EMBED_BEGIN = '%FormpathDocument-Begin', EMBED_END = '%FormpathDocument-End', EMBED_LINE = '%FPTH:';
@@ -273,7 +273,7 @@ const PROLOG = [
export async function exportEps(p: Project, o: EpsOptions): Promise {
const outlines = new Map();
- const visit = async (n: VNode): Promise => { if (n.kind === 'text') { const d = await outlineText(n); if (d) outlines.set(n.id, d); } for (const c of childrenOf(n) ?? []) await visit(c); };
+ const swapped = o.swapped ?? new Set(), visit = async (n: VNode): Promise => { if (n.kind === 'text') { const d = await outlineText(n, swapped); if (d) outlines.set(n.id, d); } for (const c of childrenOf(n) ?? []) await visit(c); };
for (const l of p.doc.layers) await visit(l);
for (const s of p.doc.symbols) await visit(s.art);
const painter = new PsPainter(p, o, outlines);
diff --git a/frontend/src/io/fonts.ts b/frontend/src/io/fonts.ts
index a42832a..a2c0359 100644
--- a/frontend/src/io/fonts.ts
+++ b/frontend/src/io/fonts.ts
@@ -217,13 +217,32 @@ export async function glyphOrFallback(ch: string, st: CharStyle, font: Font, gid
return hit ? { ...hit, style: { ...st, font: hit.family, axes: undefined }, missing: false, skip: false } : { ...own, missing: true };
}
-export async function missingGlyphs(n: TextNode): Promise {
+export const SUBSTITUTE_FAMILY = 'Inter';
+export interface ExportFace { font: Font; style: CharStyle; own: boolean }
+export async function exportFace(st: CharStyle, swapped?: Set): Promise {
+ const font = await fontFor(st.font, st.style);
+ if (font) return { font, style: st, own: true };
+ if (!swapped) return null;
+ const sub = await fontFor(SUBSTITUTE_FAMILY, st.style);
+ if (!sub) return null;
+ swapped.add(st.font);
+ return { font: sub, style: { ...st, font: SUBSTITUTE_FAMILY, axes: undefined }, own: false };
+}
+export const faceGlyph = (face: ExportFace, ch: string, gid?: number): number => (face.own ? gid ?? face.font.charToGlyph(ch).index : face.font.charToGlyph(ch).index);
+export function substituteNotes(swapped: Iterable): string[] {
+ const fams = [...new Set(swapped)].filter(Boolean);
+ if (!fams.length) return [];
+ const named = fams.length === 1 ? fams[0] : `${fams.slice(0, -1).join(', ')} and ${fams[fams.length - 1]}`;
+ return [`${named} ${fams.length === 1 ? 'is' : 'are'} not on this computer, so ${fams.length === 1 ? 'its' : 'their'} type was set in ${SUBSTITUTE_FAMILY} at the same letter positions, with other fonts for characters ${SUBSTITUTE_FAMILY} lacks. Install ${fams.length === 1 ? 'it' : 'them'} and export again to keep ${fams.length === 1 ? 'its' : 'their'} own look.`];
+}
+
+export async function missingGlyphs(n: TextNode, swapped?: Set): Promise {
const out = new Set();
for (const g of layoutText(n).glyphs) {
if (!g.ch.trim() || g.ch.charCodeAt(0) < 32 || invisibleChar(g.ch)) continue;
- const font = await fontFor(g.style.font, g.style.style);
- if (!font) continue;
- const pick = await glyphOrFallback(g.ch, g.style, font, g.gid ?? font.charToGlyph(g.ch).index);
+ const face = await exportFace(g.style, swapped);
+ if (!face) continue;
+ const pick = await glyphOrFallback(g.ch, face.style, face.font, faceGlyph(face, g.ch, g.gid));
if (pick.missing) out.add(g.ch);
}
return [...out];
@@ -283,14 +302,14 @@ function commandsToPath(cmds: PathCommand[], m: Mat): PathData {
return transformPath(out, m);
}
-export async function outlineText(n: TextNode): Promise {
+export async function outlineText(n: TextNode, swapped?: Set): Promise {
const lay = layoutText(n);
const out: SubPath[] = [];
for (const g of lay.glyphs) {
if (g.ch === ' ' || g.ch === '\t') continue;
- const font = await fontFor(g.style.font, g.style.style);
- if (!font) return null;
- const pick = await glyphOrFallback(g.ch, g.style, font, g.gid ?? font.charToGlyph(g.ch).index);
+ const face = await exportFace(g.style, swapped);
+ if (!face) return null;
+ const pick = await glyphOrFallback(g.ch, face.style, face.font, faceGlyph(face, g.ch, g.gid));
if (pick.skip) continue;
const local: Mat = mul(glyphMat(g), [(g.size * g.style.hscale) / 100, 0, 0, (g.size * g.style.vscale) / 100, 0, 0]);
out.push(...transformPath(variedGlyph(pick.font, pick.gid, pick.style).d, n.mode === 'path' ? local : mul(n.xf, local)));
diff --git a/frontend/src/io/pdf-plates.ts b/frontend/src/io/pdf-plates.ts
index ae35a3f..38c8964 100644
--- a/frontend/src/io/pdf-plates.ts
+++ b/frontend/src/io/pdf-plates.ts
@@ -21,13 +21,13 @@ export async function exportPlates(p: Project, o: PlateOptions): Promise {
await document.fonts.ready.catch(() => undefined);
const plates = platesOf(p.doc, true);
if (!plates.length) throw new Error('Every ink is set not to print. Turn one on in the Ink Manager and try again.');
- const pdf = new PdfFile(), outlines = new Map(), live = new LiveFonts(), plans = new Map();
+ const pdf = new PdfFile(), outlines = new Map(), live = new LiveFonts(), plans = new Map(), swapped = new Set();
const visit = async (n: VNode, plain: boolean): Promise => {
if (n.kind === 'text') {
- const d = await outlineText(n);
+ const d = await outlineText(n, swapped);
if (d) {
outlines.set(n.id, d);
- const plan = !plain ? await live.plan(p.doc, n) : null;
+ const plan = !plain ? await live.plan(p.doc, n, swapped) : null;
if (plan) plans.set(n.id, plan);
}
}
diff --git a/frontend/src/io/pdf-text.ts b/frontend/src/io/pdf-text.ts
index 26f61b8..328fa35 100644
--- a/frontend/src/io/pdf-text.ts
+++ b/frontend/src/io/pdf-text.ts
@@ -5,7 +5,7 @@ import { resolvePaint } from '../engine/paint';
import { axesKey, glyphMat, hasAxes, layoutText } from '../engine/text';
import type { CharStyle, Doc, Mat, Paint, TextNode } from '../engine';
import { api } from './api';
-import { fontFor, fontSource, glyphAdvance, glyphOrFallback } from './fonts';
+import { exportFace, faceGlyph, fontFor, fontSource, glyphAdvance, glyphOrFallback } from './fonts';
export interface PdfSink { add(dict: string, stream?: Uint8Array): number }
export interface Ink { fill: string | null; stroke: string | null; width: number }
@@ -77,17 +77,17 @@ export class LiveFonts {
return !has3d(n) && !n.ap.effects.length && !n.ap.items.some((i) => i.visible) && !(n.mask && !n.mask.disabled);
}
- async plan(doc: Doc, n: TextNode): Promise {
+ async plan(doc: Doc, n: TextNode, swapped?: Set): Promise {
if (!this.capable(doc, n)) return null;
const lay = layoutText(n), staged: Array<{ key: string; font: Font; style: CharStyle; gid: number; ch: string; tm: Mat; fallback: boolean }> = [];
for (const g of lay.glyphs) {
const code = g.ch.charCodeAt(0);
if (code < 32) continue;
- const st = g.style, hasStroke = st.stroke.type !== 'none' && st.strokeWidth > 0;
- if (!solidOrNone(doc, st.fill) || (hasStroke && !solidOrNone(doc, st.stroke))) return null;
- const font = await fontFor(st.font, st.style);
- if (!font) return null;
- const own = g.gid ?? font.charToGlyph(g.ch).index;
+ const hasStroke = g.style.stroke.type !== 'none' && g.style.strokeWidth > 0;
+ if (!solidOrNone(doc, g.style.fill) || (hasStroke && !solidOrNone(doc, g.style.stroke))) return null;
+ const face = await exportFace(g.style, swapped);
+ if (!face) return null;
+ const st = face.style, font = face.font, own = faceGlyph(face, g.ch, g.gid);
if (own === 0 && /\s/.test(g.ch)) continue;
const pick = await glyphOrFallback(g.ch, st, font, own), ps = pick.style;
if (pick.skip) continue;
diff --git a/frontend/src/io/pdf.ts b/frontend/src/io/pdf.ts
index d497fca..8401aeb 100644
--- a/frontend/src/io/pdf.ts
+++ b/frontend/src/io/pdf.ts
@@ -15,7 +15,7 @@ import { gradientAt, perceptualStops, resolvePaint, toCmyk, toRgb } from '../eng
import { clipGeometry, gradientGeom, knockoutShape, knocksOut } from '../engine/render';
import { gradientStrokeArt, strokeGradient, strokeRegion, type GradientStrokeArt, type StrokePiece } from '../engine/stroke-gradient';
import type { BlendMode, CharStyle, Color, Doc, FillRule, Gradient, Mat, Paint, PathData, PatternDef, Project, Rect, StrokeItem, VNode } from '../engine';
-import { colourEmoji, missingGlyphs, outlineText } from './fonts';
+import { colourEmoji, missingGlyphs, outlineText, substituteNotes } from './fonts';
import { renderRegion } from './raster';
import { serialize } from './project-io';
import { bleedFor, marksActive, marksContent, pageGeometry, type PdfMarks } from './pdf-marks';
@@ -609,14 +609,14 @@ export async function exportPdf(p: Project, o: PdfOptions): Promise {
if (refusal) throw new Error(refusal);
const pdf = new PdfFile();
const outlines = new Map();
- const live = new LiveFonts(), plans = new Map(), wantLive = o.liveText !== false, missing = new Set();
+ const live = new LiveFonts(), plans = new Map(), wantLive = o.liveText !== false, missing = new Set(), swapped = new Set();
const visit = async (n: VNode, plain: boolean): Promise => {
if (n.kind === 'text') {
- const d = await outlineText(n);
+ const d = await outlineText(n, swapped);
if (d) {
outlines.set(n.id, d);
- for (const ch of await missingGlyphs(n)) missing.add(ch);
- const plan = wantLive && !plain ? await live.plan(p.doc, n) : null;
+ for (const ch of await missingGlyphs(n, swapped)) missing.add(ch);
+ const plan = wantLive && !plain ? await live.plan(p.doc, n, swapped) : null;
if (plan) plans.set(n.id, plan);
}
}
@@ -749,7 +749,7 @@ export async function exportPdf(p: Project, o: PdfOptions): Promise {
const root = pdf.add(`<< /Type /Catalog /Pages ${pagesId} 0 R${names}${extra} >>`);
const info = pdf.add(`<< /Title ${pdfTextString(title)} /Producer ${pdfString(producer)} /Creator (formpath) /CreationDate (${stamp}) /ModDate (${stamp})${xp ? ` ${xp.version} ${xp.trapped}` : ''} >>`);
const blob = await pdf.build(root, info, rules.header, docId, sealer, (o.compression ?? DEFAULT_COMPRESSION).flate !== false);
- for (const note of glyphNotes([...missing])) o.notes?.(note);
+ for (const note of [...substituteNotes(swapped), ...glyphNotes([...missing])]) o.notes?.(note);
return blob;
}
diff --git a/frontend/src/io/svg.ts b/frontend/src/io/svg.ts
index 00baf99..c8a3ff6 100644
--- a/frontend/src/io/svg.ts
+++ b/frontend/src/io/svg.ts
@@ -21,7 +21,7 @@ import { cssFilterEffects, filterChain, filterEffects, filterPrimitives, type Fi
import { clipOf, fitViewBox, markers, maskOf, patternPaint, refId, userBox, type MarkerOut, type RefCtx } from './svg-refs';
import { importText, textFromHint, type TextEnv } from './svg-text';
-export interface SvgOptions { artboard: number | 'all' | 'art'; outlineText: boolean; preserve: boolean; precision: number; ids?: string[] }
+export interface SvgOptions { artboard: number | 'all' | 'art'; outlineText: boolean; preserve: boolean; precision: number; ids?: string[]; swapped?: Set }
const BLEND_CSS = new Map(BLEND_MODES.map((b) => [b.id, b.css === 'source-over' ? 'normal' : b.css]));
const esc = (s: string): string => s.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"');
@@ -376,7 +376,7 @@ export async function exportSvg(p: Project, o: SvgOptions): Promise {
for (const key of textureImageKeys(p.doc)) { const b = p.assets.get(key); if (b && !p.bitmaps.has(key)) try { p.bitmaps.set(key, await createImageBitmap(b)); } catch { } }
const outlines = new Map();
if (o.outlineText) {
- const visit = async (n: VNode): Promise => { if (n.kind === 'text') { const d = await outlineText(n); if (d) outlines.set(n.id, d); } for (const c of childrenOf(n) ?? []) await visit(c); };
+ const swapped = o.swapped ?? new Set(), visit = async (n: VNode): Promise => { if (n.kind === 'text') { const d = await outlineText(n, swapped); if (d) outlines.set(n.id, d); } for (const c of childrenOf(n) ?? []) await visit(c); };
for (const l of p.doc.layers) await visit(l);
}
const w = new Writer(p, o, images, outlines);
From 309954fd6e48e60bbc984a115373d962bfd0de49 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:28:43 -0500
Subject: [PATCH 25/74] fix(pdf): a page information line and a separations
title outside ASCII print in their own characters instead of question marks
---
frontend/src/io/pdf-marks.ts | 19 ++++++++++++++++---
frontend/src/io/pdf-plates.ts | 8 ++++----
frontend/src/io/pdf.ts | 4 ++--
3 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/frontend/src/io/pdf-marks.ts b/frontend/src/io/pdf-marks.ts
index c3794ed..85bb5d7 100644
--- a/frontend/src/io/pdf-marks.ts
+++ b/frontend/src/io/pdf-marks.ts
@@ -1,4 +1,6 @@
-import type { Doc } from '../engine';
+import type { Doc, PathData, TextNode } from '../engine';
+import { textNode } from '../engine/text';
+import { outlineText } from './fonts';
export interface PdfMarks {
trim: boolean; registration: boolean; colorBars: boolean; pageInfo: boolean;
@@ -36,7 +38,18 @@ export function pageGeometry(w: number, h: number, bleed: Bleed, m?: PdfMarks):
return { ml, mb, mr, mt, bleed, start, width: w + ml + mr, height: h + mb + mt };
}
-export function marksContent(g: PageGeometry, w: number, h: number, m: PdfMarks, s: number, cs: string, fontRef: string, info: string, rgb = false): string {
+const literal = (s: string): string => `(${s.replace(/[\\()]/g, (c) => `\\${c}`).replace(/[^\x20-\x7e]/g, '?')})`;
+export async function pageInfoLine(s: string): Promise {
+ if (/^[\x20-\x7e]*$/.test(s)) return literal(s);
+ const d = await outlineText({ id: 'page-info', ...textNode(s, 0, 0, { font: 'Inter', style: 'Regular', size: 6 }) } as TextNode).catch(() => null);
+ return d?.length ? d : literal(s);
+}
+const pathOps = (d: PathData): string => d.map((sp) => {
+ const p = sp.pts, seg = (a: (typeof p)[number], b: (typeof p)[number]): string => `${f(a.ox)} ${f(a.oy)} ${f(b.ix)} ${f(b.iy)} ${f(b.x)} ${f(b.y)} c`;
+ return `${f(p[0].x)} ${f(p[0].y)} m ${p.slice(1).map((b, i) => seg(p[i], b)).join(' ')}${sp.closed ? ` ${seg(p[p.length - 1], p[0])} h` : ''}`;
+}).join(' ');
+
+export function marksContent(g: PageGeometry, w: number, h: number, m: PdfMarks, s: number, cs: string, fontRef: string, info: string | PathData, rgb = false): string {
const out: string[] = [`q /${cs} cs 1 scn /${cs} CS 1 SCN ${f(m.weight * s)} w`];
const X0 = g.ml * s, Y0 = g.mb * s, X1 = (g.ml + w) * s, Y1 = (g.mb + h) * s;
const st = { l: g.start.l * s, r: g.start.r * s, b: g.start.b * s, t: g.start.t * s }, L = MARK_LEN * s;
@@ -70,6 +83,6 @@ export function marksContent(g: PageGeometry, w: number, h: number, m: PdfMarks,
inks.slice(0, room).forEach((ink, i) => tints.push(`${paintOf(ink)} ${f(X0 + 16 * s + i * sz)} ${f(y)} ${f(sz)} ${f(sz)} re f`));
if (tints.length) out.push(`q ${tints.join(' ')} Q`);
}
- if (m.pageInfo) out.push(`q /${cs} cs 1 scn BT /${fontRef} ${f(6 * s)} Tf ${f(X0 + 16 * s)} ${f(Y1 + st.t + 3 * s)} Td ${info} Tj ET Q`);
+ if (m.pageInfo) out.push(typeof info === 'string' ? `q /${cs} cs 1 scn BT /${fontRef} ${f(6 * s)} Tf ${f(X0 + 16 * s)} ${f(Y1 + st.t + 3 * s)} Td ${info} Tj ET Q` : `q /${cs} cs 1 scn ${f(s)} 0 0 ${f(-s)} ${f(X0 + 16 * s)} ${f(Y1 + st.t + 3 * s)} cm ${pathOps(info)} f Q`);
return out.join('\n');
}
diff --git a/frontend/src/io/pdf-plates.ts b/frontend/src/io/pdf-plates.ts
index 38c8964..fd8b45a 100644
--- a/frontend/src/io/pdf-plates.ts
+++ b/frontend/src/io/pdf-plates.ts
@@ -3,9 +3,10 @@ import { platesOf, type Plate } from '../engine/inks';
import type { Mat, PathData, Project, VNode } from '../engine';
import { outlineText } from './fonts';
import { deflate, Painter, PdfFile, PDF_MAX_SIDE } from './pdf';
-import { bleedFor, marksActive, marksContent, pageGeometry, type PdfMarks } from './pdf-marks';
+import { bleedFor, marksActive, marksContent, pageGeometry, pageInfoLine, type PdfMarks } from './pdf-marks';
import { PlatePaint } from './pdf-plate-map';
import { inCopies, sheetPages } from './pdf-sheet';
+import { pdfString } from './pdf-x';
import { embeddedMarkFont, LiveFonts, type LiveText } from './pdf-text';
import type { PrintSettings } from './print-layout';
import { ensureBitmaps } from './raster';
@@ -14,7 +15,6 @@ export interface PlateOptions { artboards: number[]; marks: PdfMarks; dpi: numbe
const f = (v: number): string => { const r = Math.round(v * 1000) / 1000; return Object.is(r, -0) ? '0' : String(r); };
const f6 = (v: number): string => { const r = Math.round(v * 1e6) / 1e6; return Object.is(r, -0) ? '0' : String(r); };
-const text = (s: string): string => `(${s.replace(/[\\()]/g, (c) => `\\${c}`).replace(/[^\x20-\x7e]/g, '?')})`;
export async function exportPlates(p: Project, o: PlateOptions): Promise {
await ensureBitmaps(p);
@@ -72,7 +72,7 @@ export async function exportPlates(p: Project, o: PlateOptions): Promise {
parts.push(`${f6(s)} 0 0 ${f6(-s)} ${f6(ox - a.x * s)} ${f6(oy + (a.y + a.h) * s)} cm`, body);
if (boxed) parts.push('Q');
if (marksActive(o.marks)) {
- parts.push(marksContent(geo, a.w, a.h, { ...o.marks, colorBars: false }, s, `CS${sep}`, 'FMark', text(`${title} ${a.name} ${info.label} ${day}`)));
+ parts.push(marksContent(geo, a.w, a.h, { ...o.marks, colorBars: false }, s, `CS${sep}`, 'FMark', await pageInfoLine(`${title} ${a.name} ${info.label} ${day}`)));
if (o.marks.colorBars) {
const sz = 9 * s, y = oy - geo.start.b * s - sz, room = Math.max(0, Math.floor((a.w * s / 2 - 16 * s) / sz));
const steps = Array.from({ length: Math.min(room, 11) }, (_, n) => `${f(1 - n / 10)} g ${f(ox + 16 * s + n * sz)} ${f(y)} ${f(sz)} ${f(sz)} re f`);
@@ -99,6 +99,6 @@ export async function exportPlates(p: Project, o: PlateOptions): Promise {
pdf.set(pagesId, `<< /Type /Pages /Kids [${pageIds.map((x) => `${x} 0 R`).join(' ')}] /Count ${pageIds.length} >>`);
const root = pdf.add(`<< /Type /Catalog /Pages ${pagesId} 0 R >>`), now = new Date();
const stamp = `D:${now.getUTCFullYear()}${String(now.getUTCMonth() + 1).padStart(2, '0')}${String(now.getUTCDate()).padStart(2, '0')}${String(now.getUTCHours()).padStart(2, '0')}${String(now.getUTCMinutes()).padStart(2, '0')}${String(now.getUTCSeconds()).padStart(2, '0')}Z`;
- const info = pdf.add(`<< /Title ${text(`${title} separations`)} /Producer ${text(`formpath ${o.version ?? ''}`.trim())} /Creator (formpath) /CreationDate (${stamp}) /ModDate (${stamp}) >>`);
+ const info = pdf.add(`<< /Title ${pdfString(`${title} separations`)} /Producer ${pdfString(`formpath ${o.version ?? ''}`.trim())} /Creator (formpath) /CreationDate (${stamp}) /ModDate (${stamp}) >>`);
return pdf.build(root, info);
}
diff --git a/frontend/src/io/pdf.ts b/frontend/src/io/pdf.ts
index 8401aeb..e6ffd5a 100644
--- a/frontend/src/io/pdf.ts
+++ b/frontend/src/io/pdf.ts
@@ -18,7 +18,7 @@ import type { BlendMode, CharStyle, Color, Doc, FillRule, Gradient, Mat, Paint,
import { colourEmoji, missingGlyphs, outlineText, substituteNotes } from './fonts';
import { renderRegion } from './raster';
import { serialize } from './project-io';
-import { bleedFor, marksActive, marksContent, pageGeometry, type PdfMarks } from './pdf-marks';
+import { bleedFor, marksActive, marksContent, pageGeometry, pageInfoLine, type PdfMarks } from './pdf-marks';
import { pdfxParts } from './pdf-x';
import { outputProfileBytes } from '../engine/color-management';
import { inCopies, sheetPages } from './pdf-sheet';
@@ -665,7 +665,7 @@ export async function exportPdf(p: Project, o: PdfOptions): Promise {
if (boxed) parts.push('Q');
if (marksActive(o.marks) && o.marks) {
const reg = regSpace();
- const info = pdfString(`${o.title ?? p.doc.title ?? p.name} ${a.name} ${p.doc.colorMode.toUpperCase()} ${new Date().toISOString().slice(0, 10)}`);
+ const info = await pageInfoLine(`${o.title ?? p.doc.title ?? p.name} ${a.name} ${p.doc.colorMode.toUpperCase()} ${new Date().toISOString().slice(0, 10)}`);
parts.push(marksContent(geo, a.w, a.h, o.marks, s, `CS${reg}`, 'FMark', info, painter.rgbOnly));
}
const packed = await deflate(new TextEncoder().encode(parts.filter(Boolean).join('\n')));
From d6a4b9be08d6875556fab5e5a49a9f9963dc3ef4 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:29:39 -0500
Subject: [PATCH 26/74] fix(eps): spot ink names outside plain letters keep
every character, so two Chinese inks no longer merge into one
---
frontend/src/io/eps.ts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/frontend/src/io/eps.ts b/frontend/src/io/eps.ts
index 986aeb7..803c6e5 100644
--- a/frontend/src/io/eps.ts
+++ b/frontend/src/io/eps.ts
@@ -19,6 +19,7 @@ import { serialize } from './project-io';
export interface EpsOptions { region: Rect; cmyk: boolean; preserve: boolean; ppi: number; title?: string; version?: string; swapped?: Set }
const f = (v: number): string => { const r = Math.round(v * 1000) / 1000; return Object.is(r, -0) ? '0' : String(r); };
+const inkName = (s: string): string => (!s ? '/Spot' : /^[A-Za-z0-9_.-]+$/.test(s) ? `/${s}` : `(${[...new TextEncoder().encode(s)].map((b) => (b < 32 || b > 126 || b === 40 || b === 41 || b === 92 ? `\\${b.toString(8).padStart(3, '0')}` : String.fromCharCode(b))).join('')}) cvn`);
const EMBED_BEGIN = '%FormpathDocument-Begin', EMBED_END = '%FormpathDocument-End', EMBED_LINE = '%FPTH:';
async function deflate(data: Uint8Array): Promise {
@@ -119,7 +120,7 @@ class PsPainter {
const reg = sw?.name === '[Registration]';
if (!sw || !(sw.spot || reg) || sw.paint.type !== 'color') return null;
const k = toCmyk(sw.paint.color), [C, M, Y, K] = reg ? [1, 1, 1, 1] : k.kind === 'cmyk' ? [k.c / 100, k.m / 100, k.y / 100, k.k / 100] : [0, 0, 0, 1];
- return `[/Separation ${reg ? '/All' : `/${sw.name.replace(/[^A-Za-z0-9_.-]/g, '_') || 'Spot'}`} /DeviceCMYK {dup ${f(C)} mul exch dup ${f(M)} mul exch dup ${f(Y)} mul exch ${f(K)} mul}] setcolorspace ${f(Math.max(0, Math.min(100, raw.tint ?? 100)) / 100)} setcolor`;
+ return `[/Separation ${reg ? '/All' : inkName(sw.name)} /DeviceCMYK {dup ${f(C)} mul exch dup ${f(M)} mul exch dup ${f(Y)} mul exch ${f(K)} mul}] setcolorspace ${f(Math.max(0, Math.min(100, raw.tint ?? 100)) / 100)} setcolor`;
}
fillWith(raw: VNode['ap']['items'][number]['paint'], d: PathData, evenodd: boolean, b: Rect): string {
From cb8b8ab6b2178e5f240474691b3057622e08228e Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:32:26 -0500
Subject: [PATCH 27/74] fix(fonts): a font with CFF2 outlines is embedded as
live text in a PDF, converted to CFF, instead of being outlined
---
backend/app/services/subset.py | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/backend/app/services/subset.py b/backend/app/services/subset.py
index fb54b27..a5303f9 100644
--- a/backend/app/services/subset.py
+++ b/backend/app/services/subset.py
@@ -23,7 +23,7 @@ def _instance(font: TTFont, axes: dict[str, float]) -> None:
except ImportError as exc:
raise SubsetError("This font is variable and the engine cannot fix its axes. Export with Preserve text as live text off.") from exc
try:
- instancer.instantiateVariableFont(font, spot, inplace=True)
+ instancer.instantiateVariableFont(font, spot, inplace=True, downgradeCFF2="CFF2" in font)
except Exception as exc:
raise SubsetError(f"This variable font could not be fixed at its axis values ({exc}). Export with Preserve text as live text off.") from exc
@@ -56,7 +56,14 @@ def build(data: bytes, gids: list[int], axes: dict[str, float]) -> tuple[bytes,
raise SubsetError(f"This font could not be subset ({exc}).") from exc
_instance(font, axes)
if "CFF2" in font:
- raise SubsetError("This font uses CFF2 outlines that cannot be embedded. Export with Preserve text as live text off.")
+ try:
+ from fontTools.cffLib.CFF2ToCFF import convertCFF2ToCFF
+ tmp = io.BytesIO()
+ font.save(tmp)
+ font = TTFont(io.BytesIO(tmp.getvalue()), recalcBBoxes=False)
+ convertCFF2ToCFF(font)
+ except Exception as exc:
+ raise SubsetError(f"This font uses CFF2 outlines that could not be converted for embedding ({exc}). Export with Preserve text as live text off.") from exc
font.flavor = None
out = io.BytesIO()
font.save(out)
From 36d4dafa6d3aed0ba7bd425324d37ec72164ad54 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:28:13 -0500
Subject: [PATCH 28/74] fix(fonts): the engine finds a font by its name in any
language, reads Chinese, Japanese and Korean names in legacy encodings, says
which installed font has a character, and keeps a CJK font's similar fonts to
CJK fonts
---
backend/app/routers/fonts.py | 10 ++++
backend/app/services/fonts.py | 110 ++++++++++++++++++++++++++++++----
2 files changed, 108 insertions(+), 12 deletions(-)
diff --git a/backend/app/routers/fonts.py b/backend/app/routers/fonts.py
index 7b2ee18..6367ea9 100644
--- a/backend/app/routers/fonts.py
+++ b/backend/app/routers/fonts.py
@@ -29,6 +29,16 @@ async def similar(id: str, limit: int = 10) -> dict:
return {"fonts": found}
+@router.get("/cover")
+async def cover(cp: int, prefer: str = "") -> dict:
+ if not 0 <= cp <= 0x10FFFF:
+ raise HTTPException(status_code=422, detail="cp must be a code point from 0 to 1114111.")
+ hit = await run_in_threadpool(fonts.cover, cp, [p for p in prefer.split(",") if p.strip()][:32])
+ if not hit:
+ raise HTTPException(status_code=404, detail=f"No font on this computer has U+{cp:04X}.")
+ return hit
+
+
@router.get("/file/{font_id}")
async def font_file(font_id: str) -> Response:
found = await run_in_threadpool(fonts.font_file, font_id)
diff --git a/backend/app/services/fonts.py b/backend/app/services/fonts.py
index b275d79..6bf18b9 100644
--- a/backend/app/services/fonts.py
+++ b/backend/app/services/fonts.py
@@ -1,9 +1,13 @@
+import gc
import hashlib
import os
import re
import struct
import sys
import threading
+import unicodedata
+from array import array
+from bisect import bisect_left
from pathlib import Path
EXTS = {".ttf", ".otf", ".ttc", ".otc"}
@@ -33,14 +37,49 @@ def _dirs() -> list[Path]:
return dirs
-def _decode(raw: bytes, platform: int) -> str:
+LEGACY = {(3, 2): "shift_jis", (3, 3): "gbk", (3, 4): "big5", (3, 5): "cp949", (1, 1): "shift_jis", (1, 2): "big5", (1, 3): "euc_kr", (1, 25): "gbk"}
+COMMON = {"gbk": "gb2312", "cp949": "euc_kr"}
+
+
+def _plain(text: str) -> str:
+ text = text.strip("\x00").strip()
+ return text if text and all(unicodedata.category(c) not in ("Cc", "Co", "Cn", "Cs") for c in text) else ""
+
+
+def _strict(raw: bytes, codec: str) -> str:
try:
- return raw.decode("utf-16-be" if platform in (0, 3) else "mac_roman").strip("\x00").strip()
+ return _plain(raw.decode(codec))
except UnicodeDecodeError:
return ""
-def _names(data: bytes, base: int) -> dict[int, str]:
+def _fit(text: str, codec: str) -> int:
+ n = 0
+ for c in text:
+ try:
+ n += len(c.encode(COMMON.get(codec, codec))) <= 2
+ except UnicodeEncodeError:
+ pass
+ return n
+
+
+def _decode(raw: bytes, platform: int, encoding: int = 1) -> str:
+ codec = LEGACY.get((platform, encoding))
+ if platform == 1:
+ return _strict(raw, codec or "mac_roman") if codec or encoding == 0 else ""
+ if platform not in (0, 3):
+ return ""
+ wide = _strict(raw, "utf-16-be") if len(raw) % 2 == 0 else ""
+ if not codec:
+ return wide
+ units = raw[0::2] if len(raw) % 2 == 0 else b""
+ narrow = _strict(raw.replace(b"\x00", b""), codec) if all(u == 0 or u >= 0x81 for u in units) else ""
+ if not wide or not narrow or wide == narrow:
+ return wide or narrow
+ return narrow if _fit(narrow, codec) > _fit(wide, codec) else wide
+
+
+def _names(data: bytes, base: int) -> tuple[dict[int, str], list[str]]:
num = struct.unpack_from(">H", data, base + 4)[0]
for i in range(num):
tag, _, offset, _ = struct.unpack_from(">4sIII", data, base + 12 + i * 16)
@@ -48,18 +87,21 @@ def _names(data: bytes, base: int) -> dict[int, str]:
continue
_, count, strings = struct.unpack_from(">HHH", data, offset)
found: dict[int, tuple[int, str]] = {}
+ every: dict[str, None] = {}
for j in range(count):
platform, encoding, language, name_id, length, start = struct.unpack_from(">HHHHHH", data, offset + 6 + j * 12)
if name_id not in (1, 2, 4, 6, 16, 17):
continue
- text = _decode(data[offset + strings + start: offset + strings + start + length], platform)
+ text = _decode(data[offset + strings + start: offset + strings + start + length], platform, encoding)
if not text:
continue
+ if name_id in (1, 4, 6, 16):
+ every[text] = None
rank = 3 if platform == 3 and language in (0x409, 0) else 2 if platform == 3 else 1 if platform == 0 else 0
if name_id not in found or rank > found[name_id][0]:
found[name_id] = (rank, text)
- return {k: v[1] for k, v in found.items()}
- return {}
+ return {k: v[1] for k, v in found.items()}, list(every)
+ return {}, []
def _has_table(data: bytes, base: int, want: bytes) -> bool:
@@ -67,7 +109,7 @@ def _has_table(data: bytes, base: int, want: bytes) -> bool:
return any(struct.unpack_from(">4s", data, base + 12 + i * 16)[0] == want for i in range(num))
-def _members(path: Path) -> list[tuple[int, dict[int, str], bool]]:
+def _members(path: Path) -> list[tuple[int, tuple[dict[int, str], list[str]], bool]]:
try:
data = path.read_bytes()
except OSError:
@@ -90,13 +132,14 @@ def _scan() -> dict[str, dict]:
for path in root.rglob("*"):
if path.suffix.lower() not in EXTS or not path.is_file():
continue
- for member, names, variable in _members(path):
+ for member, (names, every), variable in _members(path):
family = names.get(16) or names.get(1)
style = names.get(17) or names.get(2) or "Regular"
if not family or family.startswith("."):
continue
key = hashlib.sha1(f"{path}#{member}".encode()).hexdigest()[:16]
- out[key] = {"id": key, "family": family, "style": style, "full": names.get(4, f"{family} {style}"), "postscript": names.get(6, ""), "path": str(path), "member": member, "variable": variable}
+ aliases = [a for a in every if a.lower() != family.lower()]
+ out[key] = {"id": key, "family": family, "style": style, "full": names.get(4, f"{family} {style}"), "postscript": names.get(6, ""), "aliases": aliases, "path": str(path), "member": member, "variable": variable}
return out
@@ -106,12 +149,14 @@ def index() -> dict[str, dict]:
with _lock:
if stamp != _stamp or not _index:
_index, _stamp = _scan(), stamp
+ _cmaps.clear()
+ _shared.clear()
return _index
def listing() -> list[dict]:
fonts = sorted(index().values(), key=lambda f: (f["family"].lower(), f["style"].lower()))
- return [{**{k: f[k] for k in ("id", "family", "style", "full", "postscript")}, "variable": bool(f.get("variable"))} for f in fonts]
+ return [{**{k: f[k] for k in ("id", "family", "style", "full", "postscript")}, "variable": bool(f.get("variable")), "aliases": list(f.get("aliases") or [])} for f in fonts]
def _extract(data: bytes, member: int) -> bytes:
@@ -144,7 +189,7 @@ def font_file(font_id: str) -> tuple[bytes, str] | None:
def find(family: str, style: str = "Regular") -> dict | None:
want_f, want_s = family.strip().lower(), (style or "Regular").strip().lower()
- candidates = [f for f in index().values() if f["family"].lower() == want_f]
+ candidates = [f for f in index().values() if f["family"].lower() == want_f] or [f for f in index().values() if any(a.lower() == want_f for a in f.get("aliases") or [])]
if not candidates:
return None
exact = [f for f in candidates if f["style"].lower() == want_s]
@@ -156,6 +201,45 @@ def find(family: str, style: str = "Regular") -> dict | None:
return pool[0]
+_cmaps: dict[str, array] = {}
+_shared: dict[bytes, array] = {}
+
+
+def _cmap(entry: dict) -> array:
+ hit = _cmaps.get(entry["id"])
+ if hit is None:
+ try:
+ from fontTools.ttLib import TTFont
+ with TTFont(entry["path"], fontNumber=entry["member"], lazy=True) as font:
+ hit = array("I", sorted(font.getBestCmap() or {})) if any(t in font for t in ("glyf", "CFF ", "CFF2")) else array("I")
+ except Exception:
+ hit = array("I")
+ gc.collect()
+ hit = _shared.setdefault(hashlib.sha1(hit.tobytes()).digest(), hit)
+ _cmaps[entry["id"]] = hit
+ return hit
+
+
+def _upright(f: dict) -> tuple:
+ s = f["style"].lower()
+ return (re.search(r"italic|oblique", s) is not None, 0 if s in ("regular", "book", "roman", "normal") else 1 if s == "medium" else 2, bool(f.get("variable")), s)
+
+
+def cover(cp: int, prefer: list[str] | None = None) -> dict | None:
+ rank = {p.strip().lower(): i for i, p in reversed(list(enumerate(prefer or []))) if p.strip()}
+ best: dict[str, dict] = {}
+ for f in index().values():
+ if f["family"] not in best or _upright(f) < _upright(best[f["family"]]):
+ best[f["family"]] = f
+ place = lambda f: min([rank[n.lower()] for n in (f["family"], *(f.get("aliases") or [])) if n.lower() in rank] or [len(rank)])
+ for f in sorted(best.values(), key=lambda f: (place(f), f["family"].lower())):
+ c = _cmap(f)
+ i = bisect_left(c, cp)
+ if i < len(c) and c[i] == cp:
+ return {"family": f["family"], "style": f["style"]}
+ return None
+
+
_metrics: dict[str, dict | None] = {}
@@ -184,6 +268,8 @@ def _measure(entry: dict) -> dict | None:
panose = struct.unpack_from(">10B", data, o + 32)
sel = struct.unpack_from(">H", data, o + 62)[0]
m.update(weight=weight or 400, width=width or 5, klass=klass, avg=avg / upm, italic=1 if sel & 1 else 0)
+ if version >= 1 and os2[1] >= 86:
+ m["cjk"] = struct.unpack_from(">I", data, o + 78)[0] & 0x3E0000
if panose[0] == 2 and panose[1] > 1:
m["serif"] = 0 if panose[1] >= 11 else 1
elif klass in (1, 2, 3, 4, 5, 7):
@@ -217,7 +303,7 @@ def similar(font_id: str, limit: int = 10) -> list[dict] | None:
if entry["family"] == target["family"]:
continue
m = _metrics_of(entry)
- if not m:
+ if not m or ref.get("cjk") and not m.get("cjk", 0) & ref["cjk"]:
continue
d = abs(m["weight"] - ref["weight"]) / 100 * 0.9 + abs(m["width"] - ref["width"]) * 0.8
d += 3.0 * (m["serif"] != ref["serif"]) + 1.5 * (m["klass"] != ref["klass"]) + 2.0 * (m["italic"] != ref["italic"])
From 156503285b0d9ad1f5b0a43bfd8b15ff75677723 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:29:09 -0500
Subject: [PATCH 29/74] fix(fonts): type set in a font's Chinese, Japanese or
Korean name finds and draws that font, and Find Similar Fonts says when the
font is not installed
---
frontend/src/io/api.ts | 2 +-
frontend/src/io/fonts.ts | 20 +++++++++++++++++---
frontend/src/ui/panels/similar-fonts.ts | 6 +++---
3 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/frontend/src/io/api.ts b/frontend/src/io/api.ts
index c1b179f..4b4fb9f 100644
--- a/frontend/src/io/api.ts
+++ b/frontend/src/io/api.ts
@@ -5,7 +5,7 @@ export interface LibraryItem { name: string; modified: number; size: number }
export interface OpenedProject { session: string; name: string; manifest: Record; images: Record; version?: string }
export interface LibraryFolder { folder: string; default: string; custom: boolean; fixed: boolean; synced: Array<{ label: string; base: string; suggested: string }> }
export interface FilePart { name: string; blob: Blob }
-export interface FontInfo { id: string; family: string; style: string; full: string; postscript: string; variable?: boolean }
+export interface FontInfo { id: string; family: string; style: string; full: string; postscript: string; variable?: boolean; aliases?: string[] }
export interface ColorProfileInfo { id: string; name: string; space: string; class: string; size: number; source: 'builtin' | 'user' | 'system' }
export interface SpellHit { word: string; suggestions: string[] }
export interface SimilarFont { id: string; family: string; style: string; score: number }
diff --git a/frontend/src/io/fonts.ts b/frontend/src/io/fonts.ts
index a2c0359..24e0e75 100644
--- a/frontend/src/io/fonts.ts
+++ b/frontend/src/io/fonts.ts
@@ -73,10 +73,17 @@ export function families(): string[] {
const sys = [...new Set((systemList ?? []).map((f) => f.family))].sort((a, b) => a.localeCompare(b));
return [...BUNDLED_FAMILIES, ...WEB_FAMILIES.filter((f) => !sys.includes(f)), ...sys.filter((f) => !BUNDLED_FAMILIES.includes(f))];
}
-export async function findSimilarFonts(family: string, style = 'Regular', limit = 10): Promise {
- const list = await systemFonts(), of = list.filter((f) => f.family === family);
+let aliasText: Map | null = null;
+export function aliasesOf(family: string): string {
+ if (!systemList) return '';
+ if (!aliasText) { aliasText = new Map(); for (const f of systemList) if (f.aliases?.length) aliasText.set(f.family, `${aliasText.get(f.family) ?? ''}\n${f.aliases.join('\n')}`); }
+ return aliasText.get(family) ?? '';
+}
+const byAlias = (list: FontInfo[], family: string): FontInfo[] => { const want = family.toLowerCase(); return list.filter((f) => f.aliases?.some((a) => a.toLowerCase() === want)); };
+export async function findSimilarFonts(family: string, style = 'Regular', limit = 10): Promise {
+ const list = await systemFonts(), own = list.filter((f) => f.family === family), of = own.length ? own : byAlias(list, family);
const hit = of.find((f) => f.style === style) ?? of.find((f) => /^(regular|book|roman|normal)$/i.test(f.style)) ?? of[0];
- return hit ? api.similarFonts(hit.id, limit) : [];
+ return hit ? api.similarFonts(hit.id, limit) : !list.length || BUNDLED_FAMILIES.includes(family) ? [] : null;
}
export function isVariableFamily(family: string): boolean { return (systemList ?? []).some((f) => f.family === family && !!f.variable); }
@@ -117,6 +124,12 @@ export function fontSource(font: Font): { id: string } | { bytes: ArrayBuffer }
return id ? { id } : bytes ? { bytes } : null;
}
export function glyphAdvance(font: Font, gid: number, st: CharStyle): number { return variedGlyph(font, gid, st).adv; }
+function aliasFace(family: string, style: string, font: Font): void {
+ const buf = rawData.get(font), { weight, italic } = weightOf(style), slant = italic ? 'italic' : 'normal';
+ if (!buf || typeof FontFace === 'undefined' || !globalThis.document?.fonts || declaredFace(family, String(weight), slant)) return;
+ const face = new FontFace(family, buf, { weight: String(weight), style: slant });
+ void face.load().then((f) => { document.fonts.add(f); fontsChanged(); onFace?.(); }).catch(() => undefined);
+}
export function fontFor(family: string, style: string): Promise {
const key = `${family}|${style}`;
let p = parsed.get(key);
@@ -131,6 +144,7 @@ export function fontFor(family: string, style: string): Promise {
if (!f) { f = api.fontFile(hit.id).then(keep).catch(() => null); byFile.set(hit.id, f); }
const font = await f;
if (font) installedId.set(font, hit.id);
+ if (font && hit.family.toLowerCase() !== family.toLowerCase()) aliasFace(family, style, font);
const info = font ? infoOf(font) : null;
if (info?.instances.length) {
const names = info.instances.map((i) => i.name), had = instanceStyles.get(family) ?? [];
diff --git a/frontend/src/ui/panels/similar-fonts.ts b/frontend/src/ui/panels/similar-fonts.ts
index 0a63c65..ceef693 100644
--- a/frontend/src/ui/panels/similar-fonts.ts
+++ b/frontend/src/ui/panels/similar-fonts.ts
@@ -56,10 +56,10 @@ export async function openSimilarFonts(anchor: HTMLElement, family: string, styl
document.addEventListener('pointerdown', onDown, true);
document.addEventListener('keydown', onKey, true);
off = () => { document.removeEventListener('pointerdown', onDown, true); document.removeEventListener('keydown', onKey, true); };
- let found: SimilarFont[] = [];
+ let found: SimilarFont[] | null = [];
try { found = await findSimilarFonts(family, style, 10); } catch { found = []; }
if (mine !== run) return;
- show(found.length
+ show(found?.length
? found.map((f) => ({ key: f.id, label: '', family: f.family, style: f.style, score: `${Math.round(f.score)}%`, pick: true }))
- : [{ key: 'none', label: '', family: 'No similar fonts found', style: '', score: '', pick: false }]);
+ : [{ key: 'none', label: '', family: found ? 'No similar fonts found' : `${family} is not installed on this computer`, style: '', score: '', pick: false }]);
}
From 6fcb4f3ddad0dd1b11945365a2c074da3fbbb399 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:31:34 -0500
Subject: [PATCH 30/74] fix(fonts): a character no listed fallback font has,
such as Thai or Devanagari, comes from an installed font that has it, and
fonts that are not installed are no longer asked for
---
frontend/src/io/api.ts | 1 +
frontend/src/io/fonts.ts | 14 ++++++++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/frontend/src/io/api.ts b/frontend/src/io/api.ts
index 4b4fb9f..b72023f 100644
--- a/frontend/src/io/api.ts
+++ b/frontend/src/io/api.ts
@@ -105,6 +105,7 @@ export const api = {
async spellDictionaryEdit(add: string[], remove: string[] = []): Promise { return (await json<{ words: string[] }>(await request('/spell/dictionary', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ add, remove }) }))).words; },
async similarFonts(id: string, limit = 10): Promise { try { return (await json<{ fonts: SimilarFont[] }>(await request(`/fonts/similar?id=${encodeURIComponent(id)}&limit=${limit}`))).fonts; } catch { return []; } },
async fonts(): Promise { try { return await json(await request('/fonts')); } catch { return []; } },
+ async coverFont(cp: number, prefer: string[] = []): Promise<{ family: string; style: string } | null> { try { return await json<{ family: string; style: string }>(await request(`/fonts/cover?cp=${cp}&prefer=${encodeURIComponent(prefer.filter((p) => !p.includes(',')).join(','))}`)); } catch { return null; } },
async findFont(family: string, style: string): Promise { try { return await json(await request(`/fonts/find?family=${encodeURIComponent(family)}&style=${encodeURIComponent(style)}`)); } catch (e) { if (e instanceof ApiError && e.status === 404) return null; throw e; } },
async fontFile(id: string): Promise { return (await request(`/fonts/file/${encodeURIComponent(id)}`)).arrayBuffer(); },
async subsetFont(src: { id: string } | { bytes: ArrayBuffer }, gids: number[], axes: Record): Promise<{ data: Uint8Array; cff: boolean } | null> {
diff --git a/frontend/src/io/fonts.ts b/frontend/src/io/fonts.ts
index 24e0e75..b1616ef 100644
--- a/frontend/src/io/fonts.ts
+++ b/frontend/src/io/fonts.ts
@@ -195,6 +195,12 @@ async function bundledFallback(family: string, style: string, ch: string): Promi
return null;
}
+const namesOf = new WeakMap>();
+function installedNames(list: FontInfo[]): Set {
+ let s = namesOf.get(list);
+ if (!s) { s = new Set(list.flatMap((f) => [f.family, ...(f.aliases ?? [])].map((n) => n.toLowerCase()))); namesOf.set(list, s); }
+ return s;
+}
const fallbacks = new Map>();
export function fallbackGlyph(ch: string, family: string, style: string): Promise {
if (invisibleChar(ch) || colourEmoji(ch)) return Promise.resolve(null);
@@ -205,11 +211,15 @@ export function fallbackGlyph(ch: string, family: string, style: string): Promis
const own = await bundledFallback(family, style, ch);
if (own) return own;
const cp = ch.codePointAt(0) ?? 0, order = isCjk(cp) ? [...hanFirst(family), ...CJK_FALLBACKS, ...GENERAL_FALLBACKS] : [...GENERAL_FALLBACKS, ...CJK_FALLBACKS];
- for (const fam of [...new Set(order)].filter((f) => f !== family)) {
+ const have = installedNames(await systemFonts().catch((): FontInfo[] => []));
+ for (const fam of [...new Set(order)].filter((f) => f !== family && (!have.size || have.has(f.toLowerCase())))) {
const font = await fontFor(fam, style).catch(() => null), gid = covers(font, ch);
if (font && gid) return { font, gid, family: fam, source: fam };
}
- return family === 'Inter' ? null : bundledFallback('Inter', style, ch);
+ const inter = family === 'Inter' ? null : await bundledFallback('Inter', style, ch);
+ if (inter) return inter;
+ const hit = await api.coverFont(cp, isCjk(cp) ? hanFirst(family) : []), font = hit ? await fontFor(hit.family, style).catch(() => null) : null, gid = covers(font, ch);
+ return hit && font && gid ? { font, gid, family: hit.family, source: hit.family } : null;
})();
fallbacks.set(key, p);
}
From 19a52458ae95990a4899678c15e53636802d28cf Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:38:24 -0500
Subject: [PATCH 31/74] feat(type): the font menus in the Character panel and
the Type options bar have a search field that also finds a font by its names
in other languages
---
frontend/src/extensions/registry.ts | 2 +-
frontend/src/styles/shell.css | 3 ++-
frontend/src/tools/type.ts | 4 ++--
frontend/src/ui/dropdown.ts | 19 +++++++++++++++----
frontend/src/ui/options.ts | 2 ++
frontend/src/ui/panels/kit.ts | 4 ++--
frontend/src/ui/panels/type.ts | 4 ++--
7 files changed, 26 insertions(+), 12 deletions(-)
diff --git a/frontend/src/extensions/registry.ts b/frontend/src/extensions/registry.ts
index f500987..ba2a65c 100644
--- a/frontend/src/extensions/registry.ts
+++ b/frontend/src/extensions/registry.ts
@@ -22,7 +22,7 @@ export type OptionSpec = (
| { kind: 'segment'; label?: string; choices: ReadonlyArray<{ id: string; label: string; icon?: string }>; get: () => string; set: (id: string) => void }
| { kind: 'range'; label: string; min: number; max: number; step?: number; unit?: string; get: () => number; set: (v: number) => void }
| { kind: 'toggle'; label: string; get: () => boolean; set: (v: boolean) => void }
- | { kind: 'select'; label: string; choices: ReadonlyArray<{ id: string; label: string }>; get: () => string; set: (id: string) => void; live?: () => ReadonlyArray<{ id: string; label: string }> }
+ | { kind: 'select'; label: string; choices: ReadonlyArray<{ id: string; label: string }>; get: () => string; set: (id: string) => void; live?: () => ReadonlyArray<{ id: string; label: string }>; search?: string; terms?: (id: string) => string }
| { kind: 'readout'; label: string; get: () => string }
| { kind: 'color'; label: string; get: () => RGB; set: (c: RGB) => void }
| { kind: 'number'; label: string; min?: number; max?: number; step?: number; unit?: string; get: () => number | null; set: (v: number) => void }
diff --git a/frontend/src/styles/shell.css b/frontend/src/styles/shell.css
index 89f826f..332d63d 100644
--- a/frontend/src/styles/shell.css
+++ b/frontend/src/styles/shell.css
@@ -356,7 +356,8 @@ body { font-size: var(--fs-12); line-height: 1.35; }
.cv-title-tools .cv-dd-btn { width: 154px; background: var(--surface-1); }
.cv-dd-pop { position: fixed; z-index: var(--z-context); max-height: 60vh; overflow-y: auto; padding: 6px; border: 1px solid var(--line-3); border-radius: 12px; background: var(--surface-2); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55); }
.cv-dd-pop[hidden] { display: none; }
-.cv-dd-search { width: 100%; height: 30px; margin-bottom: 6px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-field); color: var(--text-primary); font: inherit; font-size: 13px; outline: 0; }
+.cv-dd-search { position: sticky; top: 0; width: 100%; height: 30px; margin-bottom: 6px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-field); color: var(--text-primary); font: inherit; font-size: 13px; outline: 0; box-shadow: 0 -7px 0 1px var(--surface-2), 0 6px 0 0 var(--surface-2); }
+.cv-dd-item[hidden], .cv-dd-head[hidden] { display: none; }
.cv-dd-head { padding: 8px 10px 4px; color: var(--text-muted); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.cv-dd-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; height: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.cv-dd-item .icon { visibility: hidden; color: var(--accent-color); }
diff --git a/frontend/src/tools/type.ts b/frontend/src/tools/type.ts
index 692d176..ee2ee7e 100644
--- a/frontend/src/tools/type.ts
+++ b/frontend/src/tools/type.ts
@@ -6,7 +6,7 @@ import type { CharTouch, Engine, Mat, Pt, Rect, TextNode } from '../engine';
import { registerTool, type OptionSpec, type ToolContext, type ToolPointer } from '../extensions/registry';
import { CURSORS } from '../ui/cursors';
import { typing } from '../ui/text-editor';
-import { families, stylesOf } from '../io/fonts';
+import { aliasesOf, families, stylesOf } from '../io/fonts';
import { marquee, tolDoc } from './util';
const S = { on: false, start: { x: 0, y: 0 }, cur: { x: 0, y: 0 }, word: false };
@@ -25,7 +25,7 @@ function typeOptions(e: Engine): OptionSpec[] {
};
return [
{ kind: 'title', text: 'Type' },
- { kind: 'select', label: 'Font', choices: [], live: () => families().map((f) => ({ id: f, label: f })), get: () => st().font, set: (v) => apply({ font: v }) },
+ { kind: 'select', label: 'Font', choices: [], live: () => families().map((f) => ({ id: f, label: f })), get: () => st().font, set: (v) => apply({ font: v }), search: 'Search', terms: aliasesOf },
{ kind: 'select', label: 'Style', choices: [], live: () => stylesOf(st().font).map((s) => ({ id: s, label: s })), get: () => st().style, set: (v) => apply({ style: v }) },
{ kind: 'number', label: 'Size', min: 0.1, max: 1296, step: 1, unit: 'pt', get: () => st().size, set: (v) => apply({ size: v }) },
{ kind: 'segment', label: 'Align', choices: [{ id: 'left', label: 'Left' }, { id: 'center', label: 'Center' }, { id: 'right', label: 'Right' }, { id: 'justify', label: 'Justify' }], get: () => { const n = e.selected().find((x) => x.kind === 'text'); return n?.kind === 'text' ? n.para.align : 'left'; }, set: (v) => { e.setParaStyle({ align: v as 'left' }); } },
diff --git a/frontend/src/ui/dropdown.ts b/frontend/src/ui/dropdown.ts
index 9a64c08..0cb03ad 100644
--- a/frontend/src/ui/dropdown.ts
+++ b/frontend/src/ui/dropdown.ts
@@ -1,7 +1,7 @@
import { el, setHidden, setText } from './dom';
import { icon } from './icons';
-export function enhanceSelect(select: HTMLSelectElement, opts: { search?: string } = {}): () => void {
+export function enhanceSelect(select: HTMLSelectElement, opts: { search?: string; terms?: (value: string) => string } = {}): () => void {
const btn = el(` ${icon('chevronDown', 12)} `);
const pop = el(``);
const list = pop.querySelector('.cv-dd-list') as HTMLElement, search = pop.querySelector('.cv-dd-search') as HTMLInputElement | null;
@@ -48,25 +48,36 @@ export function enhanceSelect(select: HTMLSelectElement, opts: { search?: string
if (q) picked = 0;
mark();
};
- const mark = (): void => { list.querySelectorAll('.cv-dd-item').forEach((i, n) => i.classList.toggle('is-picked', n === picked)); };
+ const shownItems = (): HTMLElement[] => Array.from(list.querySelectorAll('.cv-dd-item:not([hidden])'));
+ const mark = (): void => { const want = shownItems()[picked]; list.querySelectorAll('.cv-dd-item').forEach((i) => { if (i.classList.contains('is-picked') !== (i === want)) i.classList.toggle('is-picked', i === want); }); };
+ const filter = (): void => {
+ const q = search?.value.trim().toLowerCase() ?? '';
+ list.querySelectorAll('.cv-dd-head').forEach((h) => setHidden(h, !!q));
+ list.querySelectorAll('.cv-dd-item').forEach((i) => setHidden(i, !!q && !(i.textContent ?? '').toLowerCase().includes(q) && !(opts.terms?.(i.dataset.value ?? '') ?? '').toLowerCase().includes(q)));
+ picked = q ? 0 : Math.max(0, shownItems().findIndex((i) => i.classList.contains('is-chosen')));
+ mark();
+ if (q && pop.scrollTop) pop.scrollTop = 0;
+ };
const close = (): void => { setHidden(pop, true); btn.setAttribute('aria-expanded', 'false'); };
const open = (): void => {
if (search) search.value = '';
fill();
setHidden(pop, false);
btn.setAttribute('aria-expanded', 'true');
+ if (search) pop.style.minHeight = '';
const r = btn.getBoundingClientRect(), h = pop.offsetHeight;
pop.style.minWidth = `${Math.round(r.width)}px`;
+ if (search) pop.style.minHeight = `${h}px`;
pop.style.left = `${Math.round(Math.min(r.left, window.innerWidth - pop.offsetWidth - 4))}px`;
pop.style.top = `${Math.round(r.bottom + 4 + h <= window.innerHeight - 4 ? r.bottom + 4 : Math.max(4, r.top - 4 - h))}px`;
(search ?? (list.querySelector('.is-chosen') as HTMLElement | null) ?? btn).focus();
(list.querySelector('.is-chosen') as HTMLElement | null)?.scrollIntoView({ block: 'nearest' });
};
btn.addEventListener('click', () => (pop.hidden ? open() : close()));
- search?.addEventListener('input', fill);
+ search?.addEventListener('input', filter);
pop.addEventListener('keydown', (e) => {
if (e.isComposing || e.keyCode === 229) return;
- const items = Array.from(list.querySelectorAll('.cv-dd-item'));
+ const items = shownItems();
if (e.key === 'Escape') { e.preventDefault(); close(); btn.focus(); return; }
if (e.key === 'ArrowDown' || e.key === 'ArrowUp') { e.preventDefault(); if (items.length) { picked = (picked + (e.key === 'ArrowDown' ? 1 : items.length - 1)) % items.length; mark(); items[picked].scrollIntoView({ block: 'nearest' }); } return; }
if (e.key === 'Enter') { e.preventDefault(); items[picked]?.click(); }
diff --git a/frontend/src/ui/options.ts b/frontend/src/ui/options.ts
index 07d7c20..6286d07 100644
--- a/frontend/src/ui/options.ts
+++ b/frontend/src/ui/options.ts
@@ -2,6 +2,7 @@ import type { Engine, ToolId } from '../engine';
import { toolList, type OptionSpec, type Tool } from '../extensions/registry';
import { el, q, setChecked, setClass, setHidden, setText, setValue } from './dom';
import { icon } from './icons';
+import { enhanceSelect } from './dropdown';
interface Group { node: HTMLElement; sync: Array<() => void> }
@@ -86,6 +87,7 @@ export class OptionsBar {
for (const c of spec.choices) { const o = document.createElement('option'); o.value = c.id; o.textContent = c.label; box.appendChild(o); }
box.addEventListener('change', () => spec.set(box.value));
box.addEventListener('keydown', (e) => e.stopPropagation());
+ if (spec.search) enhanceSelect(box, { search: spec.search, terms: spec.terms });
sync.push(() => {
const list = spec.live?.();
diff --git a/frontend/src/ui/panels/kit.ts b/frontend/src/ui/panels/kit.ts
index ca48d78..13b35ff 100644
--- a/frontend/src/ui/panels/kit.ts
+++ b/frontend/src/ui/panels/kit.ts
@@ -89,7 +89,7 @@ export function seg(choices: ReadonlyArray<{ id: string; label: string; icon?: s
return { el: n, set: (v) => { for (const x of bs) { setClass(x.b, 'is-on', x.id === v); x.b.setAttribute('aria-pressed', String(x.id === v)); } }, enable: (on) => { for (const x of bs) setDisabled(x.b, !on); } };
}
-export function selectCtl(label: string, choices: ReadonlyArray, change: (id: string) => void): Ctl & { setChoices(c: ReadonlyArray): void; allow(ok: (id: string) => boolean): void } {
+export function selectCtl(label: string, choices: ReadonlyArray, change: (id: string) => void, find?: { search: string; terms?: (id: string) => string }): Ctl & { setChoices(c: ReadonlyArray): void; allow(ok: (id: string) => boolean): void } {
const n = el(' ');
setText(q(n, '.cv-pf-label'), label);
const s = q(n, 'select');
@@ -103,7 +103,7 @@ export function selectCtl(label: string, choices: ReadonlyArray change(s.value));
- enhanceSelect(s);
+ enhanceSelect(s, find);
if (!label) q(n, '.cv-pf-label').remove();
const allow = (ok: (id: string) => boolean): void => { for (const o of Array.from(s.options)) { const off = !!o.value && !ok(o.value); if (o.disabled !== off) o.disabled = off; } };
return { el: n, set: (v) => setValue(s, v), enable: (on) => setDisabled(s, !on), setChoices: fill, allow };
diff --git a/frontend/src/ui/panels/type.ts b/frontend/src/ui/panels/type.ts
index fccd7df..4cebf2d 100644
--- a/frontend/src/ui/panels/type.ts
+++ b/frontend/src/ui/panels/type.ts
@@ -8,7 +8,7 @@ import { askForm, type Field } from '../form-dialog';
import { previewEdit } from './preview-edit';
import { openSimilarFonts } from './similar-fonts';
import { typing } from '../text-editor';
-import { families, glyphAlternates, glyphList, isVariableFamily, stylesOf, ensureFace, variationOf, type VariationAxis, type VariationInfo } from '../../io/fonts';
+import { aliasesOf, families, glyphAlternates, glyphList, isVariableFamily, stylesOf, ensureFace, variationOf, type VariationAxis, type VariationInfo } from '../../io/fonts';
import { typeDefaults } from '../../tools/type';
import { check, numField, row, section, seg, selectCtl, slider, type Ctl } from './kit';
@@ -110,7 +110,7 @@ export class CharacterPanel {
this.figures = selectCtl('Figures', FIGURES, (v) => swap((f) => FIG_TAGS.has(f), v ? v.split('+') : []));
this.otPos = selectCtl('Position', OT_POS, (v) => swap((f) => POS_TAGS.has(f), v ? [v] : []));
this.sset = selectCtl('Sets', SETS, (v) => swap((f) => /^ss\d\d$/.test(f), v ? [v] : []));
- this.font = selectCtl('', [], (v) => set({ font: v, style: stylesOf(v).includes(currentStyle(engine)?.style ?? 'Regular') ? currentStyle(engine)?.style ?? 'Regular' : stylesOf(v)[0] ?? 'Regular' }));
+ this.font = selectCtl('', [], (v) => set({ font: v, style: stylesOf(v).includes(currentStyle(engine)?.style ?? 'Regular') ? currentStyle(engine)?.style ?? 'Regular' : stylesOf(v)[0] ?? 'Regular' }), { search: 'Search', terms: aliasesOf });
this.style = selectCtl('', [], (v) => { const inst = this.varInfo?.instances.find((i) => i.name === v); set({ style: v, axes: inst ? { ...inst.coords } : undefined }); });
this.size = numField('Size', 'pt', (v) => set({ size: v }), { min: 0.1, max: 1296 });
this.leading = numField('Leading', 'pt', (v) => set({ leading: v }), { min: 0, max: 5000, title: 'Leading; leave at auto for 120% of the size' });
From 7069258e72a2eb419a3ec9c00d79946a5848eadd Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 13:47:20 -0500
Subject: [PATCH 32/74] fix(pdf): a PDF that names a font by its Chinese,
Japanese or Korean name finds the installed font
---
frontend/HASHOUT_LOG.md | 9 +++++++++
frontend/src/io/pdf-read.ts | 4 ++++
2 files changed, 13 insertions(+)
diff --git a/frontend/HASHOUT_LOG.md b/frontend/HASHOUT_LOG.md
index 0903e9d..69de670 100644
--- a/frontend/HASHOUT_LOG.md
+++ b/frontend/HASHOUT_LOG.md
@@ -5078,3 +5078,12 @@ Tried on real files, in the built window, against 0.59.1 and 0.60.0 built side b
`npm test` 61 pass.
Still left out, by name: type in a composite font with no program in the file and no usable CMap (`noembed-identity.pdf`: Ryumin, Identity-H, Japan1, nothing embedded; reading it needs Adobe's character collection tables); type under a CMap stream in the file (`perf_text_cmap_mixed.pdf`). Not done: the same for a simple font, whose program is Type 1, TrueType or name-keyed CFF and whose glyph is chosen by an encoding (LibreOffice writes CJK that way; such a file with broken ToUnicode entries is left out with the sentence); `/W2`; `/ActualText`.
+
+### src/io/pdf-read.ts · a PDF that names a font by its Chinese, Japanese or Korean name finds the installed font
+- refers-to: src/io/pdf-read.ts :: FontNames (localized, resolve)
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+`FontNames` matched a `/BaseFont` against the installed families through `squash`, which keeps only `a-z0-9`, so every name written in another script squashed to nothing and went to the Helvetica fallback. The font listing now carries each face's other names (`aliases`, see the font service entry); `FontNames` keeps the ones with a character outside ASCII in `localized`, and `resolve` tries the whole name and then its family part there before the Latin rules. A name in ASCII goes the way it always did.
+
+Seen in the built window: the hand-built test PDF with its Big5 font named 文泉驛正黑 (a name of WenQuanYi Zen Hei, which is installed here) no longer lists that font under "Fonts not installed", and its line is set in WenQuanYi Zen Hei.
diff --git a/frontend/src/io/pdf-read.ts b/frontend/src/io/pdf-read.ts
index 7915829..28e6180 100644
--- a/frontend/src/io/pdf-read.ts
+++ b/frontend/src/io/pdf-read.ts
@@ -347,9 +347,11 @@ class FontNames {
private readonly postscript = new Map();
readonly substituted = new Map();
readonly outlined = new Set();
+ private readonly localized = new Map();
constructor(list: string[], installed: InstalledFont[]) {
for (const f of list) if (!this.known.has(squash(f))) this.known.set(squash(f), f);
for (const f of installed) if (f.postscript) this.postscript.set(squash(f.postscript), { family: f.family, style: f.style });
+ for (const f of installed) for (const a of f.aliases ?? []) if (/[^\x00-\x7f]/.test(a) && !this.localized.has(a)) this.localized.set(a, { family: f.family, style: f.style });
}
resolve(name: string, charset?: string): { family: string; style: string; shown: string } {
@@ -360,6 +362,8 @@ class FontNames {
const s = `${stylePart} ${famPart}`;
const weight = /Black|Heavy/i.test(s) ? 'Black' : /Semi ?bold|Demi/i.test(s) ? 'Semibold' : /Bold/i.test(s) ? 'Bold' : /Medium/i.test(s) ? 'Medium' : /Light/i.test(s) ? 'Light' : '';
const italic = /Ital|Obli/i.test(s), style = weight && italic ? `${weight} Italic` : weight || (italic ? 'Italic' : 'Regular');
+ const local = this.localized.get(raw) ?? this.localized.get(famPart);
+ if (local) return { family: local.family, style: this.localized.has(raw) ? local.style : style, shown: local.family };
const core = famPart.replace(/(PSMT|PS|MT)$/, '').replace(/(Bold|Italic|Oblique|Black|Light|Medium|Semibold|Regular)+$/i, '') || 'Helvetica';
const key = squash(core), alias = FONT_ALIAS[key];
const found = this.known.get(alias ? squash(alias) : key) ?? this.known.get(key.replace(/^lm/, 'latinmodern').replace(/\d+$/, '')) ?? this.known.get(key.replace(/\d+$/, ''));
From e5228d1357f01332ddd14d0f201c2a871143656f Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 14:11:22 -0500
Subject: [PATCH 33/74] fix(io): type in an EPS or PostScript file set in a
Chinese, Japanese or Korean font reads as its own characters, and
glyph-number type is left out with a note
---
frontend/src/io/ps-read.ts | 39 ++++++++++++++++++++++++++--------
frontend/src/io/text-decode.ts | 22 +++++++++++++++++++
2 files changed, 52 insertions(+), 9 deletions(-)
diff --git a/frontend/src/io/ps-read.ts b/frontend/src/io/ps-read.ts
index 42325fe..5850c4b 100644
--- a/frontend/src/io/ps-read.ts
+++ b/frontend/src/io/ps-read.ts
@@ -3,6 +3,7 @@ import { anchor, arcSegmentPath, mul, transformPath } from '../engine/geometry';
import { fill as fillItem, linearGradient, radialGradient, stop, stroke as strokeItem, toRgb } from '../engine/paint';
import { bytesStream, filterStream, subStream, toRgba, type PsStream, type Samples } from './ps-filters';
import { DEFAULT_CHAR, DEFAULT_PARA } from '../engine/text';
+import { csOf, psDecode } from './text-decode';
import type { Anchor, Color, Doc, Mat, Paint, PathData, SubPath, VNode } from '../engine';
type PsName = { t: 'name'; v: string; lit: boolean };
@@ -82,6 +83,7 @@ class Interp {
gstack: GState[] = [];
out: VNode[] = [];
skipped = new Set();
+ composed = new Map();
images: PendingImage[] = [];
imgSpace: ImgSpace = { n: 1 };
stamp = Date.now().toString(36);
@@ -528,27 +530,46 @@ const OPS: Record void> = {
setpattern: (ps) => { ps.pop(); }, makepattern: (ps) => { ps.pop(); ps.pop(); ps.push({ t: 'dict', v: new Map() }); },
shfill: (ps) => { const sh = ps.pop(); if (!isDict(sh)) return; const paint = shadingPaint(ps, sh); const c = ps.gs.clip; if (!paint || !c) { ps.skipped.add('shfill'); return; } const g = ps.gs.clip; ps.gs.clip = null; ps.emit({ id: newId('p'), kind: 'path', d: ps.toDoc(c.d), rule: c.even ? 'evenodd' : 'nonzero', opacity: 1, blend: 'normal', ap: { items: [fillItem(paint)], effects: [] } }); ps.gs.clip = g; },
image: (ps) => imageOp(ps, 'image'), colorimage: (ps) => imageOp(ps, 'colorimage'), imagemask: (ps) => imageOp(ps, 'imagemask'),
- findfont: (ps) => { const k = keyOf(ps.pop()); ps.push({ t: 'font', name: k, size: 1, m: [1, 0, 0, 1, 0, 0] }); }, definefont: (ps) => { const f = ps.pop(); ps.pop(); ps.push(f); }, undefinefont: (ps) => { ps.pop(); },
+ findfont: (ps) => { const k = keyOf(ps.pop()); ps.push({ t: 'font', name: ps.composed.get(k) ?? k, size: 1, m: [1, 0, 0, 1, 0, 0] }); }, definefont: (ps) => { const f = ps.pop(); ps.pop(); ps.push(f); }, undefinefont: (ps) => { ps.pop(); },
scalefont: (ps) => { const s = ps.num(), f = ps.pop() as PsFont; ps.push({ t: 'font', name: f?.name ?? 'Helvetica', size: (f?.size ?? 1) * s, m: f?.m ?? [1, 0, 0, 1, 0, 0] }); },
makefont: (ps) => { const m = ps.mat(ps.pop()) ?? [1, 0, 0, 1, 0, 0], f = ps.pop() as PsFont; ps.push({ t: 'font', name: f?.name ?? 'Helvetica', size: (f?.size ?? 1) * Math.sqrt(Math.abs(m[0] * m[3] - m[1] * m[2])), m }); },
setfont: (ps) => { const f = ps.pop(); if (typeof f === 'object' && f !== null && (f as PsFont).t === 'font') ps.gs.font = f as PsFont; },
selectfont: (ps) => { const s = ps.pop(), k = keyOf(ps.pop()); ps.gs.font = { t: 'font', name: k, size: typeof s === 'number' ? s : 12, m: [1, 0, 0, 1, 0, 0] }; },
currentfont: (ps) => ps.push(ps.gs.font ?? { t: 'font', name: 'Helvetica', size: 12, m: [1, 0, 0, 1, 0, 0] }),
- stringwidth: (ps) => { const s = ps.pop(); ps.push((typeof s === 'string' ? s.length : 0) * 0.5 * (ps.gs.font?.size ?? 12), 0); },
+ stringwidth: (ps) => { const s = ps.pop(), t = typeof s === 'string' ? textOf(ps.gs.font?.name ?? '', s) : ''; ps.push((t ?? (s as string)).length * (t === null ? 0.25 : 0.5) * (ps.gs.font?.size ?? 12), 0); },
+ glyphshow: (ps) => { const g = keyOf(ps.pop()), t = glyphText(g); if (t !== null) showText(ps, t, false); else ps.skipped.add('glyphs shown by name'); },
+ composefont: (ps) => { ps.pop(); const c = ps.pop(), k = keyOf(ps.pop()), name = `${k}--${isName(c) ? c.v : typeof c === 'string' ? c : ''}`; ps.composed.set(k, name); ps.push({ t: 'font', name, size: 1, m: [1, 0, 0, 1, 0, 0] }); },
show: (ps) => showText(ps, ps.pop()), ashow: (ps) => { const s = ps.pop(); ps.pop(); ps.pop(); showText(ps, s); }, widthshow: (ps) => { const s = ps.pop(); ps.pop(); ps.pop(); ps.pop(); showText(ps, s); },
awidthshow: (ps) => { const s = ps.pop(); for (let i = 0; i < 5; i++) ps.pop(); showText(ps, s); }, xshow: (ps) => { ps.pop(); showText(ps, ps.pop()); }, yshow: (ps) => { ps.pop(); showText(ps, ps.pop()); }, xyshow: (ps) => { ps.pop(); showText(ps, ps.pop()); },
kshow: (ps) => { const s = ps.pop(); ps.pop(); showText(ps, s); }, charpath: (ps) => { ps.pop(); ps.pop(); ps.skipped.add('charpath'); },
};
-function showText(ps: Interp, s: PsObj): void {
+const GLYPH_TYPE = 'type in glyph-number fonts (Identity-H)';
+function textOf(font: string, s: string): string | null {
+ if (/Identity-[HV]/.test(font)) return null;
+ const cs = csOf(font);
+ if (!cs && /^(Ryumin|GothicBBB|Midashi|Heisei|Koz(Min|Go))[\w-]*-[HV]$/.test(font)) return psDecode(s.replace(/[\x21-\x7e]/g, (c) => String.fromCharCode(c.charCodeAt(0) | 0x80)), 'euc-jp') ?? s;
+ return cs ? psDecode(s, cs) ?? s : s;
+}
+
+function glyphText(name: string): string | null {
+ const m = /^uni((?:[0-9A-F]{4})+)$/.exec(name), n = /^u([0-9A-F]{4,6})$/.exec(name);
+ const cps = m ? m[1].match(/.{4}/g)!.map((h) => parseInt(h, 16)) : n ? [parseInt(n[1], 16)] : [];
+ return cps.length && cps.every((c) => c <= 0x10ffff && (c < 0xd800 || c > 0xdfff)) ? String.fromCodePoint(...cps) : null;
+}
+
+function showText(ps: Interp, s: PsObj, raw = true): void {
if (typeof s !== 'string' || !s.trim() || !ps.gs.cp) return;
const f = ps.gs.font ?? { t: 'font' as const, name: 'Helvetica', size: 12, m: [1, 0, 0, 1, 0, 0] as Mat };
const i = inv(ps.gs.ctm), cp = ps.gs.cp, u = { x: i[0] * cp.x + i[2] * cp.y + i[4], y: i[1] * cp.x + i[3] * cp.y + i[5] };
- const xf = mul(mul(ps.flip, mul(ps.gs.ctm, [1, 0, 0, 1, u.x, u.y])), [1, 0, 0, -1, 0, 0]);
- const fam = FONT_MAP.find(([re]) => re.test(f.name))?.[1] ?? f.name.split('-')[0].replace(/MT$|PS$/, '');
- const style = /BoldItalic|BoldOblique/i.test(f.name) ? 'Bold Italic' : /Bold/i.test(f.name) ? 'Bold' : /Italic|Oblique/i.test(f.name) ? 'Italic' : 'Regular';
- ps.emit({ id: newId('t'), kind: 'text', mode: 'point', spans: [{ text: s, style: { ...DEFAULT_CHAR, font: fam, style, size: f.size, fill: { type: 'color', color: ps.gs.color } } }], para: { ...DEFAULT_PARA }, xf, opacity: 1, blend: 'normal', ap: { items: [], effects: [] } });
- const adv = s.length * 0.5 * f.size;
+ const t = raw ? textOf(f.name, s) : s, adv = (t === null ? s.length / 2 : t.length) * 0.5 * f.size;
+ if (t === null) ps.skipped.add(GLYPH_TYPE);
+ else {
+ const xf = mul(mul(ps.flip, mul(ps.gs.ctm, [1, 0, 0, 1, u.x, u.y])), [1, 0, 0, -1, 0, 0]);
+ const fam = FONT_MAP.find(([re]) => re.test(f.name))?.[1] ?? f.name.split('-')[0].replace(/MT$|PS$/, '');
+ const style = /BoldItalic|BoldOblique/i.test(f.name) ? 'Bold Italic' : /Bold/i.test(f.name) ? 'Bold' : /Italic|Oblique/i.test(f.name) ? 'Italic' : 'Regular';
+ ps.emit({ id: newId('t'), kind: 'text', mode: 'point', spans: [{ text: t, style: { ...DEFAULT_CHAR, font: fam, style, size: f.size, fill: { type: 'color', color: ps.gs.color } } }], para: { ...DEFAULT_PARA }, xf, opacity: 1, blend: 'normal', ap: { items: [], effects: [] } });
+ }
ps.gs.cp = ps.user(u.x + adv, u.y);
}
@@ -602,5 +623,5 @@ export async function readEpsVector(data: ArrayBuffer, title: string): Promise !/^(error|AI|Adobe)/.test(k)).slice(0, 12);
- return { doc, assets, skipped: [...new Set([...skipped.filter((k) => /image|shfill|charpath/.test(k)), ...(skipped.some((k) => !/image|shfill|charpath/.test(k)) ? ['operators it does not know'] : [])])] };
+ return { doc, assets, skipped: [...new Set([...skipped.filter((k) => /image|shfill|charpath|glyph/.test(k)), ...(skipped.some((k) => !/image|shfill|charpath|glyph/.test(k)) ? ['operators it does not know'] : [])])] };
}
diff --git a/frontend/src/io/text-decode.ts b/frontend/src/io/text-decode.ts
index 939667f..9e9c8b7 100644
--- a/frontend/src/io/text-decode.ts
+++ b/frontend/src/io/text-decode.ts
@@ -45,3 +45,25 @@ export function cadEscapes(s: string, cp?: string | null, codes = false): string
return c > 255 ? m : c < 128 ? String.fromCharCode(c) : decode(Uint8Array.of(c), cp || 'windows-1252', true) ?? m;
});
}
+
+const CMAPS: Array<[RegExp, string]> = [
+ [/UCS2|UTF16/i, 'utf-16be'], [/UTF8/i, 'utf-8'], [/UTF32|Identity-[HV]|(^|-)CNS/i, ''],
+ [/(^|-)(B5|ETen|HKscs|HKdl|HKgccs|HKm\d)/i, 'big5'], [/(^|-)GB(K|pc|T|-EUC|18030)/i, 'gb18030'], [/(^|-)(KSC|UHC)/i, 'euc-kr'],
+ [/RKSJ|(^|-)(90ms|90pv|83pv)/i, 'shift_jis'], [/(^|-)EUC-[HV]$/i, 'euc-jp'],
+ [/^_?P?MingLiU/i, 'big5'], [/^_?N?Sim(Sun|Hei)/i, 'gb18030'], [/^_?MS-P?(Mincho|Gothic)/i, 'shift_jis'], [/^_?(Batang|Gulim|Dotum|Gungsuh)/i, 'euc-kr'],
+];
+
+export function csOf(name: string): string {
+ for (const [re, cs] of CMAPS) if (re.test(name)) return cs;
+ return '';
+}
+
+export function psDecode(s: string, cs: string): string | null {
+ return decode(Uint8Array.from(s, (c) => c.charCodeAt(0) & 255), cs, true);
+}
+
+export function psUni(s: string, cs = ''): string {
+ if (!/[\x80-\xff]/.test(s) || /[^\x00-\xff]/.test(s)) return s;
+ if (s.charCodeAt(0) === 0xfe && s.charCodeAt(1) === 0xff) return psDecode(s.slice(2), 'utf-16be') ?? s;
+ return psDecode(s, 'utf-8') ?? (cs ? psDecode(s, cs) : null) ?? psDecode(s, 'windows-1252') ?? s;
+}
From f9c9c5f52f6c8ef9c51c3ca870a3a7e0bc7ab5ca Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 14:11:30 -0500
Subject: [PATCH 34/74] fix(io): layer, swatch, pattern, symbol and brush names
in an .ai and type in an old .ai read in their own script instead of as
Latin-1 bytes
---
frontend/src/io/ai-legacy.ts | 33 +++++++++++++++++++--------------
1 file changed, 19 insertions(+), 14 deletions(-)
diff --git a/frontend/src/io/ai-legacy.ts b/frontend/src/io/ai-legacy.ts
index 33f1cb1..20b1ac2 100644
--- a/frontend/src/io/ai-legacy.ts
+++ b/frontend/src/io/ai-legacy.ts
@@ -8,6 +8,7 @@ import { fill as fillItem, linearGradient, radialGradient, solid, stop, stroke a
import { DEFAULT_CHAR, DEFAULT_PARA } from '../engine/text';
import { zstdDecompress } from './ai-zstd';
import { parseStyles, resolveStyle, type PaintRead, type StyleHost, type StyleResult } from './ai-styles';
+import { csOf, psDecode, psUni } from './text-decode';
import type { Anchor, Appearance, BlendMode, BrushDef, Color, CompoundNode, Doc, GradientStop, ImageNode, LayerNode, Mat, Paint, PathData, PathNode, PatternDef, Span, SubPath, SymbolDef, TextNode, Units, VNode } from '../engine';
export interface AiRead { doc: Doc; assets: Map; skipped: string[]; unknown: string[]; version: string; kept: string[] }
@@ -20,7 +21,7 @@ type Tok = { t: 'n'; v: number } | { t: 's'; v: string } | { t: 'x'; v: string }
interface GradDef { type: number; stops: GradientStop[] }
interface Meta {
version: string; bbox: number[] | null; tile: number[] | null; artboards: number[][]; units: Units; cmyk: boolean;
- customs: Map; gradients: Map; skipped: Set; pages: number; defs: Def[];
+ customs: Map; gradients: Map; skipped: Set; pages: number; defs: Def[]; cs: string;
}
interface Ctx { kind: 'layer' | 'group' | 'clip' | 'compound'; inner?: number; nodes: VNode[]; clipper?: VNode; kids: PathNode[]; ap?: Appearance; rule?: 'nonzero' | 'evenodd'; clipped?: boolean; opacity?: number; blend?: BlendMode; styled?: string; sub?: { name: string; hidden: boolean; locked: boolean } }
/** A group the file marked with an art style: Illustrator wrote its expanded look, and the unpainted source art follows. */
@@ -169,13 +170,14 @@ function tokenize(s: string): Tok[] {
interface Prep { ops: string; datas: string[]; meta: Meta }
function prepare(text: string, bins: string[] = []): Prep {
- const meta: Meta = { version: '', bbox: null, tile: null, artboards: [], units: 'pt', cmyk: true, customs: new Map(), gradients: new Map(), skipped: new Set(), pages: 1, defs: [] };
+ const meta: Meta = { version: '', bbox: null, tile: null, artboards: [], units: 'pt', cmyk: true, customs: new Map(), gradients: new Map(), skipped: new Set(), pages: 1, defs: [], cs: '' };
const lines = text.split(/\r\n|\r|\n/), keep: string[] = [], datas: string[] = [];
let cap: Def | null = null, layerIn = false;
const num =(s: string): number[] => (s.match(/[-+]?(\d+\.?\d*|\.\d+)([eE][-+]?\d+)?/g) ?? []).map(Number);
- let skipEnd: string | null = null, nonPrint = 0, grad: { name: string; lines: string[] } | null = null, inData: string[] | null = null, lastCustom = false, binAt = -1;
+ let skipEnd: string | null = null, nonPrint = 0, grad: { name: string; lines: string[] } | null = null, inData: string[] | null = null, lastCustom = false, lastFonts = false, binAt = -1;
+ const fonts = (l: string): void => { for (const f of l.split(/\s+/)) if (!meta.cs && f) meta.cs = csOf(f); };
const customs = (l: string): void => {
- for (const m of l.matchAll(/([-+]?[\d.]+)\s+([-+]?[\d.]+)\s+([-+]?[\d.]+)\s+([-+]?[\d.]+)\s+\(([^)]*)\)/g)) meta.customs.set(m[5], { kind: 'cmyk', c: Number(m[1]) * 100, m: Number(m[2]) * 100, y: Number(m[3]) * 100, k: Number(m[4]) * 100 });
+ for (const m of l.matchAll(/([-+]?[\d.]+)\s+([-+]?[\d.]+)\s+([-+]?[\d.]+)\s+([-+]?[\d.]+)\s+\(([^)]*)\)/g)) meta.customs.set(firstString(`(${m[5]})`), { kind: 'cmyk', c: Number(m[1]) * 100, m: Number(m[2]) * 100, y: Number(m[3]) * 100, k: Number(m[4]) * 100 });
};
const header = (l: string): void => {
let m: RegExpExecArray | null;
@@ -188,11 +190,14 @@ function prepare(text: string, bins: string[] = []): Prep {
else if ((m = /^%AI9_ColorModel:\s*(\d+)/.exec(l))) meta.cmyk = Number(m[1]) !== 1;
else if ((m = /^%%CMYKCustomColor:\s*(.*)$/.exec(l))) { customs(m[1]); lastCustom = true; return; }
else if ((m = /^%%RGBCustomColor:\s*(.*)$/.exec(l))) {
- for (const g of m[1].matchAll(/([-+]?[\d.]+)\s+([-+]?[\d.]+)\s+([-+]?[\d.]+)\s+\(([^)]*)\)/g)) meta.customs.set(g[4], { kind: 'rgb', r: Math.round(Number(g[1]) * 255), g: Math.round(Number(g[2]) * 255), b: Math.round(Number(g[3]) * 255) });
+ for (const g of m[1].matchAll(/([-+]?[\d.]+)\s+([-+]?[\d.]+)\s+([-+]?[\d.]+)\s+\(([^)]*)\)/g)) meta.customs.set(firstString(`(${g[4]})`), { kind: 'rgb', r: Math.round(Number(g[1]) * 255), g: Math.round(Number(g[2]) * 255), b: Math.round(Number(g[3]) * 255) });
lastCustom = true;
return;
} else if (lastCustom && (m = /^%%\+\s*(.*)$/.exec(l))) { customs(m[1]); return; }
+ else if ((m = /^%%DocumentFonts:\s*(.*)$/.exec(l))) { fonts(m[1]); lastCustom = false; lastFonts = true; return; }
+ else if (lastFonts && (m = /^%%\+\s*(.*)$/.exec(l))) { fonts(m[1]); return; }
lastCustom = false;
+ lastFonts = false;
};
for (let li = 0; li < lines.length; li++) {
let l = lines[li];
@@ -365,7 +370,7 @@ class Reader {
id = newId('s');
this.swatches.set(name, id);
const c = this.meta.customs.get(name) ?? base;
- this.swatchDefs.push({ id, name, paint: solid(c), global: true, spot: true });
+ this.swatchDefs.push({ id, name: psUni(name, this.meta.cs), paint: solid(c), global: true, spot: true });
}
return this.colorPaint(base, Math.round((1 - tint) * 1000) / 10, id);
}
@@ -557,7 +562,7 @@ class Reader {
textShow(s: string): void {
const t = this.text;
if (!t || !s) return;
- const style = this.styleNow(), str = s.replace(/\r\n?/g, '\n');
+ const cs = csOf(this.run.name) || this.meta.cs, style = this.styleNow(), str = (cs ? psDecode(s, cs) ?? s : s).replace(/\r\n?/g, '\n');
const last = t.runs[t.runs.length - 1];
if (last && JSON.stringify(last.style) === JSON.stringify(style)) last.text += str; else t.runs.push({ text: str, style });
}
@@ -640,10 +645,10 @@ class Reader {
case 'Xy': g.blend = BLEND[Math.round(a[0] ?? 0)] ?? 'normal'; g.opacity = Math.max(0, Math.min(1, a.length > 1 ? a[1] : 1)); break;
case 'Lb': this.beginLayer(a); break;
case 'LB': this.flushLayer(); break;
- case 'Ln': { const L = this.layers[this.layers.length - 1]; if (L) L.name = this.str() || L.name; break; }
+ case 'Ln': { const L = this.layers[this.layers.length - 1]; if (L) L.name = psUni(this.str(), this.meta.cs) || L.name; break; }
case ':': if (this.stack.some((t) => t.t === 'x' && t.v === 'XMLUID')) this.xmlNext = true; break;
case ';': if (this.xmlNext) { this.xmlNext = false; const nm = xmlName(this.str()); if (nm && this.lastNode && !this.lastNode.name) this.lastNode.name = nm; } break;
- case 'SL': this.lastNode = null; this.top().sub ={ name: this.str(), hidden: n(-2) === 0, locked: n(-1) === 0 }; break;
+ case 'SL': this.lastNode = null; this.top().sub ={ name: psUni(this.str(), this.meta.cs), hidden: n(-2) === 0, locked: n(-1) === 0 }; break;
case 'Bb': this.inBb = true; break;
case 'Xx': case 'XX': {
const type = n(-1), tint = n(-2);
@@ -821,15 +826,15 @@ function buildDefs(rd: Reader, doc: Doc): string[] {
}
const nodes = artOf(rd, ls.slice(1));
if (!nodes.length) { sk.add('patterns with no visible art'); continue; }
- const def: PatternDef = { id: newId('pt'), name, tile: { x: x0 - rd.ox, y: rd.oy - y1, w: x1 - x0, h: y1 - y0 }, art: group(nodes), type: 'grid', hs: 0, vs: 0 };
+ const shown = psUni(name, rd.meta.cs), def: PatternDef = { id: newId('pt'), name: shown, tile: { x: x0 - rd.ox, y: rd.oy - y1, w: x1 - x0, h: y1 - y0 }, art: group(nodes), type: 'grid', hs: 0, vs: 0 };
patterns.push(def);
- swatches.push({ id: newId('s'), name, paint: { type: 'pattern', pattern: def.id, xf: [1, 0, 0, 1, 0, 0] }, global: false, spot: false });
+ swatches.push({ id: newId('s'), name: shown, paint: { type: 'pattern', pattern: def.id, xf: [1, 0, 0, 1, 0, 0] }, global: false, spot: false });
rd.patterns.set(name, def.id);
}
for (const d of defs) {
if (d.kind !== 'symbol') continue;
if (d.raster) { sk.add('symbols that hold placed images'); continue; }
- const ls = lines(d), name = firstString(ls[0] ?? '') || `Symbol ${symbols.length + 1}`;
+ const ls = lines(d), name = psUni(firstString(ls[0] ?? ''), rd.meta.cs) || `Symbol ${symbols.length + 1}`;
const nodes = artOf(rd, ls);
if (!nodes.length) { sk.add('symbols with no visible art'); continue; }
const art = group(nodes), b = geomBounds(doc, art);
@@ -853,7 +858,7 @@ function buildDefs(rd: Reader, doc: Doc): string[] {
const s = tokenize(d.lines.join('\n')).filter((t) => t.t === 's').map((t) => (t.t === 's' ? t.v : ''));
const tool = s[0] ?? '';
if (!/Brush Tool$/.test(tool)) { if (!/Brush Manager/.test(tool)) sk.add('live effects and plug-in objects'); continue; }
- const name = s[1] ?? '', params = s.slice(2).join('');
+ const name = psUni(s[1] ?? '', rd.meta.cs), params = s.slice(2).join('');
const bad = (): void => { sk.add('brushes whose definition is incomplete'); };
if (/Calligraphic/.test(tool)) {
const n = params.trim().split(/\s+/).map(Number);
@@ -952,7 +957,7 @@ export async function buildAi(text: string, title: string, early: Set, o
return ly;
});
doc.swatches = [...doc.swatches, ...rd.swatchDefs];
- for (const [name, c] of meta.customs) if (!rd.swatches.has(name)) doc.swatches.push({ id: newId('s'), name, paint: solid(c), global: true, spot: true });
+ for (const [name, c] of meta.customs) if (!rd.swatches.has(name)) doc.swatches.push({ id: newId('s'), name: psUni(name, meta.cs), paint: solid(c), global: true, spot: true });
const assets = new Map();
for (const im of rd.images) {
const blob = await rasterPng(im.w, im.h, im.comps, im.bits, im.data, im.binary).catch(() => null);
From e72b3c8cd6949a2b7d115101a99bd474b3812684 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 14:11:36 -0500
Subject: [PATCH 35/74] fix(io): an .ai whose live type is only on its PDF page
opens through that page, and type the Illustrator data cannot carry is named
in the open note
---
frontend/src/io/ai-guard.ts | 9 +++++++--
frontend/src/io/ai-legacy.ts | 1 +
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/frontend/src/io/ai-guard.ts b/frontend/src/io/ai-guard.ts
index 79fe0b6..ad09ed3 100644
--- a/frontend/src/io/ai-guard.ts
+++ b/frontend/src/io/ai-guard.ts
@@ -30,6 +30,11 @@ export function countObjects(doc: Doc, cap: number): number {
return n;
}
+export function hasText(doc: Doc): boolean {
+ const walk = (nodes: VNode[]): boolean => nodes.some((c) => { const k = childrenOf(c); return c.kind === 'text' || (!!k && walk(k as VNode[])); });
+ return doc.layers.some((l) => walk(l.children as VNode[]));
+}
+
async function shot(doc: Doc, assets: Map, i: number, w: number, h: number | null): Promise {
const a = doc.artboards[i];
if (!a) return null;
@@ -79,6 +84,6 @@ export async function guardAi(read: AiRead, data: ArrayBuffer, title: string, pa
boards.push(a ? differing(a, b) : 1);
}
} catch (err) { return done({ pdf: null, diff: 0, skipped: true, boards, why: `render failed: ${err instanceof Error ? err.message : String(err)}` }); }
- const diff = Math.max(0, ...boards);
- return done({ pdf: diff > GUARD_LIMIT ? pdf : null, diff, skipped: false, boards, why: '' });
+ const diff = Math.max(0, ...boards), lost = hasText(pdf.doc) && !hasText(read.doc);
+ return done({ pdf: diff > GUARD_LIMIT || lost ? pdf : null, diff, skipped: false, boards, why: lost ? 'type only on the page' : '' });
}
diff --git a/frontend/src/io/ai-legacy.ts b/frontend/src/io/ai-legacy.ts
index 20b1ac2..7fda3ea 100644
--- a/frontend/src/io/ai-legacy.ts
+++ b/frontend/src/io/ai-legacy.ts
@@ -936,6 +936,7 @@ export interface AiBuildOpts { boxes?: number[][]; names?: string[]; rasters?: s
export async function buildAi(text: string, title: string, early: Set, opts: AiBuildOpts): Promise {
const prep = prepare(text, opts.rasters), meta = prep.meta;
for (const s of early) meta.skipped.add(s);
+ if (/^(%_)?\/AI11Text :/m.test(text)) meta.skipped.add('type');
const boxes: number[][] = opts.boxes?.length ? opts.boxes : meta.artboards.length ? meta.artboards : meta.tile ? [meta.tile] : meta.bbox ? [meta.bbox] : [[0, 0, 612, 792]];
const ox = Math.min(...boxes.map((b) => b[0])), oy = Math.max(...boxes.map((b) => b[3]));
const rd = new Reader(meta, prep.datas, ox, oy);
From f15796fc1ca91762633a0a78b1828a58e351af7f Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 14:11:36 -0500
Subject: [PATCH 36/74] fix(io): layer, swatch, symbol and artboard names
outside ASCII are written whole into an .ai instead of as question marks
---
frontend/src/io/ai-private.ts | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/frontend/src/io/ai-private.ts b/frontend/src/io/ai-private.ts
index af51aa0..e7a0436 100644
--- a/frontend/src/io/ai-private.ts
+++ b/frontend/src/io/ai-private.ts
@@ -35,6 +35,15 @@ const closedOf = new WeakMap();
const nf = (v: number, p = 1e5): string => { const r = Math.round(v * p) / p; return Object.is(r, -0) || !Number.isFinite(r) ? '0' : String(r); };
const cf = (v: number): string => nf(Math.max(0, Math.min(1, v)), 1e9);
const ps = (s: string): string => `(${s.replace(/[\\()]/g, (c) => `\\${c}`).replace(/\r|\n/g, ' ').replace(/[^\x20-\x7e]/g, '?')})`;
+const esc = (b: number): string => (b === 0x28 || b === 0x29 || b === 0x5c ? `\\${String.fromCharCode(b)}` : b >= 0x20 && b <= 0x7e ? String.fromCharCode(b) : `\\${b.toString(8).padStart(3, '0')}`);
+const pu = (s: string): string => `(${[...new TextEncoder().encode(s.replace(/\r|\n/g, ' '))].map(esc).join('')})`;
+const pw = (s: string): string => {
+ if (/^[\x20-\x7e]*$/.test(s)) return ps(s);
+ const t = s.replace(/\r|\n/g, ' ');
+ let o = '(\\376\\377';
+ for (let i = 0; i < t.length; i++) { const c = t.charCodeAt(i); o += esc(c >> 8) + esc(c & 255); }
+ return `${o})`;
+};
const dateLine = (d: Date): string => `${d.getUTCMonth() + 1}/${d.getUTCDate()}/${String(d.getUTCFullYear()).slice(2)} ${d.getUTCHours() % 12 || 12}:${String(d.getUTCMinutes()).padStart(2, '0')} ${d.getUTCHours() < 12 ? 'AM' : 'PM'}`;
export interface AiPrivateInput {
@@ -106,7 +115,7 @@ class Emit {
const sw = this.spots.get(paint.swatch);
if (sw && sw.paint.type === 'color') {
const k = cmykOf(sw.paint.color);
- return [`${cf(k.c)} ${cf(k.m)} ${cf(k.y)} ${cf(k.k)} ${ps(sw.name)} ${nf(1 - (paint.tint ?? 100) / 100, 1e6)} ${stroke ? 'XS' : 'Xs'}`];
+ return [`${cf(k.c)} ${cf(k.m)} ${cf(k.y)} ${cf(k.k)} ${pu(sw.name)} ${nf(1 - (paint.tint ?? 100) / 100, 1e6)} ${stroke ? 'XS' : 'Xs'}`];
}
}
if (r.type === 'color') return this.solid(r.color, stroke);
@@ -348,7 +357,7 @@ class Emit {
const c = this.layerColour(l), locked = parentLocked || !!l.locked;
this.line('%AI5_BeginLayer');
this.line(`${l.hidden ? 0 : 1} ${l.template ? 0 : 1} ${locked || l.template ? 0 : 1} ${l.printable === false || l.template ? 0 : 1} ${l.template ? 1 : 0} 0 ${l.hidden ? 0 : 1} ${c.idx} ${c.rgb.join(' ')} 0 50 0 Lb`);
- this.line(`${ps(l.name || 'Layer')} Ln`);
+ this.line(`${pu(l.name || 'Layer')} Ln`);
this.line('0 AE');
this.artDict(l.name || 'Layer');
this.lock = locked ? 1 : 0;
@@ -369,7 +378,7 @@ class Emit {
sub.images.clear();
for (const [k, v] of this.images) sub.images.set(k, v);
sub.line('%AI14_BeginSymbol');
- sub.line(ps(s.name));
+ sub.line(pu(s.name));
sub.line('0 A');
sub.line('0 Xw');
sub.line('0 Ae');
@@ -424,10 +433,10 @@ function paletteLines(doc: Doc, e: Emit): string[] {
const c = s.paint.color;
if (s.spot) {
const k = cmykOf(c), lab = labOf(c);
- out.push(`${cf(k.c)} ${cf(k.m)} ${cf(k.y)} ${cf(k.k)} ${nf(lab[0], 1e6)} ${nf(lab[1], 1e6)} ${nf(lab[2], 1e6)} ${ps(s.name)} 0 2 Xx`, ps(s.name), 'Pc');
+ out.push(`${cf(k.c)} ${cf(k.m)} ${cf(k.y)} ${cf(k.k)} ${nf(lab[0], 1e6)} ${nf(lab[1], 1e6)} ${nf(lab[2], 1e6)} ${pu(s.name)} 0 2 Xx`, pu(s.name), 'Pc');
} else {
for (const l of e.solid(c, false)) out.push(l);
- out.push(ps(s.name), 'Pc');
+ out.push(pu(s.name), 'Pc');
}
}
out.push('PB', '%AI5_EndPalette');
@@ -539,8 +548,8 @@ export async function buildAiPrivate(inp: AiPrivateInput): Promise {
hdr.push('%AI5_FileFormat 13.0', '%AI12_BuildNumber: 326', '%AI3_ColorUsage: Color', '%AI7_ImageSettings: 0');
const spots = [...spotNames.values()];
if (spots.length) {
- hdr.push(`%%DocumentCustomColors: ${spots.map((s) => ps(s.name)).join(`${CR}%%+ `)}`);
- const cc = spots.map((s) => { const c = s.paint.type === 'color' ? s.paint.color : { kind: 'gray' as const, k: 50 }, v = toRgb(c); return `${cf(v.r / 255)} ${cf(v.g / 255)} ${cf(v.b / 255)} ${ps(s.name)}`; });
+ hdr.push(`%%DocumentCustomColors: ${spots.map((s) => pu(s.name)).join(`${CR}%%+ `)}`);
+ const cc = spots.map((s) => { const c = s.paint.type === 'color' ? s.paint.color : { kind: 'gray' as const, k: 50 }, v = toRgb(c); return `${cf(v.r / 255)} ${cf(v.g / 255)} ${cf(v.b / 255)} ${pu(s.name)}`; });
hdr.push(`%%RGBCustomColor: ${cc.join(`${CR}%%+ `)}`);
}
hdr.push(rgbDoc ? '%%RGBProcessColor: 0 0 0 ([Registration])' : '%%CMYKProcessColor: 1 1 1 1 ([Registration])');
@@ -574,13 +583,13 @@ export async function buildAiPrivate(inp: AiPrivateInput): Promise {
body.push('%AI5_Begin_NonPrinting', 'Np', '%AI9_BeginArtStyles', '/KnownStyle :', '([Default]) /Name ,', '/SimpleStyle :', '0 O', '0 0 0 0 1 1 1 Xa', '0 R', '0.749721467494965 0.679194271564484 0.670496642589569 0.901457190513611 0 0 0 XA', '0 1 0 0 0 Xy', '0 J 0 j 1 w 10 M []0 d', '0 XR', '1 1 Xd', '/Paint ;', ' /Def ;', '%AI9_EndArtStyles', '%AI5_End_NonPrinting--');
body.push(...paletteLines(doc, e));
body.push('%AI5_Begin_NonPrinting', 'Np', '%AI9_BeginArtStyleList', '([Default])', '%AI9_EndArtStyleList', '%AI5_End_NonPrinting--');
- body.push('%AI5_Begin_NonPrinting', 'Np', '%AI10_BeginSymbolList ', ...doc.symbols.map((s) => ps(s.name)), '%AI10_EndSymbolList ', '%AI5_End_NonPrinting--');
+ body.push('%AI5_Begin_NonPrinting', 'Np', '%AI10_BeginSymbolList ', ...doc.symbols.map((s) => pu(s.name)), '%AI10_EndSymbolList ', '%AI5_End_NonPrinting--');
body.push('%AI9_BeginDocumentData', '%_/Document :', '%_/Dictionary :');
body.push('%_0 /Int (AI9 Flattening Quality Level) ,', `%_${doc.colorMode === 'rgb' ? 1 : 0} /Int (AI11 Document Setup Color Mode) ,`, '%_/Array :');
const base = { x: 7200 - Math.round(a0.w / 2), y: 7200 + Math.round(a0.h / 2) };
for (const a of abs) {
const x0 = a.x - a0.x, y0 = a0.y - a.y;
- body.push('%_/Dictionary :', `%_${ps(a.name)} /UnicodeString (Name) ,`, `%_${nf(x0)} ${nf(y0)} /RealPointRelToROrigin`, '%_ (PositionPoint1) ,', `%_${nf(base.x + x0)} ${nf(base.y + y0)} /RealPoint`, '%_ (RulerOrigin) ,', '%_0 /Int (DisplayMark) ,', `%_${nf(x0 + a.w)} ${nf(y0 - a.h)} /RealPointRelToROrigin`, '%_ (PositionPoint2) ,', '%_1 /Real (PAR) ,', `%_${/^Artboard \d+$/.test(a.name) ? 1 : 0} /Bool (IsArtboardDefaultName) ,`, '%_; ,');
+ body.push('%_/Dictionary :', `%_${pw(a.name)} /UnicodeString (Name) ,`, `%_${nf(x0)} ${nf(y0)} /RealPointRelToROrigin`, '%_ (PositionPoint1) ,', `%_${nf(base.x + x0)} ${nf(base.y + y0)} /RealPoint`, '%_ (RulerOrigin) ,', '%_0 /Int (DisplayMark) ,', `%_${nf(x0 + a.w)} ${nf(y0 - a.h)} /RealPointRelToROrigin`, '%_ (PositionPoint2) ,', '%_1 /Real (PAR) ,', `%_${/^Artboard \d+$/.test(a.name) ? 1 : 0} /Bool (IsArtboardDefaultName) ,`, '%_; ,');
}
body.push('%_; (ArtboardArray) ,', '%_;', '%_;', '%AI9_EndDocumentData', '%%EndSetup');
body.push(...layerOut.out, '%%PageTrailer', 'gsave annotatepage grestore showpage', '%%Trailer', '%%EOF');
From 0434c2d08d219f57777786c11171f441367d3458 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 14:16:31 -0500
Subject: [PATCH 37/74] docs(log): the reasons behind the 0.61.0 text and font
changes
---
backend/HASHOUT_LOG.md | 36 +++++++++
frontend/HASHOUT_LOG.md | 162 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 198 insertions(+)
diff --git a/backend/HASHOUT_LOG.md b/backend/HASHOUT_LOG.md
index aea66fb..29fa8c4 100644
--- a/backend/HASHOUT_LOG.md
+++ b/backend/HASHOUT_LOG.md
@@ -959,3 +959,39 @@ The PDF reader in the window meets type whose characters the file does not name
Parsed programs are kept by the first 32 hex digits of their SHA-256, the last six used, behind one lock (fontTools objects are not safe to share between threads, and the route runs in the thread pool). An unknown key answers 409 and the window sends the program again. The route sits behind the same window key and local guard as every other route and reads no file of this computer, only the bytes it is sent.
Run against the programs embedded in nine public PDFs of the pdf.js test corpus (TrueType in Arial Unicode MS, AokinMincho, four Arabic faces, two test faces; CFF CID in Neo Sans Intel and Reitam) and a 141 KB CFF CID subset of Noto Sans CJK TC: every one loads and draws. `pytest` 196 pass. Not read: a Type 1 program (`FontFile`), which a simple font carries; the window does not ask for those.
+
+### app/services/fonts.py, app/routers/fonts.py · a font's names in every language, legacy name encodings, which font has a character, and CJK matches for a CJK font (issue 17)
+- refers-to: app/services/fonts.py :: LEGACY, COMMON, _plain, _strict, _fit, _decode, _names, _members, _scan, index, listing, find, _cmap, _upright, cover, _measure, similar; app/routers/fonts.py :: cover
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+Only one name per name ID was kept, preferring English, so a font could not be found by its Chinese, Japanese or Korean name (`find` of WenQuanYi Zen Hei's Chinese name answered nothing). Every face now also lists its other family, full and PostScript names (IDs 1, 4, 6, 16, every language) as `aliases`; `find` tries the family first and then the aliases; the listing sends them. The scan is cached in memory only, and a missing key is read as empty.
+
+Name records of platform 3 with encoding 2 to 5 (Shift-JIS, PRC, Big5, Wansung) and of the Macintosh platform with a Japanese, Chinese or Korean script were read as UTF-16 or Mac Roman and came out as garbage. `_decode` tries both readings of a platform 3 legacy record (many Windows fonts store UTF-16 there despite the encoding id): the legacy one only when every 16-bit unit's high byte is 0 or at least 0x81, and when both are valid the one with more characters of the codec's common two-byte set wins, a tie going to UTF-16. A record that decodes as neither is skipped.
+
+`cover(cp, prefer)` answers the first upright, Regular-like face that has a code point: the preferred families first, then by family name. Each face's cmap is read once with fontTools and kept as a sorted array of code points, identical maps shared; a collection after each load keeps the peak near 140 MB where it reached 450 MB without it, and the kept maps total about 2 MB here. `GET /api/fonts/cover?cp=&prefer=` answers `{family, style}`, 404 when nothing has the character and 422 outside Unicode.
+
+`similar` drops a candidate that shares none of the reference's CJK code page bits (OS/2 `ulCodePageRange1`, bits 17 to 21), so a Chinese font's matches are Chinese, Japanese or Korean fonts and not Latin ones of the same weight.
+
+Run on the 376 faces of this machine: family, style, full and PostScript names are the same as before for every face; `find` by WenQuanYi's two Chinese names and IPA Gothic's Japanese name answers the font; `cover` answers a Thai face for U+0E01, a Devanagari one for U+0915, Noto Sans CJK TC for U+4E2D when preferred, and 404 for a private-use code point. The legacy decoding was run on made records only (31 real Windows font names in both storings, and the four Macintosh scripts): no font here has such a record. `pytest` 196 pass.
+
+### app/services/dwg.py, app/routers/io.py · a converter's DXF travels as bytes
+- refers-to: app/services/dwg.py :: to_dxf; app/routers/io.py :: dwg_to_dxf
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+`dwg2dxf` writes a DXF in the drawing's own version and code page, and decoding that as UTF-8 with replacement lost every Chinese, Japanese or Korean character of a drawing older than 2007 before the window saw it. The route now answers the bytes as `application/dxf`, with the `X-Converter` header as before, and the window decodes them. No converter is installed here; run with a stand-in that writes Big5 bytes.
+
+### app/routers/projects.py · the package summary header is always valid
+- refers-to: app/routers/projects.py :: _summary_header, SUMMARY_HEADER_CHARS, package_full
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+The summary was `json.dumps(...)[:4000]`. Each Chinese character of a missing link's path is a six-character escape, so about fifteen missing links under a Chinese user folder passed 4000 characters and the header ended inside an escape; the reader's parse then failed. `_summary_header` sends the JSON unchanged when it fits (a small package's header is the same bytes as before), and otherwise keeps whole leading entries and adds `missingMore` with the count of the rest. Run against the route with thirty missing links under such a folder: 3879 ASCII characters that parse, seventeen links kept, thirteen counted.
+
+### app/services/subset.py · a CFF2 font is embedded as CFF
+- refers-to: app/services/subset.py :: _instance, build
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+A font with CFF2 outlines (the variable builds of Source Han and Noto CJK among them) was refused by the subsetter, so its type went into a PDF as outlines. The instancer is now asked to downgrade CFF2, and a static CFF2 font is saved, reloaded and converted with fontTools' `convertCFF2ToCFF`. Run on fontTools' own variable CFF2 test font: the outlines and widths match the instancer's reference at two weights and draw in a PDF. No CFF2 font of Chinese, Japanese or Korean is installed here to try.
diff --git a/frontend/HASHOUT_LOG.md b/frontend/HASHOUT_LOG.md
index 69de670..ba3fbf0 100644
--- a/frontend/HASHOUT_LOG.md
+++ b/frontend/HASHOUT_LOG.md
@@ -5087,3 +5087,165 @@ Still left out, by name: type in a composite font with no program in the file an
`FontNames` matched a `/BaseFont` against the installed families through `squash`, which keeps only `a-z0-9`, so every name written in another script squashed to nothing and went to the Helvetica fallback. The font listing now carries each face's other names (`aliases`, see the font service entry); `FontNames` keeps the ones with a character outside ASCII in `localized`, and `resolve` tries the whole name and then its family part there before the Latin rules. A name in ASCII goes the way it always did.
Seen in the built window: the hand-built test PDF with its Big5 font named 文泉驛正黑 (a name of WenQuanYi Zen Hei, which is installed here) no longer lists that font under "Fonts not installed", and its line is set in WenQuanYi Zen Hei.
+
+### src/engine/text.ts · line breaking and justification outside Latin (issue 17)
+- refers-to: src/engine/text.ts :: NO_START, NO_END, JOINS, joinsCh, joins, glued, isCjk, cjkBreakAfter, isSea, seaBreaks, itemsOf, advance, vAdvance, layoutLines (measure, brks, wb, lastBreak, gaps, dense, paraStart)
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+Items are code points, so a combining mark, a variation selector, a zero-width joiner or non-joiner, a skin-tone modifier or Thai SARA AM could start a line and took tracking and justification gaps from its base. Such items now carry `j`, set once in `itemsOf`, and `glued` blocks a break, tracking or a gap before them and after a zero-width joiner. The lists of characters that may not start a line gained closing quotes and brackets, the ellipsis, iteration marks, small kana, % ‰ ℃, the halfwidth forms and ASCII punctuation, and `NO_END` holds the openers. A break is allowed when either side is Chinese, Japanese or Korean, so Latin followed by Han can break. A justified line without spaces that holds CJK or Thai, Lao or Khmer spreads its slack over word gaps, or else over character gaps, and is not treated as a single word. A CRLF item records its length, so the empty lines after it get the right caret index. Runs of Thai, Lao and Khmer get word breaks from `Intl.Segmenter`, cached per paragraph string (256 entries); without it they keep the emergency break.
+
+A dump of 126 Latin samples (point and area type; left, centre, right and three justify modes; three trackings; three fonts; custom justification, hyphenation, columns, tabs, lists, kerning, caps, vertical) is the same before and after, to the last glyph position; each fix has a sample that changed as meant. Seen in the built window: justified Chinese reaches both edges and a closing quote no longer starts a line; Thai breaks between words. Timing for a 9,000-character paragraph is within a millisecond of before for Latin and CJK and two for Thai. Left: Latin letters inside an unspaced CJK line are spread like the characters around them; under "Justify all lines" the last line of such a paragraph is spread too.
+
+### src/io/text-decode.ts, src/io/dwg-bits.ts, src/io/dwg-file.ts, src/io/dwg-header.ts, src/io/dwg.ts, src/io/dxf.ts · a DWG's code page and the character codes of CAD text (issue 17)
+- refers-to: src/io/text-decode.ts :: dwgCodePage, cadEscapes; src/io/dwg-bits.ts :: Bits.tvCp; src/io/dwg-file.ts :: Sections.cp, readSections, readClasses; src/io/dwg-header.ts :: walk; src/io/dwg.ts :: Rd, build, assemble; src/io/dxf.ts :: DxfFile.codepage, parseDxf, mtextPlain, textPlain
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+Text in a drawing of AutoCAD 2000 to 2006 was always read as windows-1252, so Big5, Shift-JIS, GBK and Korean drawings showed mojibake. The 16-bit code page number at file offset 0x13 now picks the decoder. The table of numbers comes from ezdxf (MIT: `addons/dwg/fileheader.py`, `tools/codepage.py`), not from LibreDWG's source, which keeps this reader clean room; an unknown number stays windows-1252, and 30 is windows-1252, as the writer has always written. `cadEscapes` is the one place for `\U+XXXX`, `\M+nXXXX` (1 Shift-JIS, 2 Big5, 3 Wansung, 5 GBK; 4, Johab, has no decoder in a browser and stays as written) and, for TEXT and ATTRIB, the `%%` codes, with `%%nnn` read in the drawing's code page; it replaces three inline copies of the `\U+` rule. How MTEXT formatting is stripped is unchanged.
+
+Run in scratch vitest: an R2000 drawing from this app's own writer with the code page set to 41 gives its Chinese text and layer name; five public LibreDWG sample drawings parse as before; every escape; a Big5 DXF. No real drawing in a legacy code page was found to try.
+
+### src/io/api.ts, src/app.ts · a drawing opened through a converter arrives as bytes
+- refers-to: src/io/api.ts :: api.dwgToDxf; src/app.ts :: the DWG branch of the opener
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+The engine now answers `/api/io/dwg/to-dxf` with the converter's bytes (see the backend log) and the window decodes them with `decodeDxf`, which reads the code page. An older window's `res.text()` still reads a UTF-8 DXF.
+
+### src/io/zip.ts, src/io/model.ts, src/io/psd-read.ts, src/io/ase.ts · smaller readers outside UTF-8
+- refers-to: src/io/zip.ts :: unzip; src/io/model.ts :: importModel; src/io/psd-read.ts :: the layer record name; src/io/ase.ts :: writeAse
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+A zip entry name without the UTF-8 flag goes through `decodeText`, so a valid UTF-8 name stays UTF-8 and any other falls back to the system language's legacy charset. OBJ and MTL files are read with `fileText`. A PSD layer's Pascal name is read as UTF-8 or Mac Roman; the Unicode block, when there is one, is read after it and still wins. A 200-unit swatch name written to `.ase` no longer ends in half a character.
+
+### src/automation/agent-bridge.ts, src/plugins/host.ts · agents are told which characters no font draws, and their cuts keep whole characters
+- refers-to: src/automation/agent-bridge.ts :: AgentBridge.uncovered, add_text, set_text (tabs), patternsTool; src/plugins/host.ts :: case 'register'; src/io/fonts.ts :: missingGlyphs
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+The per-character fallback kept type visible, but an agent never learned that some characters had no font at all. The results of `add_text` and `set_text` now end with one sentence naming up to twelve such characters and asking for a `font` that covers them; a failed lookup adds nothing. No tool, parameter or description changed. Tab leaders, align-on characters, generated pattern names and plugin labels and command ids are cut by code point. Seen over `/mcp` in a real window: Egyptian hieroglyphs were reported; Latin, and Chinese set in a CJK font, got no sentence. Left: `get_svg` cuts at 200,000 units at the end of an SVG it already marks as cut.
+
+### .claude/skills/formpath-harness/sub-skills/type-and-layout/SUB-SKILL.md · agents choose a font that matches the language
+- refers-to: type-and-layout :: Procedure 1 and 3; the `.agents/skills` mirror
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+The skill named one Japanese font for all Chinese, Japanese and Korean type, which draws Japanese letterforms for Chinese. It now names a face per language for Windows, macOS and the Noto families, asks for the words as plain Unicode, and points at the `add_text` sentence about characters no font draws. The mirror was regenerated with `./formpath agents sync`.
+
+### src/io/package.ts · a package summary the window cannot read no longer fails the package
+- refers-to: src/io/package.ts :: packageProject, PackageResult.missingMore
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+The engine keeps the summary header valid (backend log); the reader here also treats a header it cannot parse as no summary and still returns the zip. Nothing in the window asks for the zip form today.
+
+### src/ui/commands.ts, src/app.ts, src/ui/text-editor.ts, src/dock-adapter.ts · letter shortcuts follow the letter on the key
+- refers-to: src/ui/commands.ts :: comboOf; src/app.ts :: comboOfTool; src/ui/text-editor.ts :: TextEditor.key; src/dock-adapter.ts :: isDockChord
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+Shortcuts were matched by the physical key (`e.code`), so on AZERTY Ctrl with the key labelled Z closed the tab and the key labelled A picked another tool, and on QWERTZ Ctrl+Z toggled Outline; French and German are shipped languages. When `e.key` is one ASCII letter it now decides; otherwise the physical key decides as before, so Cyrillic, Greek, Hebrew, Arabic, Thai and Korean layouts and macOS Option with a letter keep working. Digits, Space, the brackets, Equal, Minus, Slash, the Perspective digit and `dock/keys.ts` (the shared module) stay physical. Seen with synthetic key events for US, AZERTY, QWERTZ, Dvorak and Russian in a built window: each ran the command or tool its key shows. Not run: a real layout switch. People on AZERTY and QWERTZ who learned the old positions will find Undo back on the key labelled Z.
+
+### src/ui/native-menu.ts · only Cmd, Ctrl and function key shortcuts go to the macOS menu bar
+- refers-to: src/ui/native-menu.ts :: menuAccelerator, NativeMenus.build
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+The first key of every command became a native accelerator, so Delete or Backspace (Clear) and Tab (Hide Panels) could be taken by the menu before a field or an input method saw them. `menuAccelerator` takes the first of a command's keys that has Mod or Ctrl in it, or is F1 to F12; plain keys stay with the page's own handler, as on Windows and Linux, and the menus inside the window still show them. Checked as logic only; not run on macOS.
+
+### src/ui/panels/spelling.ts · spelling uses the language of the window
+- refers-to: src/ui/panels/spelling.ts :: misspelledRanges, SpellingDialog
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+Check Spelling and the spelling marks always asked for the English dictionary. The default is now `language()`. The engine already maps a regional or script variant to its base language and anything without a dictionary to English.
+
+### src/ui/dom.ts, src/engine/doc.ts, src/ui/properties.ts, src/ui/status.ts, src/ui/panels/appearance.ts · an object's own name is not translated
+- refers-to: src/ui/dom.ts :: setOwnText; src/engine/doc.ts :: ownLabel; PropertiesPanel.sync; StatusBar.sync; AppearancePanel.sync
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+The Properties head, the status bar's selection and the Appearance head show either interface words or a node's own name, and the translation walker translated both, so a text reading "Copy" showed as "Kopieren". `setOwnText` sets or removes `translate="no"` only when it differs, and before the text: the walker does not watch that attribute and translates a text write in a microtask, by which time both writes are done. When the attribute changes the text is written again even if it is the same, so the walker sees it. Seen in German and Traditional Chinese: a text reading "Copy" stays "Copy", nothing selected reads "Dokument" or "文件". Left: "2 Objects" has no row in the translation tables.
+
+### src/engine/doc.ts and seven call sites · names cut by unit keep whole characters
+- refers-to: src/engine/doc.ts :: clip, nodeLabel; src/engine/index.ts; src/engine/variables.ts; src/ui/panels/actions.ts; src/ui/panels/generative.ts; src/io/width-profiles.ts; src/io/gen-options.ts
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+`clip(s, n)` cuts at n UTF-16 units, one fewer when that would end on the first half of a pair. It replaces the cuts 0.60.0 listed as left.
+
+### src/ui/panels/kit.ts, src/ui/options.ts · number fields read a comma and ignore an empty entry
+- refers-to: src/ui/panels/kit.ts :: slider; src/ui/options.ts :: the range field
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+A slider's text field used `parseFloat`, so "12,5" became 12; it now uses `evalNumber` (decimal comma, full-width digits) and puts the old value back when that fails. An emptied option field became 0 and set the option to its minimum; it is now ignored and shows the current value again.
+
+### src/io/fonts.ts, src/io/pdf.ts, src/io/pdf-text.ts, src/io/pdf-plates.ts, src/io/eps.ts, src/io/svg.ts, src/app.ts · type in a font that is not installed is exported in Inter, with a sentence that says so
+- refers-to: src/io/fonts.ts :: SUBSTITUTE_FAMILY, exportFace, faceGlyph, substituteNotes, missingGlyphs, outlineText; src/io/pdf-text.ts :: LiveFonts.plan; src/io/pdf.ts :: exportPdf; src/io/pdf-plates.ts :: exportPlates; src/io/eps.ts :: EpsOptions.swapped; src/io/svg.ts :: SvgOptions.swapped; src/app.ts :: exportBlob, exportAs
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+What 0.60.0's log called "left out" was measured in the window and is corrected here: type whose font could not be loaded had no outlines, so a PDF and an EPS drew it as a 300 ppi picture (nothing to select or search), an outlined SVG kept it as live text naming the missing family, a DXF in outlines mode did leave it out, and nothing was said in any of them. The PDF reader names Helvetica for every font it does not know, and Windows has no Helvetica, so this met every imported PDF exported again there.
+
+On export only, `exportFace` sets such type in Inter of the same style, with `glyphOrFallback` for the characters Inter lacks (Chinese goes to a CJK face). Each glyph keeps the position the layout measured with the browser's stand-in font, so line length and line breaks match the screen while the letterforms are Inter's. One sentence per export names the families, through the notes each exporter already has. Create Outlines passes no set and still stops with its error naming the font. Seen: an SVG naming Helvetica and a made-up family holding Latin and Chinese exports as live Inter and Noto CJK type that `pdftotext` reads, with no picture in the PDF; the outlined SVG holds paths. Left: printing substitutes too but has nowhere to say so.
+
+### src/io/pdf-marks.ts, src/io/pdf.ts, src/io/pdf-plates.ts · the page information line and the separations title outside ASCII
+- refers-to: src/io/pdf-marks.ts :: pageInfoLine, pathOps, marksContent; src/io/pdf.ts :: exportPdf; src/io/pdf-plates.ts :: exportPlates
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+The marks font covers codes 32 to 126 and the string writer turned everything else into `?`, so a document, an artboard or a spot plate named in Chinese printed as question marks. A line that is not plain ASCII is now filled as outlines from `outlineText` (which has font fallback) at the same origin and 6 pt size, in the registration colour. A plain ASCII line gives the same bytes as before, apart from the trailer id that hashes the time. The separations file's title and producer use the UTF-16 string writer of `pdf-x.ts`.
+
+### src/io/eps.ts · spot ink names keep every character
+- refers-to: src/io/eps.ts :: inkName, PsPainter.spot
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+A name outside `[A-Za-z0-9_.-]` had those characters turned into `_`, so two Chinese ink names of the same length became one colourant and their plates merged. Such a name is now written as a string of octal-escaped UTF-8 bytes turned into a name with `cvn`; a name that was legal before is written exactly as before. A name with spaces ("PANTONE 185 C") now keeps them where it had underscores. Not run through a PostScript interpreter: none is installed here.
+
+### src/io/fonts.ts, src/io/api.ts, src/ui/panels/similar-fonts.ts · fonts by their names in other languages, and a fallback that asks the engine
+- refers-to: src/io/api.ts :: FontInfo.aliases, api.coverFont; src/io/fonts.ts :: aliasesOf, byAlias, aliasFace, fontFor, findSimilarFonts, installedNames, fallbackGlyph; src/ui/panels/similar-fonts.ts :: openSimilarFonts
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+A face the engine finds by another of its names (see the backend log) is registered as a `FontFace` under the name the document uses, so the canvas draws it where the system does not resolve that name itself. Find Similar Fonts resolves such names and says "is not installed on this computer" for a font that is not, where it said none were found.
+
+`fallbackGlyph` drops from its fixed lists the families the listing says are not installed, so a missing character no longer costs a request per absent family, and after the lists and the bundled Inter it asks `GET /api/fonts/cover` for an installed font that has the character, preferring the regional faces of `hanFirst` for Han. Thai typed in Inter walked about thirty families and ended in an empty box; it now asks for the one listed family that is installed and then the engine, and gets a Thai face.
+
+### src/ui/dropdown.ts, src/ui/panels/kit.ts, src/ui/panels/type.ts, src/ui/options.ts, src/extensions/registry.ts, src/tools/type.ts, src/styles/shell.css · the font menus can be searched
+- refers-to: src/ui/dropdown.ts :: enhanceSelect (terms, filter, shownItems, mark); src/ui/panels/kit.ts :: selectCtl; the select option spec (search, terms)
+- kind: decision
+- logged: v0.61.0 · 2026-11-26
+
+The Character panel's font menu and the Type tool's Font menu have a search field that matches a family's name and its names in other languages. Searching hides and shows the existing rows in place (no list is rebuilt), the list's height is pinned while it is open and the field stays at its top; the arrow keys move over the rows that show. No other menu changed. Seen 4x CPU throttled: the options bar does not move, no console error; typing three characters of WenQuanYi's Chinese name leaves its three families. The new sentence about a font that is not installed has no translations yet.
+
+### src/io/ps-read.ts, src/io/text-decode.ts · Chinese, Japanese and Korean type in EPS and PostScript
+- refers-to: src/io/ps-read.ts :: showText, textOf, glyphText, OPS (glyphshow, composefont, findfont, stringwidth), readEpsVector; src/io/text-decode.ts :: csOf, psDecode, psUni
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+`showText` put the raw bytes of each string into the text whatever the font, so type under a Big5, GB, Shift-JIS, EUC or KS CMap read as Latin-1 bytes. `textOf` now decodes by the charset the font's CMap name gives (`csOf`), reads the Japanese 7-bit `-H`/`-V` CMaps of the usual families as EUC-JP after setting the high bit, and returns null for Identity-H and Identity-V: those codes are glyph numbers, so the run is left out and named in the left-out list. `glyphshow` with a `uniXXXX` or `uXXXXX` name shows that character; `composefont` records the composed name so a later `findfont` sees the CMap. `stringwidth` and the advance count decoded characters. Seen on the public ghostpdl `examples/cjk` files (Big5, GB, Shift-JIS, KS, JIS vertical): text that read as Latin-1 bytes reads in its own script. Not done: CNS-EUC (the browser has no decoder for it), Japanese `-H` fonts of a family not in the list.
+
+### src/io/ai-legacy.ts · names and old type in their own script
+- refers-to: src/io/ai-legacy.ts :: prepare (header, customs, fonts, Meta.cs), Reader.exec (Ln, SL), Reader.custom, Reader.textShow, buildDefs, buildAi
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+A current Illustrator file writes `Ln` layer names as UTF-8 with octal escapes (a public sample writes a no-break space as `\302\240`); they were shown as Latin-1 bytes. Layer, sublayer, swatch, pattern, symbol and brush names go through `psUni` for display: a UTF-16BE mark first, then UTF-8, then the document's charset, then Windows-1252. The maps that look a name up keep the raw string, and the header's custom colour names have their escapes undone so they still match the names the art uses. `Meta.cs` is the charset the first `%%DocumentFonts` name gives; `textShow` decodes an old file's type by the `Tf` font's charset, else the document's. Checked on hand-made version 8 files in Big5 and Shift-JIS, since no real old CJK `.ai` was found. Not done: graphic style names.
+
+### src/io/ai-guard.ts, src/io/ai-legacy.ts · live type in an .ai is never dropped without a word
+- refers-to: src/io/ai-guard.ts :: hasText, guardAi; src/io/ai-legacy.ts :: buildAi
+- kind: decision
+- logged: v0.61.0 · 2026-11-26
+
+The private data reader does not read `/AI11Text` objects, and said nothing: a file opened without its type. Two changes. `buildAi` adds "type" to the left-out list whenever the data holds an `/AI11Text :` object (the `/AI11TextDocument` block is in every file and means nothing). `guardAi` adopts the PDF page when the page has type and the private read has none, whatever the pixel difference. Not used: falling back to the page for every file with type objects, because one public sample has type objects that are not on its page either, and it would have lost its object names and brush for nothing visible.
+
+### src/io/ai-private.ts · names outside ASCII are written whole
+- refers-to: src/io/ai-private.ts :: esc, pu, pw, Emit.paintOps, Emit.layer, the symbol block, paletteLines, buildAiPrivate
+- kind: fix
+- logged: v0.61.0 · 2026-11-26
+
+`ps` turned every character outside ASCII into a question mark. Layer, swatch and symbol names are now written by `pu` as UTF-8 with octal escapes, the form a real file uses for `Ln`, and artboard names by `pw` as UTF-16BE with a byte order mark under `/UnicodeString`. A name of plain ASCII is written exactly as before. Checked by writing and reading back in this app; not opened in Illustrator. The title and gradient names still go through `ps`.
From 1f15ae0367b19c19d9055d596f297fd7cbca5113 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 14:21:46 -0500
Subject: [PATCH 38/74] chore(release): 0.61.0
---
CHANGELOG.md | 26 ++++++++++++++++++++++++++
README.md | 4 ++--
backend/app/__init__.py | 2 +-
frontend/package-lock.json | 4 ++--
frontend/package.json | 2 +-
frontend/src/version.ts | 2 +-
src-tauri/Cargo.lock | 2 +-
src-tauri/Cargo.toml | 2 +-
src-tauri/tauri.conf.json | 2 +-
9 files changed, 36 insertions(+), 10 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1bd01c3..a798cf8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,32 @@
Versions follow `v*.*.*` with dots. Dates are UTC.
+## 0.61.0 · 2026-11-26
+
+The rest of issue 17: what 0.60.0 found and left. Tried on public PDFs of the pdf.js test corpus and on PDFs made here with real embedded Chinese fonts, in a Chromium window on Linux; nothing in this release has run on Windows or macOS yet, and no real input method has typed into it.
+
+- Opening a PDF or a PDF-compatible .ai file: type the file gives no characters for is kept as shapes, drawn from the font inside the file, where 0.60.0 left it out and 0.59.1 showed replacement characters. The message after opening says which fonts this happened to. It works for fonts stored the way Chinese, Japanese and Korean fonts usually are (two-byte, Identity encoding); a file with no font inside still has such type left out, and says so.
+- Opening an EPS or PostScript file: Chinese, Japanese and Korean type reads as its own characters instead of as accented Latin letters. Type stored as glyph numbers is left out, and the message says so.
+- Opening an .ai file: layer, swatch, pattern, symbol and brush names keep their own script, and type in older .ai files reads in the file's own encoding. A file whose type is only on its PDF page opens through that page, and when type cannot be brought in the message after opening says "type" where it said nothing.
+- Saving an .ai file: layer, swatch, symbol and artboard names outside English are written whole instead of as question marks.
+- Opening a PDF: vertical Japanese and Chinese type starts where the file puts it, more of the older Japanese, Chinese and Korean encodings are read, and a font the file names in Chinese, Japanese or Korean finds the installed font.
+- Exporting: type in a font that is not on this computer is exported as real type in Inter, with other fonts for the characters Inter lacks, and a message names the fonts that were replaced. It went into a PDF or an EPS as a picture, stayed as text naming the missing font in an outlined SVG, and was left out of a DXF, without a word.
+- Exporting: the page information line of printer's marks and the title of a separations file show Chinese and other non-English text instead of question marks; EPS spot colours named in Chinese or other scripts stay separate inks; fonts with CFF2 outlines (the variable Chinese, Japanese and Korean fonts among them) go into a PDF as real type.
+- Fonts: a document that names a font by its Chinese, Japanese or Korean name finds it; font names stored in older encodings read correctly; a character none of the usual fonts has, such as Thai or Devanagari, comes from an installed font that has it instead of an empty box; the font menus of the Character panel and the Type tool can be searched, by a font's names in any language; Find Similar Fonts offers Chinese, Japanese and Korean fonts for one of them and says when a font is not installed.
+- Type in a frame: Thai, Lao and Khmer wrap between words; accents, Thai vowel and tone marks and emoji skin tones stay on their letter at a line end and under tracking; closing brackets, small kana and the like no longer start a line and opening brackets no longer end one; English followed by Chinese, Japanese or Korean can wrap between the two; justified Chinese, Japanese and Thai reaches both edges; the caret lands right on empty lines of text with Windows line endings. Text that is only Latin sets exactly as before.
+- Shortcuts follow the letter printed on the key, so on French, German and Dvorak keyboards Undo is on the key labelled Z again; Cyrillic, Greek and other non-Latin layouts keep using the key's position. If you learned the old positions on AZERTY or QWERTZ, they have moved.
+- macOS: Backspace, Delete and Tab are no longer menu bar shortcuts, so they stay with the text field or the input method you are typing in.
+- Check Spelling uses the dictionary of the language FormPath is shown in.
+- An object's or layer's own name is no longer translated in the Properties head, the status bar and the Appearance panel.
+- Slider number fields read "12,5" and full-width digits, and clearing an option's number field keeps its value.
+- DWG drawings from AutoCAD 2000 to 2006 saved on a Chinese, Japanese, Korean, Cyrillic or other non-Western system show their text and layer names; multibyte and `%%nnn` character codes in CAD text show as their characters; a drawing opened through an installed converter keeps such text.
+- Zip archives made on Windows, OBJ models and older PSD layer names keep non-English names, and names shortened for a message or a file never end in half a character.
+- Agents: `add_text` and `set_text` say which characters no installed font draws, and the drawing skill tells agents to choose a font that matches the language.
+- Packaging as a zip no longer fails when many linked images are missing from folders with non-English names.
+- This release carries 0.60.0 as well, which was not published on its own.
+- Not in this release: Arabic and Hebrew still run left to right and Indic scripts are not shaped; opening a `.fpth` by double click still does nothing (the desktop shell could not be built here); the terminal and chat dock's own findings belong to the module the Form apps share.
+- The three demos are not rebuilt and still say 0.59.0.
+
## 0.60.0 · 2026-11-26
Typing and reading text that is not English: Chinese, Japanese, Korean and other scripts (issue 17). Run in a Chromium window on Linux with composition events sent by a test driver; no real input method on Windows, macOS or Linux has typed into this build yet.
diff --git a/README.md b/README.md
index 1f07932..684ad78 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@
-
+
@@ -120,7 +120,7 @@ In the window, Window > Terminal (or the Terminal button in the title bar) opens
- **Service:** a FastAPI engine for projects, fonts, file import and export, and the MCP endpoint at `/mcp`.
- **Desktop:** a Tauri 2 shell that starts the engine as a sidecar.
- **UI:** keyed DOM patching and a pre-paint theme boot, so changes do not flash or re-render.
-- **Size:** about 62,000 lines of TypeScript, 2,300 of CSS, 7,600 of Python and 700 of Rust (product code, tests excluded; `./formpath counts --check` verifies it).
+- **Size:** about 62,400 lines of TypeScript, 2,400 of CSS, 8,000 of Python and 700 of Rust (product code, tests excluded; `./formpath counts --check` verifies it).
- **Tested:** Vitest suites for `.fpth`, SVG, PDF, Pathfinder and type outlines, plus pytest suites for the engine guard, consent, MCP, versions and project files.
## Download
diff --git a/backend/app/__init__.py b/backend/app/__init__.py
index 5684ec7..a076e5d 100644
--- a/backend/app/__init__.py
+++ b/backend/app/__init__.py
@@ -1 +1 @@
-__version__ = "0.60.0"
+__version__ = "0.61.0"
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index b89452f..b107ce6 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "formpath",
- "version": "0.60.0",
+ "version": "0.61.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "formpath",
- "version": "0.60.0",
+ "version": "0.61.0",
"license": "Apache-2.0",
"dependencies": {
"@fontsource/inter": "5.3.0",
diff --git a/frontend/package.json b/frontend/package.json
index d0f0973..8be35de 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -1,7 +1,7 @@
{
"name": "formpath",
"private": true,
- "version": "0.60.0",
+ "version": "0.61.0",
"description": "formpath · vector illustration editor in the NodeMode style",
"license": "Apache-2.0",
"type": "module",
diff --git a/frontend/src/version.ts b/frontend/src/version.ts
index 69005f7..e4fe5c4 100644
--- a/frontend/src/version.ts
+++ b/frontend/src/version.ts
@@ -1 +1 @@
-export const VERSION = '0.60.0';
+export const VERSION = '0.61.0';
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index 204d984..978f998 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -893,7 +893,7 @@ dependencies = [
[[package]]
name = "formpath"
-version = "0.60.0"
+version = "0.61.0"
dependencies = [
"objc2",
"objc2-app-kit",
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index 46a5cdc..067c961 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "formpath"
-version = "0.60.0"
+version = "0.61.0"
description = "formpath desktop shell"
authors = ["nodemode-ai"]
license = "Apache-2.0"
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 3345134..9b98fe4 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "FormPath",
- "version": "0.60.0",
+ "version": "0.61.0",
"identifier": "ai.nodemode.formpath",
"build": {
"frontendDist": "../frontend/dist"
From c5e20145419995b47d98ce8f1da792819ff013a5 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 15:42:18 -0500
Subject: [PATCH 39/74] fix(pdf): unreadable type in one-byte fonts and under
an embedded CMap is kept as shapes, vertical metrics are followed, and
ActualText supplies missing characters
---
backend/HASHOUT_LOG.md | 9 +++
backend/app/routers/outlines.py | 14 +++-
backend/app/services/outlines.py | 127 +++++++++++++++++++++++++++++--
frontend/HASHOUT_LOG.md | 19 +++++
frontend/src/io/api.ts | 5 +-
frontend/src/io/pdf-read.ts | 104 ++++++++++++++++++-------
6 files changed, 241 insertions(+), 37 deletions(-)
diff --git a/backend/HASHOUT_LOG.md b/backend/HASHOUT_LOG.md
index 29fa8c4..bf2e891 100644
--- a/backend/HASHOUT_LOG.md
+++ b/backend/HASHOUT_LOG.md
@@ -995,3 +995,12 @@ The summary was `json.dumps(...)[:4000]`. Each Chinese character of a missing li
- logged: v0.61.0 · 2026-11-26
A font with CFF2 outlines (the variable builds of Source Han and Noto CJK among them) was refused by the subsetter, so its type went into a PDF as outlines. The instancer is now asked to downgrade CFF2, and a static CFF2 font is saved, reloaded and converted with fontTools' `convertCFF2ToCFF`. Run on fontTools' own variable CFF2 test font: the outlines and widths match the instancer's reference at two weights and draw in a PDF. No CFF2 font of Chinese, Japanese or Korean is installed here to try.
+
+### app/services/outlines.py, app/routers/outlines.py · outlines by character code for one-byte fonts, and Type 1 programs
+- refers-to: app/services/outlines.py :: _base, _type1, Program (builtin, cmaps, unicode, _simple, code, outline), glyphs (kind code, chars), SYMBOL_PAGES; app/routers/outlines.py :: font_outlines (enc)
+- kind: fix
+- logged: v0.62.0 · 2026-11-26
+
+`POST /api/fonts/outlines` takes a third kind, `code`, for a PDF's one-byte fonts, with `enc`: the base encoding's name, whether the font is flagged symbolic, and the `Differences` names by code. The answer holds an outline for each of the 256 codes that has one and, in `chars`, the character of each whose glyph name has a Unicode value in the Adobe glyph list (private use and control values are left out; the Latin ligatures are spelt as their letters). Finding the glyph follows the PDF rules: for a Type 1 or name-keyed CFF program the `Differences` name, then the base encoding's name, then the program's own encoding; for a TrueType program the name's Unicode value through the Unicode cmap, the Macintosh cmap, or the glyph's own name, and for a symbolic one the (3,0) cmap at 0xF000 plus the code first, then the (1,0) cmap.
+
+Type 1 programs (`FontFile`) are read with fontTools' `t1Lib` from memory: PFB segment headers are taken off, the encrypted part is found and the font parsed without a file on disk. A TrueType program whose `hmtx` table is cut short, which subsetters produce, no longer fails: its glyphs are drawn straight from `glyf`. Run directly on the embedded programs of 13 public PDFs (Type 1, Type 1C, multiple master, TrueType with and without a cmap) and through the window. A Type 1 font is a small PostScript program; fontTools reads it with its own limited interpreter, every failure is caught and answered as 422, and the 64 MiB limit applies.
diff --git a/backend/app/routers/outlines.py b/backend/app/routers/outlines.py
index 16142e7..1cd92a3 100644
--- a/backend/app/routers/outlines.py
+++ b/backend/app/routers/outlines.py
@@ -8,20 +8,26 @@
@router.post("/outlines")
-def font_outlines(ids: str = Form(...), kind: str = Form("gid"), key: str = Form(""), file: UploadFile | None = File(None)) -> dict:
+def font_outlines(ids: str = Form(...), kind: str = Form("gid"), key: str = Form(""), enc: str = Form(""), file: UploadFile | None = File(None)) -> dict:
try:
wanted = [int(i) for i in json.loads(ids)]
except (ValueError, TypeError):
raise HTTPException(status_code=422, detail="ids must be a JSON list of glyph or character ids.")
- if kind not in ("gid", "cid"):
- raise HTTPException(status_code=422, detail="kind is gid or cid.")
+ if kind not in ("gid", "cid", "code"):
+ raise HTTPException(status_code=422, detail="kind is gid, cid or code.")
+ try:
+ told = json.loads(enc) if enc else {}
+ names = {str(int(k)): str(v)[:64] for k, v in list((told.get("names") or {}).items())[:256]}
+ told = {"base": str(told.get("base") or "")[:32], "symbolic": bool(told.get("symbolic")), "names": names}
+ except (ValueError, TypeError, AttributeError):
+ raise HTTPException(status_code=422, detail="enc must be a JSON object with base, symbolic and names.")
if file is not None:
data = file.file.read(outlines.MAX_BYTES + 1)
try:
key = outlines.load(data)
except outlines.OutlineError as exc:
raise HTTPException(status_code=422, detail=str(exc))
- found = outlines.glyphs(key, kind, wanted) if key else None
+ found = outlines.glyphs(key, kind, wanted, told) if key else None
if found is None:
raise HTTPException(status_code=409, detail="Send the font program again; the engine no longer holds it.")
return found
diff --git a/backend/app/services/outlines.py b/backend/app/services/outlines.py
index 1b0da32..980887b 100644
--- a/backend/app/services/outlines.py
+++ b/backend/app/services/outlines.py
@@ -1,9 +1,14 @@
import hashlib
import io
import threading
+import unicodedata
from collections import OrderedDict
+from functools import lru_cache
+from fontTools import agl, t1Lib
from fontTools.cffLib import CFFFontSet
+from fontTools.encodings.MacRoman import MacRoman
+from fontTools.encodings.StandardEncoding import StandardEncoding
from fontTools.pens.basePen import BasePen
from fontTools.ttLib import TTFont
@@ -11,6 +16,7 @@
MAX_IDS = 4000
WHOLE = 2500
KEPT = 6
+SYMBOL_PAGES = (0xF000, 0, 0xF100, 0xF200)
_lock = threading.Lock()
_programs: "OrderedDict[str, Program]" = OrderedDict()
@@ -51,16 +57,59 @@ def _endPath(self) -> None:
self.open = False
+@lru_cache(maxsize=4)
+def _base(name: str) -> tuple | None:
+ if name == "StandardEncoding":
+ return tuple(StandardEncoding)
+ if name == "MacRomanEncoding":
+ return tuple(MacRoman)
+ if name == "WinAnsiEncoding":
+ return tuple(agl.UV2AGL.get(ord(ch)) if ch else None for ch in (bytes([c]).decode("cp1252", "ignore") for c in range(256)))
+ return None
+
+
+def _type1(data: bytes):
+ if data[:1] == b"\x80":
+ parts, at = [], 0
+ while at + 6 <= len(data) and data[at] == 0x80 and data[at + 1] in (1, 2):
+ size = int.from_bytes(data[at + 2:at + 6], "little")
+ parts.append(data[at + 6:at + 6 + size])
+ at += 6 + size
+ data = b"".join(parts)
+ chunks = [t1Lib.deHexString(chunk) if locked and t1Lib.isHex(chunk[:4]) else chunk for locked, chunk in t1Lib.findEncryptedChunks(data)]
+ font = t1Lib.T1Font.__new__(t1Lib.T1Font)
+ font.data = b"".join(chunks)
+ font.encoding = "ascii"
+ font.parse()
+ return font
+
+
class Program:
def __init__(self, data: bytes) -> None:
self.upm = 1000
self.cids: dict[int, str] | None = None
+ self.builtin: list | None = None
+ self.cmaps: dict | None = None
+ self.unicode: dict = {}
head = data[:4]
if head in (b"\x00\x01\x00\x00", b"true", b"OTTO", b"ttcf"):
font = TTFont(io.BytesIO(data), fontNumber=0, lazy=True)
self.font = font
if "head" in font:
self.upm = font["head"].unitsPerEm or 1000
+ if "cmap" in font and "glyf" in font:
+ self.cmaps = {}
+ for table in font["cmap"].tables:
+ try:
+ self.cmaps[(table.platformID, table.platEncID)] = dict(table.cmap)
+ except Exception:
+ continue
+ for at in ((3, 10), (0, 6), (0, 4), (3, 1), (0, 3), (0, 2), (0, 1), (0, 0)):
+ if at in self.cmaps:
+ self.unicode = self.cmaps[at]
+ break
+ elif "glyf" in font:
+ self.cmaps = {}
if "glyf" in font:
try:
self.order = font.getGlyphOrder()
@@ -68,7 +117,11 @@ def __init__(self, data: bytes) -> None:
count = int(font["maxp"].numGlyphs)
self.order = [".notdef"] + ["glyph%.5d" % i for i in range(1, count)]
font.setGlyphOrder(self.order)
- self.glyphs = font.getGlyphSet()
+ try:
+ self.glyphs = font.getGlyphSet()
+ except Exception:
+ self.glyphs = None
+ self.glyf = font["glyf"]
elif "CFF " in font:
self._cff(font["CFF "].cff)
else:
@@ -77,8 +130,17 @@ def __init__(self, data: bytes) -> None:
cff = CFFFontSet()
cff.decompile(io.BytesIO(data), None)
self._cff(cff)
+ elif data[:1] == b"\x80" or data[:2] == b"%!":
+ font = _type1(data)
+ self.glyphs = font.getGlyphSet()
+ self.order = list(self.glyphs.keys())
+ encoding = font["Encoding"]
+ self.builtin = list(StandardEncoding) if isinstance(encoding, str) else list(encoding)
+ matrix = font.font.get("FontMatrix")
+ if matrix and matrix[0]:
+ self.upm = round(1 / matrix[0]) or 1000
else:
- raise OutlineError("This font program is not TrueType, OpenType or CFF.")
+ raise OutlineError("This font program is not TrueType, OpenType, CFF or Type 1.")
def _cff(self, cff) -> None:
top = cff[0]
@@ -92,6 +154,9 @@ def _cff(self, cff) -> None:
for name in self.order:
if name.startswith("cid") and name[3:].isdigit():
self.cids[int(name[3:])] = name
+ else:
+ encoding = getattr(top, "Encoding", None)
+ self.builtin = list(StandardEncoding) if isinstance(encoding, str) or encoding is None else list(encoding)
def name(self, kind: str, index: int) -> str | None:
if kind == "cid" and self.cids is not None:
@@ -101,13 +166,53 @@ def name(self, kind: str, index: int) -> str | None:
def ids(self, kind: str) -> list[int]:
return sorted(self.cids) if kind == "cid" and self.cids is not None else list(range(len(self.order)))
+ def _simple(self, code: int, name: str | None, symbolic: bool) -> str | None:
+ maps = self.cmaps or {}
+
+ def named() -> str | None:
+ if not name:
+ return None
+ text = agl.toUnicode(name)
+ if len(text) == 1 and self.unicode.get(ord(text)):
+ return self.unicode[ord(text)]
+ if (1, 0) in maps and name in MacRoman and maps[(1, 0)].get(MacRoman.index(name)):
+ return maps[(1, 0)][MacRoman.index(name)]
+ return name if name in self.order else None
+
+ def coded() -> str | None:
+ for page in SYMBOL_PAGES:
+ found = maps.get((3, 0), {}).get(page + code)
+ if found:
+ return found
+ return maps.get((1, 0), {}).get(code)
+
+ return (coded() or named()) if symbolic else (named() or coded() or self.unicode.get(code))
+
+ def code(self, code: int, enc: dict) -> str | None:
+ name = (enc.get("names") or {}).get(str(code))
+ base = _base(enc.get("base") or "")
+ if name is None and base is not None and 0 <= code < 256:
+ name = base[code]
+ if self.cmaps is not None:
+ found = self._simple(code, name, bool(enc.get("symbolic")))
+ else:
+ found = name if name in self.order else None
+ if found is None and self.builtin is not None and 0 <= code < len(self.builtin):
+ found = self.builtin[code] if self.builtin[code] in self.order else None
+ return None if found == ".notdef" else found
+
def draw(self, kind: str, index: int) -> list | None:
- name = self.name(kind, index)
+ return self.outline(self.name(kind, index))
+
+ def outline(self, name: str | None) -> list | None:
if name is None:
return None
pen = _Pen(self.glyphs)
try:
- self.glyphs[name].draw(pen)
+ if self.glyphs is None:
+ self.glyf[name].draw(pen, self.glyf)
+ else:
+ self.glyphs[name].draw(pen)
except Exception:
return None
pen._endPath()
@@ -135,12 +240,24 @@ def load(data: bytes) -> str:
return key
-def glyphs(key: str, kind: str, wanted: list[int]) -> dict | None:
+def glyphs(key: str, kind: str, wanted: list[int], enc: dict | None = None) -> dict | None:
with _lock:
program = _programs.get(key)
if program is None:
return None
_programs.move_to_end(key)
+ if kind == "code":
+ out, chars = {}, {}
+ for code in range(256):
+ name = program.code(code, enc or {})
+ drawn = program.outline(name)
+ if drawn is None:
+ continue
+ out[str(code)] = drawn
+ text = "".join(unicodedata.normalize("NFKC", ch) if 0xFB00 <= ord(ch) <= 0xFB06 else ch for ch in agl.toUnicode(name))
+ if text and all(32 <= ord(ch) < 0xD800 or 0xF900 <= ord(ch) < 0xF0000 for ch in text):
+ chars[str(code)] = text
+ return {"key": key, "upm": program.upm, "whole": True, "glyphs": out, "chars": chars}
every = program.ids(kind)
whole = len(every) <= WHOLE
out = {}
diff --git a/frontend/HASHOUT_LOG.md b/frontend/HASHOUT_LOG.md
index ba3fbf0..aacedd6 100644
--- a/frontend/HASHOUT_LOG.md
+++ b/frontend/HASHOUT_LOG.md
@@ -5249,3 +5249,22 @@ The private data reader does not read `/AI11Text` objects, and said nothing: a f
- logged: v0.61.0 · 2026-11-26
`ps` turned every character outside ASCII into a question mark. Layer, swatch and symbol names are now written by `pu` as UTF-8 with octal escapes, the form a real file uses for `Ln`, and artboard names by `pw` as UTF-16BE with a byte order mark under `/UnicodeString`. A name of plain ASCII is written exactly as before. Checked by writing and reading back in this app; not opened in Illustrator. The title and gradient names still go through `ps`.
+
+### src/io/pdf-read.ts, src/io/api.ts · one-byte fonts, embedded CMaps, vertical metrics and ActualText
+- refers-to: src/io/pdf-read.ts :: FontProgram (kind code, enc, chars), FontInfo (w2, cmap, cids, own, named), CidMap, glyphChar, MARKS, LETTERS, Painter.font, prepareFonts, show (odd, simple, own, told, drawn), outlines, shapes, actual, the BDC and EMC cases of run, codeBytes, parseCidMap; src/io/api.ts :: fontOutlines (enc), FontOutlines.chars
+- kind: fix
+- logged: v0.62.0 · 2026-11-26
+
+0.61.0 drew unreadable type as shapes only for two-byte fonts under Identity-H or Identity-V. Four cases were left, and real files showed a fifth that was worse than a gap: wrong characters. All were seen on public files of the pdf.js corpus and on PDFs made here before the change.
+
+One-byte fonts. A font with a `FontFile`, `FontFile2` or `FontFile3` program gets a `FontProgram` of kind `code`: the engine is given the codes' meaning as the file states it (base encoding, the symbolic flag, the `Differences` names) and answers with an outline per code and, where the glyph's name has a Unicode value, the character. A run is drawn as shapes when a code has an outline and no character: a ToUnicode entry of ``, or a `Differences` name that names nothing (`/G21`, `/g152`). Before, such a code was guessed from its number, so a public slide (`font_ascent_descent.pdf`) opened as punctuation where its heading stood, and Quartz-made PDFs lost their body text. This is also the form LibreOffice writes Chinese in (a Type 1 subset per 255 glyphs), so a label like the one in issue 17 made that way is now drawn (`label-type1-fffd.pdf`), where 0.61.0 left it out. A font with no base encoding takes its characters from the program's own encoding when the engine answers; when the engine cannot be reached the old guess stands, so nothing changes offline. A font with no program is read exactly as before.
+
+`glyphChar` knows more names without a table of the whole glyph list: the Latin letters with an accent are composed (`ccaron`, `uring`, `Ecircumflex`), the common signs and ligature names with an underscore are listed, and a `uniXXXX` name in the private use area or below U+0020 names nothing. `issue8229.pdf` read "Roztovn nklad" and now reads "Rozúčtování nákladů".
+
+Embedded CMaps. A Type0 font whose `Encoding` is a stream had its codes read two bytes at a time and its widths looked up by code. `parseCidMap` reads the codespace ranges and the cid ranges and chars; `show` takes one or two bytes per code as the codespace says (`codeBytes`), maps the code to its CID for widths, vertical metrics and glyphs, and the font gets a program. A CMap built on a predefined CMap other than Identity, or with codes longer than two bytes, is refused and the font is read as before. `perf_text_cmap_mixed.pdf` (one-byte and two-byte codes in one string) opened blank and now shows both of its blocks.
+
+Vertical metrics. `/W2` is read per CID: the advance replaces `DW2`'s, and the glyph's origin replaces half the width and `DW2`'s height when shapes are placed. Only for fonts whose codes are CIDs.
+
+ActualText. A marked-content span that carries `/ActualText` (inline or through `Properties`) supplies the characters of a run that has none: the first such run in the span becomes live type with that text, later runs in the same span add nothing, and an empty or broken ActualText is ignored so the shapes are still drawn. A run that reads on its own keeps its own characters.
+
+Seen in the built window against an untouched 0.61.0 build: 28 of 29 other PDFs give the same objects and message, and the one that differs is `issue8229.pdf` above. Cost: a file with many small symbolic fonts and no ToUnicode sends each program to the engine once (a 23-page public file took about 7 seconds to open where it had taken about 5). Not done: a `ToUnicode` or CID map keyed by code length (a one-byte `<20>` and a two-byte `<0020>` share an entry in ToUnicode), ActualText given only through the structure tree, MacExpert as a base encoding, codes of three or four bytes, and type with no font program in the file, which is still left out and named.
diff --git a/frontend/src/io/api.ts b/frontend/src/io/api.ts
index b72023f..4ac53f0 100644
--- a/frontend/src/io/api.ts
+++ b/frontend/src/io/api.ts
@@ -9,7 +9,7 @@ export interface FontInfo { id: string; family: string; style: string; full: str
export interface ColorProfileInfo { id: string; name: string; space: string; class: string; size: number; source: 'builtin' | 'user' | 'system' }
export interface SpellHit { word: string; suggestions: string[] }
export interface SimilarFont { id: string; family: string; style: string; score: number }
-export interface FontOutlines { key: string; upm: number; whole: boolean; glyphs: Record> }
+export interface FontOutlines { key: string; upm: number; whole: boolean; glyphs: Record>; chars?: Record }
export interface LlmStatus { configured: boolean; baseUrl: string; model: string; hasKey: boolean; store: 'system' | 'file'; vision?: boolean }
export interface BridgeItem { id: string; name: string; arguments: Record; inapp?: boolean; once?: boolean }
const BRIDGE_HEADER = 'X-Formpath-Bridge';
@@ -118,10 +118,11 @@ export const api = {
return { data: new Uint8Array(await res.arrayBuffer()), cff: res.headers.get('X-Font-Outlines') === 'cff' };
} catch { return null; }
},
- async fontOutlines(src: { key: string } | { bytes: Uint8Array }, kind: 'gid' | 'cid', ids: number[]): Promise {
+ async fontOutlines(src: { key: string } | { bytes: Uint8Array }, kind: 'gid' | 'cid' | 'code', ids: number[], enc = ''): Promise {
const body = new FormData();
body.append('ids', JSON.stringify(ids));
body.append('kind', kind);
+ if (enc) body.append('enc', enc);
if ('key' in src) body.append('key', src.key); else body.append('file', new Blob([src.bytes as BlobPart]), 'font.bin');
try { return await json(await request('/fonts/outlines', { method: 'POST', body })); } catch (e) { return e instanceof ApiError && e.status === 409 ? 'gone' : null; }
},
diff --git a/frontend/src/io/pdf-read.ts b/frontend/src/io/pdf-read.ts
index 28e6180..5b02749 100644
--- a/frontend/src/io/pdf-read.ts
+++ b/frontend/src/io/pdf-read.ts
@@ -301,8 +301,9 @@ const BYTE_CMAPS: Array<[RegExp, string]> = [[/^(B5pc|ETen-B5|ETenms-B5|HKscs-B5
const SEVEN_BIT_CMAPS: Array<[RegExp, string]> = [[/^(Ext-|Add-)?[HV]$/, 'euc-jp'], [/^GB-[HV]$/, 'gbk'], [/^KSC-[HV]$/, 'euc-kr']];
const ORDERINGS: Record = { CNS1: 'big5', GB1: 'gbk', Japan1: 'shift_jis', Korea1: 'euc-kr' };
const BROKEN = /[�-]|[\ud800-\udbff](?![\udc00-\udfff])|(?:^|[^\ud800-\udbff])[\udc00-\udfff]/;
-interface FontProgram { data: Stream; kind: 'gid' | 'cid'; map: Val | undefined; table: Uint8Array | null; key: string; whole: boolean; dead: boolean; upm: number; glyphs: Map }
-interface FontInfo { family: string; style: string; shown: string; vertical: boolean; dw2: [number, number]; program: FontProgram | null; widths: Map; dw: number; two: boolean; direct: boolean; bytes: string; high: boolean; uni: Map | null; enc: Map | null; type3: { matrix: Mat; procs: PDict; res: PDict | null; names: Map } | null }
+interface FontProgram { data: Stream; kind: 'gid' | 'cid' | 'code'; enc: string; chars: Map; map: Val | undefined; table: Uint8Array | null; key: string; whole: boolean; dead: boolean; upm: number; glyphs: Map }
+interface CidMap { space: number[][]; map: Map; identity: boolean }
+interface FontInfo { family: string; style: string; shown: string; vertical: boolean; dw2: [number, number]; w2: Map | null; cmap: Stream | null; cids: CidMap | null; own: boolean; named: Map; program: FontProgram | null; widths: Map; dw: number; two: boolean; direct: boolean; bytes: string; high: boolean; uni: Map | null; enc: Map | null; type3: { matrix: Mat; procs: PDict; res: PDict | null; names: Map } | null }
interface GS {
ctm: Mat; fill: Paint; stroke: Paint; fa: number; sa: number; lw: number; cap: Cap; join: Join; miter: number; dash: number[]; phase: number; blend: BlendMode;
fcs: Val[]; scs: Val[]; target: VNode[]; sm: { g: GroupNode; outer: VNode[] } | null; font: FontInfo | null; size: number; tc: number; tw: number; th: number; tl: number; rise: number; tr: number;
@@ -314,11 +315,18 @@ const JOINS: Join[] = ['miter', 'round', 'bevel'];
const WIN: Record = { 128: '€', 130: '‚', 131: 'ƒ', 132: '„', 133: '…', 134: '†', 135: '‡', 136: 'ˆ', 137: '‰', 138: 'Š', 139: '‹', 140: 'Œ', 142: 'Ž', 145: '‘', 146: '’', 147: '“', 148: '”', 149: '•', 150: '–', 151: '\u2014', 152: '˜', 153: '™', 154: 'š', 155: '›', 156: 'œ', 158: 'ž', 159: 'Ÿ' };
const GLYPH: Record = { space: ' ', exclam: '!', quotedbl: '"', numbersign: '#', dollar: '$', percent: '%', ampersand: '&', quotesingle: "'", quoteright: '’', quoteleft: '‘', parenleft: '(', parenright: ')', asterisk: '*', plus: '+', comma: ',', hyphen: '-', minus: '−', period: '.', slash: '/', zero: '0', one: '1', two: '2', three: '3', four: '4', five: '5', six: '6', seven: '7', eight: '8', nine: '9', colon: ':', semicolon: ';', less: '<', equal: '=', greater: '>', question: '?', at: '@', bracketleft: '[', backslash: '\\', bracketright: ']', asciicircum: '^', underscore: '_', grave: '`', braceleft: '{', bar: '|', braceright: '}', asciitilde: '~', bullet: '•', endash: '–', emdash: '\u2014', quotedblleft: '“', quotedblright: '”', fi: 'fi', fl: 'fl', ff: 'ff', ffi: 'ffi', ffl: 'ffl', ellipsis: '…', copyright: '©', registered: '®', trademark: '™', degree: '°', dagger: '†', daggerdbl: '‡', section: '§', paragraph: '¶', periodcentered: '·', guillemotleft: '«', guillemotright: '»', nbspace: ' ' };
+const MARKS: Record = { grave: '̀', acute: '́', circumflex: '̂', tilde: '̃', macron: '̄', breve: '̆', dotaccent: '̇', dieresis: '̈', ring: '̊', hungarumlaut: '̋', caron: '̌', cedilla: '̧', ogonek: '̨', commaaccent: '̧' };
+const LETTERS: Record = { AE: 'Æ', ae: 'æ', OE: 'Œ', oe: 'œ', Oslash: 'Ø', oslash: 'ø', Lslash: 'Ł', lslash: 'ł', Eth: 'Ð', eth: 'ð', Thorn: 'Þ', thorn: 'þ', germandbls: 'ß', dotlessi: 'ı', Dcroat: 'Đ', dcroat: 'đ', exclamdown: '¡', questiondown: '¿', cent: '¢', sterling: '£', yen: '¥', Euro: '€', currency: '¤', florin: 'ƒ', multiply: '×', divide: '÷', plusminus: '±', mu: 'µ', ordfeminine: 'ª', ordmasculine: 'º', quotesinglbase: '‚', quotedblbase: '„', guilsinglleft: '‹', guilsinglright: '›', perthousand: '‰', fraction: '⁄', onequarter: '¼', onehalf: '½', threequarters: '¾', onesuperior: '¹', twosuperior: '²', threesuperior: '³', brokenbar: '¦', logicalnot: '¬', dieresis: '¨', acute: '´', cedilla: '¸', macron: '¯', circumflex: 'ˆ', tilde: '˜', caron: 'ˇ', breve: '˘', dotaccent: '˙', ring: '˚', ogonek: '˛', hungarumlaut: '˝', Scommaaccent: 'Ș', scommaaccent: 'ș', Tcommaaccent: 'Ţ', tcommaaccent: 'ţ' };
+
function glyphChar(name: string): string {
if (GLYPH[name]) return GLYPH[name];
if (/^[A-Za-z]$/.test(name)) return name;
+ if (LETTERS[name]) return LETTERS[name];
const u = /^uni([0-9A-Fa-f]{4})$/.exec(name) ?? /^u([0-9A-Fa-f]{4,6})$/.exec(name);
- if (u) return String.fromCodePoint(parseInt(u[1], 16));
+ if (u) { const cp = parseInt(u[1], 16); return cp < 32 || cp > 0x10ffff || (cp >= 0xd800 && cp <= 0xf8ff) || cp >= 0xf0000 ? '' : String.fromCodePoint(cp); }
+ const m = /^([A-Za-z]|dotlessi)([a-z]+)$/.exec(name), mark = m ? MARKS[m[2]] : undefined;
+ if (m && mark) { const made = ((m[1] === 'dotlessi' ? 'i' : m[1]) + mark).normalize('NFC'); if (made.length === 1) return made; }
+ if (name.includes('_')) { const parts = name.split('.')[0].split('_').map(glyphChar); return parts.every(Boolean) ? parts.join('') : ''; }
const base = name.split('.')[0];
return base !== name ? glyphChar(base) : '';
}
@@ -594,6 +602,7 @@ class Painter {
ocgs = new Map();
readonly ocGroups = new Map();
private readonly fonts = new Map();
+ private actual: { t: string; used: boolean } | null = null;
readonly patterns: PatternDef[] = [];
private readonly meshOf = new WeakMap();
private readonly tiles = new Map();
@@ -634,7 +643,7 @@ class Painter {
const pdf = this.pdf, lx = new Lexer(content, 0, false);
await this.prepareFonts(res);
let gs: GS = { ctm: base, fill: solid(gray(100)), stroke: solid(gray(100)), fa: 1, sa: 1, lw: 1, cap: 'butt', join: 'miter', miter: 10, dash: [], phase: 0, blend: 'normal', fcs: [new Name('DeviceGray')], scs: [new Name('DeviceGray')], sm: null, font: null, size: 12, tc: 0, tw: 0, th: 1, tl: 0, rise: 0, tr: 0, ...inherit, target };
- const stack: GS[] = [], marks: Array = [];
+ const stack: GS[] = [], marks: Array = [], said: Array<{ t: string; used: boolean } | null> = [];
let path: SubPath[] = [], cur: Anchor[] | null = null, clip: 'nonzero' | 'evenodd' | null = null, tm: Mat = IDENTITY, tlm: Mat = IDENTITY;
const ops: Val[] = [];
const P = (x: number, y: number): { x: number; y: number } => apply(gs.ctm, x, y);
@@ -753,6 +762,9 @@ class Painter {
case 'BI': { let k = lx.i; while (k < content.length - 1 && !(content[k] === 69 && content[k + 1] === 73 && WS.has(content[k - 1]) && (k + 2 >= content.length || WS.has(content[k + 2])))) k++; lx.i = k + 2; this.skipped.add('inline images'); break; }
case 'BDC': case 'BMC': {
const od = op === 'BDC' && nameOf(a[0]) === 'OC' && a[1] instanceof Name ? pdf.dict(pdf.dict(res?.get('Properties'))?.get(a[1].v)) : null;
+ const real = op === 'BDC' ? pdf.get((a[1] instanceof Name ? pdf.dict(pdf.dict(res?.get('Properties'))?.get(a[1].v)) : pdf.dict(a[1]))?.get('ActualText')) : null, t = real instanceof Str ? pdfText(real.b) : '';
+ said.push(this.actual);
+ if (real instanceof Str) this.actual = BROKEN.test(t) ? null : { t, used: false };
if (od && this.ocgs.has(od)) {
const g: GroupNode = { id: newId('g'), kind: 'group', clip: false, children: [], opacity: 1, blend: 'normal', ap: { items: [], effects: [] }, name: this.ocgs.get(od)?.name };
this.ocGroups.set(g, od);
@@ -762,7 +774,7 @@ class Painter {
} else marks.push(null);
break;
}
- case 'EMC': { const back = marks.pop(); if (back) gs.target = back; break; }
+ case 'EMC': { const back = marks.pop(); if (back) gs.target = back; this.actual = said.pop() ?? null; break; }
case 'BT': tm = IDENTITY; tlm = IDENTITY; break;
case 'Tf': gs.font = this.font(pdf.dict(res?.get('Font'))?.get(nameOf(a[0])), res); gs.size = n(1); break;
case 'Tc': gs.tc = n(0); break;
@@ -792,6 +804,10 @@ class Painter {
let text = '', adv = 0, ink = 0, lost = 0;
const start = tm, glyphs: Array<{ code: number; at: number }> = [], gaps = new Map();
const css = !t3 && !f.two && !f.widths.size ? cssFont({ ...DEFAULT_CHAR, font: f.family, style: f.style }, 100) : '';
+ const odd = (c: number): boolean => { const nm = f.named.get(c); return nm !== undefined && nm !== '.notdef' && !f.enc?.has(c); };
+ const simple = f.program?.kind === 'code' ? f.program : null;
+ if (simple && !simple.whole && !simple.dead && gs.tr !== 3 && gs.tr !== 7 && items.some((it) => it instanceof Str && it.b.some((c) => f.uni?.get(c) === undefined && !f.enc?.has(c) && (f.own || odd(c))))) await this.outlines(simple, [0]);
+ const own = simple?.whole ? simple : null;
for (const it of items) {
if (typeof it === 'number') { adv += (-it / 1000) * size * (f.vertical ? 1 : gs.th); if (-it / 1000 > 0.18 && text && !text.endsWith(' ')) { gaps.set(text.length, -it / 1000); text += ' '; } continue; }
if (!(it instanceof Str)) continue;
@@ -800,14 +816,16 @@ class Painter {
for (const ch of whole) { const cp = ch.codePointAt(0) as number; text += ch; adv += ((cp < 0x100 || (cp >= 0xff61 && cp <= 0xff9f) ? 0.5 : 1) * size + gs.tc + (cp === 32 ? gs.tw : 0)) * gs.th; if (ch.trim()) ink = adv; }
continue;
}
- for (let i = 0; i < b.length; i += f.two ? 2 : 1) {
- const code = f.two ? (b[i] << 8) | (b[i + 1] ?? 0) : b[i];
- const named = f.uni?.get(code), ch = named || f.enc?.get(code) || (named === '' ? '' : f.two ? (f.direct ? String.fromCharCode(code) : '') : code >= 32 && code < 127 ? String.fromCharCode(code) : WIN[code] ?? (code >= 160 ? String.fromCharCode(code) : ''));
- if (!ch && (f.two || named === '')) lost++;
+ for (let i = 0, n = 1; i < b.length; i += n) {
+ n = f.cids ? codeBytes(f.cids.space, b, i) : f.two ? 2 : 1;
+ const code = n === 2 ? (b[i] << 8) | (b[i + 1] ?? 0) : b[i], id = f.cids ? f.cids.map.get(n * 0x10000 + code) ?? (f.cids.identity ? code : 0) : code;
+ const named = f.uni?.get(code), guess = code >= 32 && code < 127 ? String.fromCharCode(code) : WIN[code] ?? (code >= 160 ? String.fromCharCode(code) : ''), told = !!own && (f.own || odd(code)), drawn = told && !!own?.glyphs.get(code)?.length;
+ const ch = named || f.enc?.get(code) || (named === '' ? '' : f.two ? (f.direct ? String.fromCharCode(code) : '') : told ? own?.chars.get(code) ?? (drawn ? '' : guess) : guess);
+ if (!ch && (f.two || named === '' || drawn)) lost++;
text += ch;
- if (t3 || f.program) glyphs.push({ code, at: adv });
- const w = t3 ? (f.widths.get(code) ?? 0) * t3.matrix[0] : css ? emOf(css, ch || ' ') : (f.widths.get(code) ?? f.dw) / 1000;
- adv += f.vertical ? (f.dw2[1] / 1000) * size + gs.tc : (w * size + gs.tc + (code === 32 && !f.two ? gs.tw : 0)) * gs.th;
+ if (t3 || f.program) glyphs.push({ code: id, at: adv });
+ const w = t3 ? (f.widths.get(code) ?? 0) * t3.matrix[0] : css ? emOf(css, ch || ' ') : (f.widths.get(id) ?? f.dw) / 1000;
+ adv += f.vertical ? ((f.w2?.get(id)?.[0] ?? f.dw2[1]) / 1000) * size + gs.tc : (w * size + gs.tc + (code === 32 && n === 1 ? gs.tw : 0)) * gs.th;
if (ch.trim()) ink = adv;
}
}
@@ -822,6 +840,8 @@ class Painter {
}
return next;
}
+ const act = this.actual;
+ if (act && lost && act.t.trim()) { if (act.used) return next; act.used = true; text = act.t; ink = adv; lost = 0; gaps.clear(); }
if (lost && (await this.shapes(f, glyphs, gs, start, size))) return next;
if (lost) this.skipped.add(`characters of type in ${f.shown} that the file gives no Unicode value for`);
if (!text.trim()) return next;
@@ -843,27 +863,33 @@ class Painter {
return next;
}
+ private async outlines(p: FontProgram, need: number[]): Promise {
+ try {
+ let got = await api.fontOutlines(p.key ? { key: p.key } : { bytes: await this.pdf.decode(p.data) }, p.kind, need, p.enc);
+ if (got === 'gone') got = await api.fontOutlines({ bytes: await this.pdf.decode(p.data) }, p.kind, need, p.enc);
+ if (!got || got === 'gone') { p.dead = true; return false; }
+ p.key = got.key; p.upm = got.upm || 1000; p.whole = got.whole;
+ for (const [id, cmds] of Object.entries(got.glyphs)) p.glyphs.set(Number(id), outlineOf(cmds));
+ for (const [id, s] of Object.entries(got.chars ?? {})) p.chars.set(Number(id), s);
+ for (const id of need) if (!p.glyphs.has(id)) p.glyphs.set(id, []);
+ return true;
+ } catch { p.dead = true; return false; }
+ }
+
private async shapes(f: FontInfo, glyphs: Array<{ code: number; at: number }>, gs: GS, start: Mat, size: number): Promise {
const p = f.program;
- if (!p || p.dead) return false;
+ if (!p || p.dead || f.cmap) return false;
try {
if (p.map instanceof Stream && !p.table) p.table = await this.pdf.decode(p.map);
const table = p.table, idOf = (code: number): number => (table ? ((table[code * 2] ?? 0) << 8) | (table[code * 2 + 1] ?? 0) : code);
const need = [...new Set(glyphs.map((g) => idOf(g.code)))].filter((id) => !p.glyphs.has(id));
- if (need.length && !p.whole) {
- let got = await api.fontOutlines(p.key ? { key: p.key } : { bytes: await this.pdf.decode(p.data) }, p.kind, need);
- if (got === 'gone') got = await api.fontOutlines({ bytes: await this.pdf.decode(p.data) }, p.kind, need);
- if (!got || got === 'gone') { p.dead = true; return false; }
- p.key = got.key; p.upm = got.upm || 1000; p.whole = got.whole;
- for (const [id, cmds] of Object.entries(got.glyphs)) p.glyphs.set(Number(id), outlineOf(cmds));
- for (const id of need) if (!p.glyphs.has(id)) p.glyphs.set(id, []);
- }
+ if (need.length && !p.whole && !(await this.outlines(p, need))) return false;
const d: PathData = [], k = 1 / p.upm;
for (const g of glyphs) {
const shape = p.glyphs.get(idOf(g.code));
if (!shape?.length) continue;
- const w0 = (f.widths.get(g.code) ?? f.dw) / 1000;
- d.push(...transformPath(shape, mul(gs.ctm, mul(start, f.vertical ? [size * gs.th * k, 0, 0, size * k, (-w0 / 2) * size * gs.th, g.at - (f.dw2[0] / 1000) * size + gs.rise] : [size * gs.th * k, 0, 0, size * k, g.at, gs.rise]))));
+ const w0 = (f.widths.get(g.code) ?? f.dw) / 1000, up = f.w2?.get(g.code);
+ d.push(...transformPath(shape, mul(gs.ctm, mul(start, f.vertical ? [size * gs.th * k, 0, 0, size * k, -(up ? up[1] / 1000 : w0 / 2) * size * gs.th, g.at - ((up ? up[2] : f.dw2[0]) / 1000) * size + gs.rise] : [size * gs.th * k, 0, 0, size * k, g.at, gs.rise]))));
}
const filled = gs.tr === 1 || gs.tr === 5 ? NONE : gs.fill, stroked = gs.tr === 1 || gs.tr === 2 || gs.tr === 5 || gs.tr === 6 ? gs.stroke : NONE, s = Math.sqrt(Math.abs(gs.ctm[0] * gs.ctm[3] - gs.ctm[1] * gs.ctm[2])), items = [];
if (filled.type !== 'none') items.push({ ...fill(filled), opacity: gs.fa });
@@ -931,9 +957,17 @@ class Painter {
}
const t3 = sub === 'Type3' ? { matrix: mat6(pdf.nums(d.get('FontMatrix'))) ?? ([0.001, 0, 0, 0.001, 0, 0] as Mat), procs: pdf.dict(d.get('CharProcs')) ?? new Map(), res: pdf.dict(d.get('Resources')) ?? res, names } : null;
const cmap = two && e instanceof Name ? e.v : '', seven = SEVEN_BIT_CMAPS.find(([re]) => re.test(cmap))?.[1] ?? '';
- const fd = two ? pdf.dict(desc?.get('FontDescriptor')) : null, f2 = pdf.get(fd?.get('FontFile2')), f3 = pdf.get(fd?.get('FontFile3')), data = f2 instanceof Stream ? f2 : f3 instanceof Stream ? f3 : null, v = desc ? pdf.nums(desc.get('DW2')) : [];
- const program: FontProgram | null = data && /^Identity-[HV]$/.test(cmap) ? { data, kind: nameOf(desc?.get('Subtype')) === 'CIDFontType2' ? 'gid' : 'cid', map: pdf.get(desc?.get('CIDToGIDMap')), table: null, key: '', whole: false, dead: false, upm: 1000, glyphs: new Map() } : null;
- const info: FontInfo = { family, style, shown, vertical: two && (/(^|-)V$/.test(cmap) || (e instanceof Stream && pdf.n(e.dict.get('WMode')) === 1)), dw2: [v[0] ?? 880, v[1] ?? -1000], program, widths, dw, two, direct: /-(UCS2|UTF16)-/.test(cmap), bytes: seven || (BYTE_CMAPS.find(([re]) => re.test(cmap))?.[1] ?? ''), high: !!seven, uni: null, enc, type3: t3 };
+ const fd = pdf.dict((two ? desc : t3 ? null : d)?.get('FontDescriptor')), f1 = two ? null : pdf.get(fd?.get('FontFile')), f2 = pdf.get(fd?.get('FontFile2')), f3 = pdf.get(fd?.get('FontFile3')), data = f1 instanceof Stream ? f1 : f2 instanceof Stream ? f2 : f3 instanceof Stream ? f3 : null, v = desc ? pdf.nums(desc.get('DW2')) : [];
+ const base = e instanceof Name ? e.v : e instanceof Map ? nameOf(e.get('BaseEncoding')) : '', symbolic = (pdf.n(fd?.get('Flags')) & 4) !== 0, byCid = /^Identity-[HV]$/.test(cmap) || e instanceof Stream;
+ const fresh = { map: undefined as Val | undefined, table: null, key: '', whole: false, dead: false, upm: 1000, glyphs: new Map(), chars: new Map() };
+ const program: FontProgram | null = !data ? null : two ? (byCid ? { ...fresh, data, kind: nameOf(desc?.get('Subtype')) === 'CIDFontType2' ? 'gid' : 'cid', enc: '', map: pdf.get(desc?.get('CIDToGIDMap')) } : null) : { ...fresh, data, kind: 'code', enc: JSON.stringify({ base, symbolic, names: Object.fromEntries(names) }) };
+ const raw2 = desc && byCid ? pdf.arr(desc.get('W2')) : [], w2 = raw2.length ? new Map() : null;
+ for (let i = 0; w2 && i < raw2.length;) {
+ const a = pdf.n(raw2[i]), b = pdf.get(raw2[i + 1]);
+ if (Array.isArray(b)) { for (let k = 0; k + 2 < b.length; k += 3) w2.set(a + k / 3, [pdf.n(b[k]), pdf.n(b[k + 1]), pdf.n(b[k + 2])]); i += 2; }
+ else { const z = pdf.n(b), t = [pdf.n(raw2[i + 2]), pdf.n(raw2[i + 3]), pdf.n(raw2[i + 4])]; for (let c = a; c <= z && c - a < 65536; c++) w2.set(c, t); i += 5; }
+ }
+ const info: FontInfo = { family, style, shown, vertical: two && (/(^|-)V$/.test(cmap) || (e instanceof Stream && pdf.n(e.dict.get('WMode')) === 1)), dw2: [v[0] ?? 880, v[1] ?? -1000], w2, cmap: two && e instanceof Stream ? e : null, cids: null, own: !two && !t3 && !!data && !base, named: names, program, widths, dw, two, direct: /-(UCS2|UTF16)-/.test(cmap), bytes: seven || (BYTE_CMAPS.find(([re]) => re.test(cmap))?.[1] ?? ''), high: !!seven, uni: null, enc, type3: t3 };
this.fonts.set(d, info);
return info;
}
@@ -944,6 +978,11 @@ class Painter {
for (const v of fonts.values()) {
const d = this.pdf.dict(v), f = this.font(v, res), tu = d ? this.pdf.get(d.get('ToUnicode')) : null;
if (f && !f.uni && tu instanceof Stream) { try { f.uni = parseCMap(latin(await this.pdf.decode(tu))); } catch { f.uni = null; } }
+ if (f?.cmap && !f.cids) {
+ try { f.cids = parseCidMap(latin(await this.pdf.decode(f.cmap)), nameOf(f.cmap.dict.get('UseCMap'))); } catch { f.cids = null; }
+ if (!f.cids && f.program) f.program.dead = true;
+ f.cmap = null;
+ }
}
}
@@ -1243,6 +1282,19 @@ function outlineOf(cmds: Array): PathData {
return out;
}
+const codeBytes = (space: number[][], b: Uint8Array, i: number): number => (space.some((s) => s[0] === 1 && b[i] >= s[1] && b[i] <= s[2]) ? 1 : space.some((s) => s[0] === 2) && i + 1 < b.length ? 2 : 1);
+
+function parseCidMap(src: string, use: string): CidMap | null {
+ const hex = (h: string): number => parseInt(h, 16), space: number[][] = [], map = new Map(), based = use || (/\/([\w-]+)\s+usecmap/.exec(src)?.[1] ?? '');
+ if (based && !/^Identity-[HV]$/.test(based)) return null;
+ for (const block of src.match(/begincodespacerange([\s\S]*?)endcodespacerange/g) ?? []) for (const m of block.matchAll(/<([0-9a-fA-F]+)>\s*<([0-9a-fA-F]+)>/g)) space.push([m[1].length >> 1, hex(m[1]), hex(m[2])]);
+ for (const block of src.match(/begincidchar([\s\S]*?)endcidchar/g) ?? []) for (const m of block.matchAll(/<([0-9a-fA-F]+)>\s*(\d+)/g)) map.set((m[1].length >> 1) * 0x10000 + hex(m[1]), Number(m[2]));
+ for (const block of src.match(/begincidrange([\s\S]*?)endcidrange/g) ?? []) {
+ for (const m of block.matchAll(/<([0-9a-fA-F]+)>\s*<([0-9a-fA-F]+)>\s*(\d+)/g)) { const a = hex(m[1]), b = hex(m[2]), c = Number(m[3]), n = (m[1].length >> 1) * 0x10000; for (let k = a; k <= b && k - a < 65536; k++) map.set(n + k, c + k - a); }
+ }
+ return space.length && space.every((s) => s[0] === 1 || s[0] === 2) ? { space, map, identity: !!based } : null;
+}
+
function parseCMap(src: string): Map {
const out = new Map(), hex = (h: string): number => parseInt(h, 16);
const uni = (raw: string): string => { const h = raw.replace(/\s/g, ''); let s = ''; for (let i = 0; i + 4 <= h.length; i += 4) s += String.fromCharCode(parseInt(h.slice(i, i + 4), 16)); if (h.length === 2) s = String.fromCharCode(parseInt(h, 16)); return s; };
From c49b58382716c6e397c8b3456ac0648ebf247485 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 15:11:18 -0500
Subject: [PATCH 40/74] fix(pdf): type in a font whose licence forbids
embedding is drawn as outlines in that font instead of embedding it, and the
export says which font and why
---
frontend/src/io/pdf-text.ts | 5 +++--
frontend/src/io/pdf.ts | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/frontend/src/io/pdf-text.ts b/frontend/src/io/pdf-text.ts
index 328fa35..ca7c84e 100644
--- a/frontend/src/io/pdf-text.ts
+++ b/frontend/src/io/pdf-text.ts
@@ -27,7 +27,7 @@ export class Face {
constructor(readonly key: string, readonly font: Font, readonly style: CharStyle) {}
}
-export const restricted = (font: Font): boolean => ((((font.tables.os2 as { fsType?: number } | undefined)?.fsType ?? 0) & 0x0002) !== 0);
+export const restricted = (font: Font): boolean => ((((font.tables.os2 as { fsType?: number } | undefined)?.fsType ?? 0) & 0x000e) === 0x0002);
const solidOrNone =(doc: Doc, p: Paint): boolean => { const r = resolvePaint(doc, p); return r.type === 'none' || r.type === 'color'; };
@@ -72,6 +72,7 @@ export async function embeddedMarkFont(pdf: PdfSink, deflate: (b: Uint8Array) =>
export class LiveFonts {
private readonly faces = new Map();
+ readonly withheld = new Set();
capable(doc: Doc, n: TextNode): boolean {
return !has3d(n) && !n.ap.effects.length && !n.ap.items.some((i) => i.visible) && !(n.mask && !n.mask.disabled);
@@ -112,7 +113,7 @@ export class LiveFonts {
async build(pdf: PdfSink, deflate: (d: Uint8Array) => Promise, openType = true): Promise {
await Promise.all([...this.faces.values()].map(async (face) => {
- if (face.fallback && restricted(face.font)) { face.failed = true; return; }
+ if (restricted(face.font)) { face.failed = true; if (!face.fallback) this.withheld.add(face.style.font); return; }
const src = fontSource(face.font);
const res = src ? await api.subsetFont(src, [...face.gids], hasAxes(face.style) ? { ...face.style.axes } : {}) : null;
if (!res || (res.cff && !openType)) { face.failed = true; return; }
diff --git a/frontend/src/io/pdf.ts b/frontend/src/io/pdf.ts
index e6ffd5a..7014dfe 100644
--- a/frontend/src/io/pdf.ts
+++ b/frontend/src/io/pdf.ts
@@ -749,7 +749,7 @@ export async function exportPdf(p: Project, o: PdfOptions): Promise {
const root = pdf.add(`<< /Type /Catalog /Pages ${pagesId} 0 R${names}${extra} >>`);
const info = pdf.add(`<< /Title ${pdfTextString(title)} /Producer ${pdfString(producer)} /Creator (formpath) /CreationDate (${stamp}) /ModDate (${stamp})${xp ? ` ${xp.version} ${xp.trapped}` : ''} >>`);
const blob = await pdf.build(root, info, rules.header, docId, sealer, (o.compression ?? DEFAULT_COMPRESSION).flate !== false);
- for (const note of [...substituteNotes(swapped), ...glyphNotes([...missing])]) o.notes?.(note);
+ for (const note of [...substituteNotes(swapped), ...[...live.withheld].map((f) => `The licence of ${f} does not allow it to be embedded in a document, so its type was drawn as outlines in ${f}. It looks the same but cannot be selected or searched as text.`), ...glyphNotes([...missing])]) o.notes?.(note);
return blob;
}
From 5335c8ded887f9e57319d45d9a6b223c75382461 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 15:13:02 -0500
Subject: [PATCH 41/74] fix(io): graphic style names in an .ai read in their
own script instead of as Latin-1 bytes
---
frontend/src/io/ai-legacy.ts | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/frontend/src/io/ai-legacy.ts b/frontend/src/io/ai-legacy.ts
index 7fda3ea..c62793e 100644
--- a/frontend/src/io/ai-legacy.ts
+++ b/frontend/src/io/ai-legacy.ts
@@ -895,10 +895,10 @@ function buildDefs(rd: Reader, doc: Doc): string[] {
const listed = defs.filter((d) => d.kind === 'stylelist').flatMap((d) => tokenize(d.lines.join('\n')).filter((t) => t.t === 's').map((t) => (t.t === 's' ? t.v : '')));
const gstyles: Doc['styles'] = [];
for (const nm of listed) {
- const st = rd.styles.get(nm);
- if (!st || nm === '[Default]' || gstyles.some((g) => g.name === nm) || (!st.ap.items.length && !st.ap.effects.length)) continue;
+ const st = rd.styles.get(nm), shown = psUni(nm, rd.meta.cs);
+ if (!st || nm === '[Default]' || gstyles.some((g) => g.name === shown) || (!st.ap.items.length && !st.ap.effects.length)) continue;
if (st.missing.length) sk.add(`graphic style effects with no equivalent (${[...new Set(st.missing)].join(', ')})`);
- gstyles.push({ id: newId('gs'), name: nm, ap: st.ap, opacity: st.opacity, blend: st.blend });
+ gstyles.push({ id: newId('gs'), name: shown, ap: st.ap, opacity: st.opacity, blend: st.blend });
}
doc.styles = [...doc.styles, ...gstyles];
doc.patterns = [...doc.patterns, ...patterns];
From f0cedef201e439d123073da424227f88290a4994 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 15:17:13 -0500
Subject: [PATCH 42/74] fix(i18n): Find Similar Fonts says a font is not
installed in all 25 languages
---
frontend/src/i18n/keys.json | 3 ++-
frontend/src/i18n/locales/cs.json | 3 ++-
frontend/src/i18n/locales/da.json | 3 ++-
frontend/src/i18n/locales/de.json | 3 ++-
frontend/src/i18n/locales/es-MX.json | 3 ++-
frontend/src/i18n/locales/es.json | 3 ++-
frontend/src/i18n/locales/fi.json | 3 ++-
frontend/src/i18n/locales/fr-CA.json | 3 ++-
frontend/src/i18n/locales/fr.json | 3 ++-
frontend/src/i18n/locales/hu.json | 3 ++-
frontend/src/i18n/locales/id.json | 3 ++-
frontend/src/i18n/locales/it.json | 3 ++-
frontend/src/i18n/locales/ja.json | 3 ++-
frontend/src/i18n/locales/ko.json | 3 ++-
frontend/src/i18n/locales/nb.json | 3 ++-
frontend/src/i18n/locales/nl.json | 3 ++-
frontend/src/i18n/locales/pl.json | 3 ++-
frontend/src/i18n/locales/pt-BR.json | 3 ++-
frontend/src/i18n/locales/ru.json | 3 ++-
frontend/src/i18n/locales/sv.json | 3 ++-
frontend/src/i18n/locales/th.json | 3 ++-
frontend/src/i18n/locales/tr.json | 3 ++-
frontend/src/i18n/locales/uk.json | 3 ++-
frontend/src/i18n/locales/vi.json | 3 ++-
frontend/src/i18n/locales/zh-Hans.json | 3 ++-
frontend/src/i18n/locales/zh-Hant.json | 3 ++-
26 files changed, 52 insertions(+), 26 deletions(-)
diff --git a/frontend/src/i18n/keys.json b/frontend/src/i18n/keys.json
index 10710b0..f8a0836 100644
--- a/frontend/src/i18n/keys.json
+++ b/frontend/src/i18n/keys.json
@@ -4123,5 +4123,6 @@
"Zoom Tool",
"Zoom with the scroll wheel",
"Zoom: type a percent and press Enter",
-"ZStandard compressed art ({0})"
+"ZStandard compressed art ({0})",
+"{0} is not installed on this computer"
]
diff --git a/frontend/src/i18n/locales/cs.json b/frontend/src/i18n/locales/cs.json
index 7032861..36ed938 100644
--- a/frontend/src/i18n/locales/cs.json
+++ b/frontend/src/i18n/locales/cs.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "s vybraným {0}: {1}",
"x Height": "Výška x",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "Písmo {0} není v tomto počítači nainstalováno"
}
diff --git a/frontend/src/i18n/locales/da.json b/frontend/src/i18n/locales/da.json
index 4384e90..62c5b85 100644
--- a/frontend/src/i18n/locales/da.json
+++ b/frontend/src/i18n/locales/da.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "med {0} markeret {1}",
"x Height": "x-højde",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "Skrifttypen {0} er ikke installeret på denne computer"
}
diff --git a/frontend/src/i18n/locales/de.json b/frontend/src/i18n/locales/de.json
index 8a46aa9..b1d9cfe 100644
--- a/frontend/src/i18n/locales/de.json
+++ b/frontend/src/i18n/locales/de.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "mit {0} gewählt {1}",
"x Height": "x-Höhe",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "Die Schrift {0} ist auf diesem Computer nicht installiert"
}
diff --git a/frontend/src/i18n/locales/es-MX.json b/frontend/src/i18n/locales/es-MX.json
index fa822a3..dcd4180 100644
--- a/frontend/src/i18n/locales/es-MX.json
+++ b/frontend/src/i18n/locales/es-MX.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "con {0} seleccionado {1}",
"x Height": "Altura de la x",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "La fuente {0} no está instalada en esta computadora"
}
diff --git a/frontend/src/i18n/locales/es.json b/frontend/src/i18n/locales/es.json
index 35fd1da..7507849 100644
--- a/frontend/src/i18n/locales/es.json
+++ b/frontend/src/i18n/locales/es.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "con {0} seleccionado {1}",
"x Height": "Altura de la x",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "La fuente {0} no está instalada en este equipo"
}
diff --git a/frontend/src/i18n/locales/fi.json b/frontend/src/i18n/locales/fi.json
index a06e5e2..e145f08 100644
--- a/frontend/src/i18n/locales/fi.json
+++ b/frontend/src/i18n/locales/fi.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "kun {0} on valittu {1}",
"x Height": "x-korkeus",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "Fonttia {0} ei ole asennettu tähän tietokoneeseen"
}
diff --git a/frontend/src/i18n/locales/fr-CA.json b/frontend/src/i18n/locales/fr-CA.json
index c94dd62..9931aff 100644
--- a/frontend/src/i18n/locales/fr-CA.json
+++ b/frontend/src/i18n/locales/fr-CA.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "avec {0} sélectionné {1}",
"x Height": "Hauteur d’x",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "La police {0} n'est pas installée sur cet ordinateur"
}
diff --git a/frontend/src/i18n/locales/fr.json b/frontend/src/i18n/locales/fr.json
index 126cf01..c29bb37 100644
--- a/frontend/src/i18n/locales/fr.json
+++ b/frontend/src/i18n/locales/fr.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "avec {0} sélectionné {1}",
"x Height": "Hauteur d’x",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "La police {0} n'est pas installée sur cet ordinateur"
}
diff --git a/frontend/src/i18n/locales/hu.json b/frontend/src/i18n/locales/hu.json
index ec4d56d..4d7753f 100644
--- a/frontend/src/i18n/locales/hu.json
+++ b/frontend/src/i18n/locales/hu.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "{0} kijelölésével {1}",
"x Height": "x-magasság",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "A(z) {0} betűtípus nincs telepítve ezen a számítógépen"
}
diff --git a/frontend/src/i18n/locales/id.json b/frontend/src/i18n/locales/id.json
index 31fd95b..9bdc763 100644
--- a/frontend/src/i18n/locales/id.json
+++ b/frontend/src/i18n/locales/id.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "dengan {0} terpilih {1}",
"x Height": "Tinggi x",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "Font {0} tidak terpasang di komputer ini"
}
diff --git a/frontend/src/i18n/locales/it.json b/frontend/src/i18n/locales/it.json
index 9b762e2..035b29b 100644
--- a/frontend/src/i18n/locales/it.json
+++ b/frontend/src/i18n/locales/it.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "con {0} selezionato {1}",
"x Height": "Altezza x",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "Il font {0} non è installato su questo computer"
}
diff --git a/frontend/src/i18n/locales/ja.json b/frontend/src/i18n/locales/ja.json
index 9763440..89edd3c 100644
--- a/frontend/src/i18n/locales/ja.json
+++ b/frontend/src/i18n/locales/ja.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "{0} を選択中 {1}",
"x Height": "xハイト",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "フォント {0} はこのコンピューターにインストールされていません"
}
diff --git a/frontend/src/i18n/locales/ko.json b/frontend/src/i18n/locales/ko.json
index 859a513..760ce18 100644
--- a/frontend/src/i18n/locales/ko.json
+++ b/frontend/src/i18n/locales/ko.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "{0} 선택 시 {1}",
"x Height": "x 높이",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "{0} 글꼴이 이 컴퓨터에 설치되어 있지 않습니다"
}
diff --git a/frontend/src/i18n/locales/nb.json b/frontend/src/i18n/locales/nb.json
index ba691f4..c608d3a 100644
--- a/frontend/src/i18n/locales/nb.json
+++ b/frontend/src/i18n/locales/nb.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "med {0} valgt {1}",
"x Height": "x-høyde",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "Skriften {0} er ikke installert på denne datamaskinen"
}
diff --git a/frontend/src/i18n/locales/nl.json b/frontend/src/i18n/locales/nl.json
index 7c0fc53..fab510c 100644
--- a/frontend/src/i18n/locales/nl.json
+++ b/frontend/src/i18n/locales/nl.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "met {0} geselecteerd {1}",
"x Height": "x-hoogte",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "Lettertype {0} is niet geïnstalleerd op deze computer"
}
diff --git a/frontend/src/i18n/locales/pl.json b/frontend/src/i18n/locales/pl.json
index 5454255..8dff5cc 100644
--- a/frontend/src/i18n/locales/pl.json
+++ b/frontend/src/i18n/locales/pl.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "przy zaznaczeniu {0}: {1}",
"x Height": "Wysokość x",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "Czcionka {0} nie jest zainstalowana na tym komputerze"
}
diff --git a/frontend/src/i18n/locales/pt-BR.json b/frontend/src/i18n/locales/pt-BR.json
index 706b1e5..b3a57c0 100644
--- a/frontend/src/i18n/locales/pt-BR.json
+++ b/frontend/src/i18n/locales/pt-BR.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "com {0} selecionado {1}",
"x Height": "Altura do x",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "A fonte {0} não está instalada neste computador"
}
diff --git a/frontend/src/i18n/locales/ru.json b/frontend/src/i18n/locales/ru.json
index 713af74..d2eaa68 100644
--- a/frontend/src/i18n/locales/ru.json
+++ b/frontend/src/i18n/locales/ru.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "при выделенном {0}: {1}",
"x Height": "x-высота",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "Шрифт {0} не установлен на этом компьютере"
}
diff --git a/frontend/src/i18n/locales/sv.json b/frontend/src/i18n/locales/sv.json
index 88f4fa4..e97ddf4 100644
--- a/frontend/src/i18n/locales/sv.json
+++ b/frontend/src/i18n/locales/sv.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "med {0} markerat {1}",
"x Height": "x-höjd",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "Typsnittet {0} är inte installerat på den här datorn"
}
diff --git a/frontend/src/i18n/locales/th.json b/frontend/src/i18n/locales/th.json
index 7794f26..113fe69 100644
--- a/frontend/src/i18n/locales/th.json
+++ b/frontend/src/i18n/locales/th.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "เมื่อเลือก {0} {1}",
"x Height": "ความสูง x",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "ฟอนต์ {0} ไม่ได้ติดตั้งในคอมพิวเตอร์เครื่องนี้"
}
diff --git a/frontend/src/i18n/locales/tr.json b/frontend/src/i18n/locales/tr.json
index d3fea62..fbe7b41 100644
--- a/frontend/src/i18n/locales/tr.json
+++ b/frontend/src/i18n/locales/tr.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "{0} seçiliyken {1}",
"x Height": "x Yüksekliği",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "{0} yazı tipi bu bilgisayarda yüklü değil"
}
diff --git a/frontend/src/i18n/locales/uk.json b/frontend/src/i18n/locales/uk.json
index 42fdeaf..c268887 100644
--- a/frontend/src/i18n/locales/uk.json
+++ b/frontend/src/i18n/locales/uk.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "з виділеним {0} {1}",
"x Height": "Висота x",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "Шрифт {0} не встановлено на цьому комп’ютері"
}
diff --git a/frontend/src/i18n/locales/vi.json b/frontend/src/i18n/locales/vi.json
index 8b5c4ef..4558cb9 100644
--- a/frontend/src/i18n/locales/vi.json
+++ b/frontend/src/i18n/locales/vi.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "khi đã chọn {0} {1}",
"x Height": "Chiều cao chữ x",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "Phông chữ {0} chưa được cài trên máy tính này"
}
diff --git a/frontend/src/i18n/locales/zh-Hans.json b/frontend/src/i18n/locales/zh-Hans.json
index 0879c3c..76eaac8 100644
--- a/frontend/src/i18n/locales/zh-Hans.json
+++ b/frontend/src/i18n/locales/zh-Hans.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "选中 {0} 时 {1}",
"x Height": "x 高度",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "此计算机上未安装字体 {0}"
}
diff --git a/frontend/src/i18n/locales/zh-Hant.json b/frontend/src/i18n/locales/zh-Hant.json
index 56bbb55..481b93f 100644
--- a/frontend/src/i18n/locales/zh-Hant.json
+++ b/frontend/src/i18n/locales/zh-Hant.json
@@ -4123,5 +4123,6 @@
"with {0} selected {1}": "選取 {0} 時 {1}",
"x Height": "x 高度",
"x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"": "x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\"",
-"xMidYMid meet": "xMidYMid meet"
+"xMidYMid meet": "xMidYMid meet",
+"{0} is not installed on this computer": "此電腦上未安裝字體 {0}"
}
From 02ab9e73212587c87c33ecf7637eb4f47ef41d75 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 15:27:36 -0500
Subject: [PATCH 43/74] fix(dock): on Windows the terminal names Consolas and,
in a Chinese, Japanese or Korean window, that language's Windows font before
the generic monospace
---
frontend/index.html | 1 +
frontend/src/styles/dock-tokens.css | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/frontend/index.html b/frontend/index.html
index 13e1a84..bc8535e 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -100,6 +100,7 @@
r.setAttribute('data-ft-dock-side', side);
r.setAttribute('data-ft-dock-h', String(h));
r.setAttribute('data-ft-dock-w', String(w));
+ if (/^Win/.test(navigator.platform || '')) r.setAttribute('data-fp-win', '');
r.style.setProperty('--ft-dock-size', h + 'px');
r.style.setProperty('--ft-dock-wsize', w + 'px');
})();
diff --git a/frontend/src/styles/dock-tokens.css b/frontend/src/styles/dock-tokens.css
index 6611146..9dc0d1e 100644
--- a/frontend/src/styles/dock-tokens.css
+++ b/frontend/src/styles/dock-tokens.css
@@ -51,3 +51,9 @@
--dock-term-line-height: 1.2;
--dock-term-contrast: 1;
}
+
+:root[data-fp-win], :root[data-fp-win] .ft-dock { --dock-font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, 'JetBrains Mono', Consolas, monospace; }
+:root[data-fp-win]:lang(zh), :root[data-fp-win]:lang(zh) .ft-dock { --dock-font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, 'JetBrains Mono', Consolas, 'Microsoft YaHei', 'Microsoft JhengHei', 'Yu Gothic', 'Malgun Gothic', monospace; }
+:root[data-fp-win]:lang(zh-TW), :root[data-fp-win]:lang(zh-TW) .ft-dock { --dock-font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, 'JetBrains Mono', Consolas, 'Microsoft JhengHei', 'Microsoft YaHei', 'Yu Gothic', 'Malgun Gothic', monospace; }
+:root[data-fp-win]:lang(ja), :root[data-fp-win]:lang(ja) .ft-dock { --dock-font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, 'JetBrains Mono', Consolas, 'Yu Gothic', 'Microsoft YaHei', 'Microsoft JhengHei', 'Malgun Gothic', monospace; }
+:root[data-fp-win]:lang(ko), :root[data-fp-win]:lang(ko) .ft-dock { --dock-font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, 'JetBrains Mono', Consolas, 'Malgun Gothic', 'Microsoft YaHei', 'Microsoft JhengHei', 'Yu Gothic', monospace; }
From 1bc839fe39440fe78b7a4a1043465e401cbe9b64 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 15:27:36 -0500
Subject: [PATCH 44/74] fix(dock): Escape that closes an input method's
candidates no longer ends the panel guide
---
frontend/src/dock-adapter.ts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/frontend/src/dock-adapter.ts b/frontend/src/dock-adapter.ts
index b0f281c..3368c16 100644
--- a/frontend/src/dock-adapter.ts
+++ b/frontend/src/dock-adapter.ts
@@ -101,7 +101,12 @@ export interface DockDeps {
homeShown(): boolean;
}
+const imeEscape = (e: KeyboardEvent): void => {
+ if (e.key === 'Escape' && (e.isComposing || e.keyCode === 229) && document.querySelector('.ft-tour:not([hidden])')) Object.defineProperty(e, 'key', { value: 'Process' });
+};
+
export function formpathDock(deps: DockDeps): DockAdapter<'antigravity'> {
+ window.addEventListener('keydown', imeEscape, true);
return {
words: {
app: 'formpath', noun: 'document', example: 'make the title a warm gradient and add a soft drop shadow', start: './formpath boot',
From 19b7675354438d0305ab4c568260bbb2d30fe268 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 15:31:49 -0500
Subject: [PATCH 45/74] fix(launcher): formpath.bat passes every argument to
the Python commands as typed instead of splitting key=value and dropping what
follows an empty one
---
formpath.bat | 30 ++++++++++++------------------
setup/bat_args.py | 9 +++++++++
2 files changed, 21 insertions(+), 18 deletions(-)
create mode 100644 setup/bat_args.py
diff --git a/formpath.bat b/formpath.bat
index 55540de..028c7bd 100644
--- a/formpath.bat
+++ b/formpath.bat
@@ -3,34 +3,28 @@ setlocal
cd /d "%~dp0"
set "CMD=%~1"
if "%CMD%"=="" set "CMD=boot"
-if not "%~1"=="" shift
-set "REST="
-:collect
-if "%~1"=="" goto dispatch
-set "REST=%REST% %1"
-shift
-goto collect
-:dispatch
+set "PYS="
if /i "%CMD%"=="boot" ( call setup\boot_all.bat & goto :eof )
if /i "%CMD%"=="dev" ( call setup\boot_all.bat & goto :eof )
-if /i "%CMD%"=="install" ( call setup\install_all.bat %REST% & goto :eof )
+if /i "%CMD%"=="install" ( call setup\install_all.bat %2 %3 %4 %5 %6 %7 %8 %9 & goto :eof )
if /i "%CMD%"=="install-desktop" ( call setup\install_desktop.bat & goto :eof )
if /i "%CMD%"=="backend" ( call setup\boot_backend.bat & goto :eof )
if /i "%CMD%"=="frontend" ( call setup\boot_frontend.bat & goto :eof )
if /i "%CMD%"=="build" ( call setup\build_frontend.bat & goto :eof )
if /i "%CMD%"=="serve" ( call setup\serve.bat & goto :eof )
if /i "%CMD%"=="freeze" ( call setup\freeze_backend.bat & goto :eof )
-if /i "%CMD%"=="desktop" ( call setup\desktop.bat %REST% & goto :eof )
+if /i "%CMD%"=="desktop" ( call setup\desktop.bat %2 %3 %4 %5 %6 %7 %8 %9 & goto :eof )
if /i "%CMD%"=="doctor" ( call setup\doctor.bat & goto :eof )
if /i "%CMD%"=="check" ( call setup\check.bat & goto :eof )
-if /i "%CMD%"=="counts" ( call setup\counts.bat %REST% & goto :eof )
-if /i "%CMD%"=="mcp" ( call setup\python.bat setup\mcp_stdio.py %REST% & goto :eof )
-if /i "%CMD%"=="mcpb" ( call setup\python.bat setup\mcpb.py %REST% & goto :eof )
-if /i "%CMD%"=="i18n" ( call setup\python.bat setup\i18n.py %REST% & goto :eof )
-if /i "%CMD%"=="cli" ( call setup\python.bat setup\cli.py %REST% & goto :eof )
-if /i "%CMD%"=="claude" ( call setup\python.bat setup\claude_launch.py %REST% & goto :eof )
-if /i "%CMD%"=="agents" ( call setup\python.bat setup\agents.py %REST% & goto :eof )
-if /i "%CMD%"=="clean" ( call setup\clean.bat %REST% & goto :eof )
+if /i "%CMD%"=="counts" ( call setup\counts.bat %2 %3 %4 %5 %6 %7 %8 %9 & goto :eof )
+if /i "%CMD%"=="mcp" set "PYS=setup\mcp_stdio.py"
+if /i "%CMD%"=="mcpb" set "PYS=setup\mcpb.py"
+if /i "%CMD%"=="i18n" set "PYS=setup\i18n.py"
+if /i "%CMD%"=="cli" set "PYS=setup\cli.py"
+if /i "%CMD%"=="claude" set "PYS=setup\claude_launch.py"
+if /i "%CMD%"=="agents" set "PYS=setup\agents.py"
+if defined PYS setup\python.bat "%~dp0setup\bat_args.py" %PYS% %*
+if /i "%CMD%"=="clean" ( call setup\clean.bat %2 %3 %4 %5 %6 %7 %8 %9 & goto :eof )
if /i "%CMD%"=="help" ( call :usage & exit /b 0 )
echo [formpath] unknown command: %CMD%
call :usage
diff --git a/setup/bat_args.py b/setup/bat_args.py
new file mode 100644
index 0000000..5a838a4
--- /dev/null
+++ b/setup/bat_args.py
@@ -0,0 +1,9 @@
+import os
+import runpy
+import sys
+
+os.chdir(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+script = os.path.abspath(sys.argv[1])
+sys.argv = [script, *sys.argv[3:]]
+sys.path[0] = os.path.dirname(script)
+runpy.run_path(script, run_name="__main__")
From 4aea18df362a699e37b83aeb673548938891c758 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 15:42:03 -0500
Subject: [PATCH 46/74] fix(agents): on Windows a Chat message or first message
keeps its line breaks, quotes and % signs, because an npm .cmd shim is
started as node and its script and Chat gives the message on standard input
when it cannot be
---
backend/app/services/agent_shim.py | 62 +++++++++++++++++++++++++++++
backend/app/services/claude_code.py | 37 ++++++++++++-----
setup/claude_launch.py | 7 ++--
3 files changed, 94 insertions(+), 12 deletions(-)
create mode 100644 backend/app/services/agent_shim.py
diff --git a/backend/app/services/agent_shim.py b/backend/app/services/agent_shim.py
new file mode 100644
index 0000000..95c197b
--- /dev/null
+++ b/backend/app/services/agent_shim.py
@@ -0,0 +1,62 @@
+from __future__ import annotations
+
+import os
+import re
+import shutil
+import sys
+from pathlib import Path
+
+LIMIT = 16384
+BATCH = (".cmd", ".bat")
+ALLOWED_SETS = {"dp0", "_prog", "pathext"}
+UNSAFE = re.compile(r'[\x00-\x1f"%^&|<>!()]')
+
+
+def windows(platform: str | None = None) -> bool:
+ return (platform or sys.platform).startswith("win")
+
+
+def through_cmd(cmd: list, platform: str | None = None) -> bool:
+ return bool(cmd) and windows(platform) and str(cmd[0]).lower().endswith(BATCH)
+
+
+def plain(text: str) -> bool:
+ return not UNSAFE.search(text)
+
+
+def _local(folder: Path, rel: str) -> Path:
+ return folder.joinpath(*[p for p in rel.replace("/", "\\").split("\\") if p])
+
+
+def npm_target(shim: str | os.PathLike, search_path: str | None = None) -> list[str] | None:
+ try:
+ data = Path(shim).read_bytes()
+ text = data.decode("utf-8") if len(data) <= LIMIT else ""
+ except (OSError, UnicodeDecodeError):
+ return None
+ if text.count("%*") != 1 or any(name.lower() not in ALLOWED_SETS for name in re.findall(r'^\s*@?SET\s+"?([^=\s"]+)=', text, re.I | re.M)):
+ return None
+ folder = Path(shim).parent
+ direct = re.search(r'^"%dp0%\\([^"%]+)"\s+%\*\s*$', text, re.M)
+ if direct:
+ target = _local(folder, direct.group(1))
+ return [str(target)] if target.suffix.lower() in (".exe", ".com") and target.is_file() else None
+ run = re.search(r'"%_prog%"\s+(?P[^"%]*?)\s*"%dp0%\\(?P[^"%]+)"\s+%\*\s*$', text, re.M)
+ near = re.search(r'^IF EXIST "%dp0%\\([^"%\\]+\.exe)"\s*\(\s*$', text, re.I | re.M)
+ named = re.search(r'^\s*SET "_prog=([^"%\\/]+)"\s*$', text, re.I | re.M)
+ if not (run and near and named) or not plain(run.group("args")):
+ return None
+ script = _local(folder, run.group("target"))
+ local = folder / near.group(1)
+ prog = str(local) if local.is_file() else shutil.which(named.group(1), path=search_path)
+ if not prog or prog.lower().endswith(BATCH) or not script.is_file():
+ return None
+ return [prog, *run.group("args").split(), str(script)]
+
+
+def unshim(cmd: list, search_path: str | None = None, platform: str | None = None) -> list[str]:
+ words = [str(c) for c in cmd]
+ if not through_cmd(words, platform):
+ return words
+ real = npm_target(words[0], search_path)
+ return real + words[1:] if real else words
diff --git a/backend/app/services/claude_code.py b/backend/app/services/claude_code.py
index 7d5a74d..e09d878 100644
--- a/backend/app/services/claude_code.py
+++ b/backend/app/services/claude_code.py
@@ -12,7 +12,7 @@
from typing import Any
from app.core import config, seal
-from app.services import agent_lookup, terminal
+from app.services import agent_lookup, agent_shim, terminal
INAPP_HEADER = "x-formpath-inapp"
TOKENS: dict[str, Path] = {}
@@ -169,17 +169,23 @@ def workdir() -> Path:
return folder
+def _direct(cmd: list[str]) -> list[str]:
+ return agent_shim.unshim(cmd, child_env(cmd[0]).get("PATH")) if os.name == "nt" else cmd
+
+
def _wrap(cmd: list[str]) -> list[str]:
- return agent_lookup.start_argv(cmd)
+ return agent_lookup.start_argv(_direct(cmd))
def argv(path: str, mcp_file: str, prompt: str | None, resume: str | None = None) -> list[str]:
- cmd = [path, "--mcp-config", mcp_file, "--allowedTools", "mcp__formpath_tab", "--append-system-prompt", NOTE]
+ cmd = _direct([path, "--mcp-config", mcp_file, "--allowedTools", "mcp__formpath_tab", "--append-system-prompt", NOTE])
if resume:
cmd += ["--resume", resume]
+ if prompt and agent_shim.through_cmd(cmd) and not agent_shim.plain(prompt):
+ raise ValueError(f"Claude Code at {path} starts through the Windows command interpreter, which would cut this message at a line break or change its quotes, %, ^, &, |, <, >, ! or brackets. Send it from the Chat tab, or install Claude Code with: {INSTALL_CMD}")
if prompt:
cmd += ["--", prompt]
- return _wrap(cmd)
+ return agent_lookup.start_argv(cmd)
def status() -> dict:
@@ -263,12 +269,22 @@ def chat_image(name: str) -> Path | None:
return path if path.is_file() else None
-def _chat_argv(path: str, mcp_file: str, text: str, session: str | None) -> list[str]:
- cmd = [path, "-p", "--output-format", "stream-json", "--verbose", "--include-partial-messages",
- "--mcp-config", mcp_file, "--allowedTools", "mcp__formpath_tab", "--append-system-prompt", CHAT_NOTE]
+def _chat_argv(path: str, mcp_file: str, text: str, session: str | None) -> tuple[list[str], str | None]:
+ cmd = _direct([path, "-p", "--output-format", "stream-json", "--verbose", "--include-partial-messages",
+ "--mcp-config", mcp_file, "--allowedTools", "mcp__formpath_tab", "--append-system-prompt", CHAT_NOTE])
if session:
cmd += ["--resume", session]
- return _wrap(cmd + ["--", text])
+ if agent_shim.through_cmd(cmd):
+ return agent_lookup.start_argv(cmd), text
+ return agent_lookup.start_argv(cmd + ["--", text]), None
+
+
+def _feed(proc: subprocess.Popen, text: str) -> None:
+ try:
+ proc.stdin.buffer.write(text.encode("utf-8"))
+ proc.stdin.close()
+ except (OSError, ValueError):
+ pass
def _usage_of(u: dict) -> tuple[int, int]:
@@ -285,9 +301,12 @@ def _run(text: str, path: str, folder: str) -> None:
token = None
try:
token, mcp_file = issue()
- proc = subprocess.Popen(_chat_argv(path, mcp_file, text, CHAT["session"]), cwd=folder, env=child_env(path), stdin=subprocess.DEVNULL,
+ cmd, feed = _chat_argv(path, mcp_file, text, CHAT["session"])
+ proc = subprocess.Popen(cmd, cwd=folder, env=child_env(path), stdin=subprocess.DEVNULL if feed is None else subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, bufsize=1, encoding="utf-8", errors="replace")
CHAT["proc"] = proc
+ if feed is not None:
+ threading.Thread(target=_feed, args=(proc, feed), daemon=True).start()
def drain() -> None:
for line in proc.stderr:
diff --git a/setup/claude_launch.py b/setup/claude_launch.py
index 31bc986..4b31988 100755
--- a/setup/claude_launch.py
+++ b/setup/claude_launch.py
@@ -12,9 +12,9 @@ def config() -> str:
return json.dumps({"mcpServers": {"formpath": server}})
-def lookup():
+def lookup(name: str = "agent_lookup"):
import importlib.util
- spec = importlib.util.spec_from_file_location("formpath_agent_lookup", os.path.join(ROOT, "backend", "app", "services", "agent_lookup.py"))
+ spec = importlib.util.spec_from_file_location("formpath_" + name, os.path.join(ROOT, "backend", "app", "services", name + ".py"))
module = importlib.util.module_from_spec(spec)
sys.modules[spec.name] = module
spec.loader.exec_module(module)
@@ -31,7 +31,8 @@ def main(argv: list[str]) -> int:
print(config())
return 0
env = finder.child_env(found.path, keep=frozenset(k for k in os.environ if k.startswith("CLAUDE")))
- return subprocess.call(finder.start_argv([found.path, "--mcp-config", config(), "--allowedTools", "mcp__formpath", *argv], env), env=env)
+ cmd = lookup("agent_shim").unshim([found.path, "--mcp-config", config(), "--allowedTools", "mcp__formpath", *argv], env.get("PATH"))
+ return subprocess.call(finder.start_argv(cmd, env), env=env)
if __name__ == "__main__":
From f681fd204da225374e91e28736f638f2b219d311 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 15:27:35 -0500
Subject: [PATCH 47/74] feat(type): Arabic, Hebrew, Indic, Thai and other
complex scripts are shaped and right-to-left text runs in bidirectional order
---
NOTICE.md | 2 +
frontend/package-lock.json | 26 ++++++
frontend/package.json | 2 +
frontend/src/engine/text.ts | 169 +++++++++++++++++++++++++++++-------
frontend/src/io/fonts.ts | 93 +++++++++++++++++++-
5 files changed, 262 insertions(+), 30 deletions(-)
diff --git a/NOTICE.md b/NOTICE.md
index e85e33e..308f561 100644
--- a/NOTICE.md
+++ b/NOTICE.md
@@ -22,6 +22,8 @@ The vector tool and panel icons in `frontend/src/ui/icons-vector.ts`, the app ic
| Inter, JetBrains Mono (via @fontsource) | SIL OFL 1.1 fonts, MIT packaging | bundled font files (latin, latin-ext, Greek, Cyrillic and Vietnamese subsets), also used for Create Outlines and as the fallback for characters a PDF's font lacks |
| paper.js 0.12.18 | MIT | the curve kernel behind Pathfinder, offset and simplify |
| opentype.js 2.0.0 | MIT | glyph outlines for type rendering, Create Outlines and PDF type |
+| harfbuzzjs 1.6.4 (HarfBuzz compiled to WebAssembly) | MIT (HarfBuzz itself: Old MIT) | shaping of Arabic, Hebrew, Indic, Thai and other scripts that join, reorder or stack; its `harfbuzz.wasm` is bundled and loaded only when a document has such text |
+| bidi-js 1.1.0 (Jason Johnston) | MIT | the Unicode Bidirectional Algorithm (Unicode 13 data) for right-to-left and mixed-direction type; loaded with harfbuzzjs. Its declared dependency require-from-string 2.0.2 (MIT) is installed but not bundled |
| @tauri-apps/api | Apache-2.0 or MIT | native menus on macOS |
| tauri, tauri-plugin-shell, tauri-plugin-dialog, tauri-plugin-updater, regex, serde_json | Apache-2.0 or MIT | desktop shell |
| fastapi, uvicorn, python-multipart, httpx | MIT, BSD-3-Clause, Apache-2.0, BSD-3-Clause | engine |
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index b107ce6..39c29d6 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -14,6 +14,8 @@
"@tauri-apps/api": "2.12.1",
"@xterm/addon-fit": "0.11.0",
"@xterm/xterm": "6.0.0",
+ "bidi-js": "1.1.0",
+ "harfbuzzjs": "1.6.4",
"opentype.js": "2.0.0",
"paper": "0.12.18"
},
@@ -1008,6 +1010,15 @@
"node": ">=12"
}
},
+ "node_modules/bidi-js": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.1.0.tgz",
+ "integrity": "sha512-fX1Onk0tdVPC7obPWB5EbJ1z7NVhLq4m2xZLq2YXBkxzMXIGRpNMU88n0EPgWseKl12J7zXs7qrDxPK4sRs2fg==",
+ "license": "MIT",
+ "dependencies": {
+ "require-from-string": "^2.0.2"
+ }
+ },
"node_modules/boolbase": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/boolbase/-/boolbase-2.0.0.tgz",
@@ -1221,6 +1232,12 @@
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
+ "node_modules/harfbuzzjs": {
+ "version": "1.6.4",
+ "resolved": "https://registry.npmjs.org/harfbuzzjs/-/harfbuzzjs-1.6.4.tgz",
+ "integrity": "sha512-T/PyfhVt1gGR2Tkf5KJUj1DQFkVBXHw552lS1iLEEDhV1Lukb3eq1pk2ov85kgbT2YUiZtJBTak9w+M7YgzUEQ==",
+ "license": "MIT"
+ },
"node_modules/html-escaper": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-3.0.3.tgz",
@@ -1749,6 +1766,15 @@
"node": "^10 || ^12 || >=14"
}
},
+ "node_modules/require-from-string": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/rolldown": {
"version": "1.2.12",
"resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.12.tgz",
diff --git a/frontend/package.json b/frontend/package.json
index 8be35de..3ed6b9b 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -23,6 +23,8 @@
"@tauri-apps/api": "2.12.1",
"@xterm/addon-fit": "0.11.0",
"@xterm/xterm": "6.0.0",
+ "bidi-js": "1.1.0",
+ "harfbuzzjs": "1.6.4",
"opentype.js": "2.0.0",
"paper": "0.12.18"
},
diff --git a/frontend/src/engine/text.ts b/frontend/src/engine/text.ts
index e8478bf..7312c6f 100644
--- a/frontend/src/engine/text.ts
+++ b/frontend/src/engine/text.ts
@@ -9,9 +9,10 @@ export const DEFAULT_CHAR: CharStyle = {
};
export const DEFAULT_PARA: ParaStyle = { align: 'left', indentLeft: 0, indentRight: 0, indentFirst: 0, spaceBefore: 0, spaceAfter: 0, hyphenate: false };
-export interface Glyph { ch: string; x: number; y: number; w: number; size: number; style: CharStyle; index: number; angle: number; gid?: number; m?: [number, number, number, number]; iu?: number; ia?: number; up?: boolean; box?: Rect; t?: Mat; syn?: boolean }
-export interface Line { y: number; x: number; width: number; ascent: number; descent: number; glyphs: Glyph[]; start: number; end: number }
-export interface TextLayout { lines: Line[]; glyphs: Glyph[]; bounds: Rect; overflow: number; text: string; vertical?: boolean }
+export interface GlyphPart { gid: number; x: number; y: number }
+export interface Glyph { ch: string; x: number; y: number; w: number; size: number; style: CharStyle; index: number; angle: number; gid?: number; m?: [number, number, number, number]; iu?: number; ia?: number; up?: boolean; box?: Rect; t?: Mat; syn?: boolean; parts?: GlyphPart[]; face?: CharStyle; lv?: number; mir?: string }
+export interface Line { y: number; x: number; width: number; ascent: number; descent: number; glyphs: Glyph[]; start: number; end: number; bidi?: boolean; rtl?: boolean }
+export interface TextLayout { lines: Line[]; glyphs: Glyph[]; bounds: Rect; overflow: number; text: string; vertical?: boolean; complex?: boolean }
let measureCtx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D | null = null;
function mctx(): CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D {
@@ -141,17 +142,48 @@ export interface Shaping {
has(st: CharStyle, feature: string): boolean;
vertical?(st: CharStyle, text: string, features: string[]): VerticalGlyph[] | null;
metrics?(st: CharStyle): FontMetrics | null;
+ complex?(st: CharStyle, text: string, start: number, end: number, rtl: boolean, script: string, features: string[]): ComplexRun | null;
+ bidi?(text: string): BidiLevels | null;
+ mirror?(ch: string): string | null;
}
+export interface ComplexRun { face: CharStyle; glyphs: Array<{ gid: number; cl: number; ax: number; dx: number; dy: number }> }
+export interface BidiLevels { levels: Uint8Array; paras: Array<{ start: number; end: number; level: number }> }
let shaping: Shaping | null = null;
export function setShaping(s: Shaping | null): void { shaping = s; fontsChanged(); }
export function glyphOutline(st: CharStyle, gid: number): PathData | null { return shaping?.outline(st, gid) ?? null; }
+const partPaths = new WeakMap();
+export function partsShape(g: Glyph): PathData | null {
+ if (!g.parts) return null;
+ const hit = partPaths.get(g.parts);
+ if (hit) return hit;
+ const out: PathData = [];
+ for (const p of g.parts) {
+ const d = glyphOutline(g.face ?? g.style, p.gid);
+ if (!d) return null;
+ out.push(...(p.x || p.y ? transformPath(d, [1, 0, 0, 1, p.x, p.y]) : d));
+ }
+ partPaths.set(g.parts, out);
+ return out;
+}
export function glyphShape(g: Glyph): PathData | null {
- const gid = g.gid ?? shaping?.shape({ ...g.style, alt: undefined }, g.ch, [])?.[0]?.gid;
+ if (g.parts) return partsShape(g);
+ const gid = g.gid ?? shaping?.shape({ ...g.style, alt: undefined }, g.mir ?? g.ch, [])?.[0]?.gid;
return gid === undefined ? null : glyphOutline(g.style, gid);
}
+
+const SCRIPTS: ReadonlyArray = [[0x591, 0x5ff, 'Hebr'], [0x600, 0x6ff, 'Arab'], [0x700, 0x74f, 'Syrc'], [0x750, 0x77f, 'Arab'], [0x780, 0x7bf, 'Thaa'], [0x7c0, 0x7ff, 'Nkoo'], [0x800, 0x83f, 'Samr'], [0x840, 0x85f, 'Mand'], [0x860, 0x86f, 'Syrc'], [0x870, 0x8ff, 'Arab'], [0x900, 0x97f, 'Deva'], [0x980, 0x9ff, 'Beng'], [0xa00, 0xa7f, 'Guru'], [0xa80, 0xaff, 'Gujr'], [0xb00, 0xb7f, 'Orya'], [0xb80, 0xbff, 'Taml'], [0xc00, 0xc7f, 'Telu'], [0xc80, 0xcff, 'Knda'], [0xd00, 0xd7f, 'Mlym'], [0xd80, 0xdff, 'Sinh'], [0xe00, 0xe7f, 'Thai'], [0xe80, 0xeff, 'Laoo'], [0xf00, 0xfff, 'Tibt'], [0x1000, 0x109f, 'Mymr'], [0x1780, 0x17ff, 'Khmr'], [0x1800, 0x18af, 'Mong'], [0x19e0, 0x19ff, 'Khmr'], [0x1a20, 0x1aaf, 'Lana'], [0x1b00, 0x1b7f, 'Bali'], [0x1b80, 0x1bbf, 'Sund'], [0xa8e0, 0xa8ff, 'Deva'], [0xa980, 0xa9df, 'Java'], [0xa9e0, 0xa9ff, 'Mymr'], [0xaa60, 0xaa7f, 'Mymr'], [0xfb1d, 0xfb4f, 'Hebr'], [0xfb50, 0xfdff, 'Arab'], [0xfe70, 0xfeff, 'Arab'], [0x10800, 0x10fff, 'Zyyy'], [0x11000, 0x11fff, 'Zyyy'], [0x1e800, 0x1efff, 'Zyyy']];
+const COMPLEX = /[֑-ัิ-ฺ็-๎ັິ-ຼ່-໎ༀ-႟ក-᧠-᧿ᨠ-ᪿᬀ-ᮿ꣠-ꣿꦀ-ꩠ-ꩿיִ-﷿ﹰ---\u{10800}-\u{11fff}\u{1e800}-\u{1efff}]/u;
+const CURSIVE = new Set(['Arab', 'Syrc', 'Nkoo', 'Mand', 'Mong']);
+const LETTER = /\p{L}/u;
+export function scriptOf(cp: number): string {
+ let lo = 0, hi = cp < 0x591 ? -1 : SCRIPTS.length - 1;
+ while (lo <= hi) { const m = (lo + hi) >> 1, r = SCRIPTS[m]; if (cp < r[0]) hi = m - 1; else if (cp > r[1]) lo = m + 1; else return (cp >= 0x64b && cp <= 0x65f) || cp === 0x670 ? '' : r[2]; }
+ return LETTER.test(String.fromCodePoint(cp)) ? 'Zzzz' : '';
+}
+export const needsShaping = (text: string): boolean => COMPLEX.test(text);
export function fontHasFeature(st: CharStyle, feature: string): boolean { return !!shaping?.has(st, feature); }
-interface Item { ch: string; st: CharStyle; index: number; gid?: number; adv?: number; up?: boolean; vadv?: number; vorg?: number; syn?: boolean; len?: number; j?: boolean }
+interface Item { ch: string; st: CharStyle; index: number; gid?: number; adv?: number; up?: boolean; vadv?: number; vorg?: number; syn?: boolean; len?: number; j?: boolean; parts?: GlyphPart[]; face?: CharStyle; lv?: number; pl?: number; mir?: string }
const EM_ORG = 0.88;
const UPRIGHT: ReadonlyArray = [[0xa7, 0xa7], [0xa9, 0xa9], [0xae, 0xae], [0xb1, 0xb1], [0xbc, 0xbe], [0xd7, 0xd7], [0xf7, 0xf7], [0x1100, 0x11ff], [0x2030, 0x2031], [0x203b, 0x203b], [0x2100, 0x218f], [0x2460, 0x24ff], [0x25a0, 0x27bf], [0x2e80, 0xa4cf], [0xa960, 0xa97f], [0xac00, 0xd7ff], [0xe000, 0xfaff], [0xfe10, 0xfe1f], [0xfe30, 0xfe6f], [0xff00, 0xff60], [0xffe0, 0xffe7], [0x1f000, 0x1faff], [0x20000, 0x3ffff]];
const TURNED: ReadonlyArray = [[0x2329, 0x232a], [0x3008, 0x3011], [0x3014, 0x301f], [0x3030, 0x3030], [0x30a0, 0x30a0], [0x30fc, 0x30fc], [0xfe59, 0xfe5e], [0xff08, 0xff09], [0xff0d, 0xff0d], [0xff1c, 0xff1e], [0xff3b, 0xff3b], [0xff3d, 0xff3d], [0xff3f, 0xff3f], [0xff5b, 0xff60], [0xffe3, 0xffe3]];
@@ -211,32 +243,84 @@ function smallOf(st: CharStyle): CharStyle {
return s;
}
function items(spans: Span[], vertical = false): Item[] {
- return vertical ? orient(itemsOf(spans)) : itemsOf(spans);
+ return vertical ? orient(itemsOf(spans)) : itemsOf(spans, true);
+}
+interface BidiText extends BidiLevels { text: string }
+function bidiOf(spans: Span[]): BidiText | null {
+ if (!shaping?.bidi) return null;
+ const text = spans.map((sp) => (sp.style.caps === 'all' ? sp.text.toUpperCase() : sp.text)).join('');
+ if (!COMPLEX.test(text)) return null;
+ const b = shaping.bidi(text);
+ return b && b.levels.length === text.length ? { text, ...b } : null;
}
-function itemsOf(spans: Span[]): Item[] {
+interface Seg { a: number; b: number; script: string; lv: number; shape: boolean }
+function segmentsOf(bx: BidiText, at: number, len: number): Seg[] {
+ const out: Seg[] = [];
+ let cur: Seg | null = null;
+ for (let o = at; o < at + len;) {
+ const cp = bx.text.codePointAt(o) ?? 0, n = cp > 0xffff ? 2 : 1, sc = scriptOf(cp), lv = bx.levels[o];
+ if (!cur || lv !== cur.lv || (sc && cur.script && sc !== cur.script)) { cur = { a: o, b: o, script: sc, lv, shape: lv % 2 === 1 }; out.push(cur); }
+ if (sc && !cur.script) cur.script = sc;
+ if (sc && sc !== 'Zzzz' && COMPLEX.test(bx.text.slice(o, o + n))) cur.shape = true;
+ o += n; cur.b = o;
+ }
+ return out;
+}
+function itemsOf(spans: Span[], complex = false): Item[] {
const out: Item[] = [];
+ const bx = complex ? bidiOf(spans) : null;
let i = 0;
for (const sp of spans) {
const st = sp.style, text = st.caps === 'all' ? sp.text.toUpperCase() : sp.text;
const smcp = st.caps === 'small' && fontHasFeature(st, 'smcp');
const feats = smcp ? [...st.features, 'smcp'] : st.features;
- for (const piece of text.split(/(\r\n|\r|\n)/)) {
- if (!piece) continue;
- if (piece === '\n' || piece === '\r' || piece === '\r\n') { out.push(piece.length > 1 ? { ch: '\n', st, index: i, len: piece.length } : { ch: '\n', st, index: i }); i += piece.length; continue; }
+ const plain = (piece: string): void => {
const shaped = (feats.length || st.alt !== undefined || hasAxes(st)) && shaping ? shaping.shape(st, piece, feats) : null;
if (shaped) {
let k = 0;
for (const g of shaped) { const ch = piece.slice(k, k + g.chars); out.push(g.gid ? { ch, st, index: i, gid: g.gid, adv: g.adv } : { ch, st, index: i }); i += ch.length; k += g.chars; }
- continue;
+ return;
}
for (const ch of piece) {
if (st.caps === 'small' && ch !== ch.toUpperCase()) out.push({ ch: ch.toUpperCase(), st: smallOf(st), index: i });
else out.push({ ch, st, index: i });
i += ch.length;
}
+ };
+ for (const piece of text.split(/(\r\n|\r|\n)/)) {
+ if (!piece) continue;
+ if (piece === '\n' || piece === '\r' || piece === '\r\n') { out.push(piece.length > 1 ? { ch: '\n', st, index: i, len: piece.length } : { ch: '\n', st, index: i }); i += piece.length; continue; }
+ if (!bx) { plain(piece); continue; }
+ for (const sg of segmentsOf(bx, i, piece.length)) {
+ const run = sg.shape && shaping?.complex ? shaping.complex(st, bx.text, sg.a, sg.b, sg.lv % 2 === 1, sg.script, feats) : null;
+ if (!run) { plain(bx.text.slice(sg.a, sg.b)); continue; }
+ const by = new Map(), adv = new Map();
+ for (const g of run.glyphs) {
+ let list = by.get(g.cl);
+ if (!list) { list = []; by.set(g.cl, list); adv.set(g.cl, 0); }
+ const pen = adv.get(g.cl) ?? 0;
+ list.push({ gid: g.gid, x: pen + g.dx, y: -g.dy });
+ adv.set(g.cl, pen + g.ax);
+ }
+ const starts = [...by.keys()].filter((c) => c >= sg.a && c < sg.b).sort((a, b) => a - b);
+ if (starts[0] !== sg.a) { plain(bx.text.slice(sg.a, sg.b)); continue; }
+ const cursive = CURSIVE.has(sg.script);
+ starts.forEach((c, k) => {
+ const end = k + 1 < starts.length ? starts[k + 1] : sg.b, ch = bx.text.slice(c, end), parts = by.get(c) ?? [];
+ if (parts.some((p) => !p.gid)) { plain(ch); return; }
+ const prev = out[out.length - 1], j = cursive && k > 0 && prev?.parts !== undefined && !/\s/.test(ch) && !/\s/.test(prev.ch);
+ out.push({ ch, st, index: i, adv: adv.get(c) ?? 0, parts, face: run.face, ...(j ? { j } : {}) });
+ i += ch.length;
+ });
+ }
}
}
for (const it of out) if (joinsCh(it.ch)) it.j = true;
+ if (bx) for (const it of out) {
+ it.lv = bx.levels[it.index] ?? 0; it.pl = bx.paras.find((p) => it.index >= p.start && it.index <= p.end)?.level ?? 0;
+ const m = it.lv % 2 && !it.parts && it.gid === undefined ? shaping?.mirror?.(it.ch) : null;
+ if (m) it.mir = m;
+ }
return out;
}
@@ -244,12 +328,12 @@ function effSize(st: CharStyle): number { return st.position === 'normal' ? st.s
function effShift(st: CharStyle): number { return st.baseline + (st.position === 'super' ? -st.size * 0.333 : st.position === 'sub' ? st.size * 0.15 : 0); }
function advance(it: Item, next: Item | undefined): number {
- const size = effSize(it.st), opt = next && it.st.kerning === 'optical' && !next.syn ? opticalKern(it.st, it.ch, next.st, next.ch) : null, tr = glued(it, next) ? 0 : (it.st.tracking / 1000) * it.st.size;
+ const size = effSize(it.st), opt = next && it.st.kerning === 'optical' && !next.syn && !it.parts && !next.parts ? opticalKern(it.st, it.ch, next.st, next.ch) : null, tr = glued(it, next) ? 0 : (it.st.tracking / 1000) * it.st.size;
if (it.adv !== undefined) return (it.adv + (opt ?? 0)) * size * (it.st.hscale / 100) + tr;
const font = cssFont(it.st, size);
let w = charWidth(font, it.ch) * (it.st.hscale / 100);
if (opt !== null) w += opt * size * (it.st.hscale / 100);
- else if (next && next.st === it.st && it.st.kerning !== 'none') w += pairKern(font, it.ch, next.ch) * (it.st.hscale / 100);
+ else if (next && next.st === it.st && it.st.kerning !== 'none' && !next.parts) w += pairKern(font, it.ch, next.ch) * (it.st.hscale / 100);
return w + tr;
}
@@ -292,7 +376,7 @@ function areaCells(a: AreaOptions | undefined, f: Rect, vertical: boolean): Cell
}
function place(it: Item, u: number, a: number, base: number, vertical: boolean): Glyph {
- const size = effSize(it.st), shift = effShift(it.st), common = { ch: it.ch, size, style: it.st, index: it.index, gid: it.gid, iu: u, ia: a, ...(it.syn ? { syn: true } : {}) };
+ const size = effSize(it.st), shift = effShift(it.st), common = { ch: it.ch, size, style: it.st, index: it.index, gid: it.gid, iu: u, ia: a, ...(it.syn ? { syn: true } : {}), ...(it.parts ? { parts: it.parts, face: it.face } : {}), ...(it.lv ? { lv: it.lv } : {}), ...(it.mir ? { mir: it.mir } : {}) };
if (!vertical) return { ...common, x: u, y: base + shift, w: a, angle: 0 };
const c = -(base + shift);
if (it.up) {
@@ -303,6 +387,24 @@ function place(it: Item, u: number, a: number, base: number, vertical: boolean):
return { ...common, x: x0, y: u, w: a, angle: Math.PI / 2, m: [0, 1, -1, 0], box: { x: 0, y: off - size / 2, w: a, h: size } };
}
+function visualOrder(row: Item[], pl: number): number[] {
+ const lv = row.map((x) => (x.ch === '\t' ? pl : x.lv ?? 0)), ord = row.map((_, k) => k);
+ for (let k = row.length - 1; k >= 0 && /^\s$/.test(row[k].ch); k--) lv[k] = pl;
+ let hi = 0, lo = 255;
+ for (const l of lv) { hi = Math.max(hi, l); if (l % 2) lo = Math.min(lo, l); }
+ for (let L = hi; L >= lo; L--) {
+ for (let k = 0; k < ord.length;) {
+ if (lv[ord[k]] < L) { k++; continue; }
+ let e = k;
+ while (e < ord.length && lv[ord[e]] >= L) e++;
+ const rev = ord.slice(k, e).reverse();
+ for (let q = 0; q < rev.length; q++) ord[k + q] = rev[q];
+ k = e;
+ }
+ }
+ return ord;
+}
+
export function charTransform(st: CharStyle, box: Rect, gx = 1): Mat | undefined {
const tc = st.touch, rot = (st.rotate ?? 0) + (tc?.r ?? 0), sx = ((tc?.sx ?? 100) / 100) * gx, sy = (tc?.sy ?? 100) / 100, dx = tc?.x ?? 0, dy = tc?.y ?? 0;
if (!rot && sx === 1 && sy === 1 && !dx && !dy) return undefined;
@@ -321,7 +423,7 @@ function plainSt(st: CharStyle): CharStyle {
if (!s) { s = { ...st, touch: undefined, rotate: undefined, position: 'normal' }; plainStyles.set(st, s); }
return s;
}
-const isLetter = (it: Item | undefined): boolean => !!it && !it.syn && it.ch.length === 1 && /\p{L}/u.test(it.ch);
+const isLetter = (it: Item | undefined): boolean => !!it && !it.syn && !it.parts && !it.lv && it.ch.length === 1 && /\p{L}/u.test(it.ch);
const DEFAULT_TAB = 36;
const ROMAN: ReadonlyArray = [[1000, 'm'], [900, 'cm'], [500, 'd'], [400, 'cd'], [100, 'c'], [90, 'xc'], [50, 'l'], [40, 'xl'], [10, 'x'], [9, 'ix'], [5, 'v'], [4, 'iv'], [1, 'i']];
export function listMarker(l: ListStyle, n: number): string {
@@ -541,8 +643,10 @@ function layoutLines(n: TextNode): TextLayout {
let mx = x0 - (indent - mIndent);
marker.forEach((it, k) => { const w = step(it, marker[k + 1]); glyphs.push(place(it, mx, w, lineY, vertical)); mx += w; });
}
+ const pl = p[0]?.pl ?? 0, bidi = pl > 0 || visible.some((x) => !!x.lv || !!x.parts), ord = bidi ? visualOrder(visible, pl) : visible.map((_, k) => k);
let x = x0;
- visible.forEach((it, k) => {
+ ord.forEach((k) => {
+ const it = visible[k];
glyphs.push(withT(place(it, x, widths[k], lineY, vertical), it.ch === ' ' || it.ch === '\t' ? 1 : gx));
const leader = stops[k]?.leader;
if (leader && widths[k] > 0) {
@@ -557,7 +661,7 @@ function layoutLines(n: TextNode): TextLayout {
});
if (hy) { glyphs.push(withT(place(hy, x, hyW, lineY, vertical), gx)); x += hyW; }
const start = li.length ? li[0].index : pIndex, stop = li.length ? li[li.length - 1].index + li[li.length - 1].ch.length : pIndex;
- lines.push({ y: lineY, x: x0, width: x - x0, ascent: asc, descent: desc, glyphs, start, end: stop });
+ lines.push({ y: lineY, x: x0, width: x - x0, ascent: asc, descent: desc, glyphs, start, end: stop, ...(bidi ? { bidi, rtl: pl % 2 === 1 } : {}) });
lineNo++;
}
y = lineY;
@@ -570,7 +674,7 @@ function layoutLines(n: TextNode): TextLayout {
const m = lm(st, st.size);
lines.push({ y: frame ? cells[0].top + firstBase(n.area, st, st.size, leadingOf(st), vertical) : 0, x: frame ? startCol(0) : 0, width: 0, ascent: m.ascent, descent: m.descent, glyphs: [], start: 0, end: 0 });
}
- const out: TextLayout = { lines, glyphs: lines.flatMap((l) => l.glyphs), bounds: emptyRect(), overflow: overflowAt, text: all.map((x) => x.ch).join(''), vertical };
+ const out: TextLayout = { lines, glyphs: lines.flatMap((l) => l.glyphs), bounds: emptyRect(), overflow: overflowAt, text: all.map((x) => x.ch).join(''), vertical, ...(lines.some((l) => l.bidi) ? { complex: true } : {}) };
let b = emptyRect();
for (const l of lines) b = unionRect(b, lineRect(out, l));
for (const g of out.glyphs) if (g.t || g.syn) for (const c of glyphCorners(g)) b = unionRect(b, { x: c.x, y: c.y, w: 0, h: 0 });
@@ -639,8 +743,9 @@ function layoutOnPath(n: TextNode): TextLayout {
const eff = n.pathEffect ?? 'rainbow', spacing = n.pathSpacing ?? 0, align = n.pathAlign ?? 'baseline';
const pb = pathBounds([sp]), centre = { x: pb.x + pb.w / 2, y: pb.y + pb.h / 2 };
let overflow = -1, b = emptyRect();
- for (let k = 0; k < all.length; k++) {
- const it = all[k], w = widths[k], mid = s + w / 2;
+ const ord = all.some((x) => !!x.lv || !!x.parts) ? visualOrder(all, all[0]?.pl ?? 0) : null;
+ for (let q = 0; q < all.length; q++) {
+ const k = ord ? ord[q] : q, it = all[k], w = widths[k], mid = s + w / 2;
if (mid > s1 + 1e-6 || (!sp.closed && mid > total + 1e-6) || (sp.closed && mid - s0 > total + 1e-6)) { overflow = it.index; break; }
const { p, tangent: t } = spanPoint(ps, mid), nrm = { x: -t.y, y: t.x };
let U: Pt, V: Pt;
@@ -661,7 +766,7 @@ function layoutOnPath(n: TextNode): TextLayout {
} else {
const off = vertical || align === 'center' ? (m.ascent - m.descent) / 2 : align === 'ascender' ? m.ascent : align === 'descender' ? -m.descent : 0;
const O = { x: P.x + V.x * (off + shift), y: P.y + V.y * (off + shift) };
- g = { ch: it.ch, x: O.x, y: O.y, w, size, style: it.st, index: it.index, gid: it.gid, angle: Math.atan2(U.y, U.x), m: [U.x, U.y, V.x, V.y] };
+ g = { ch: it.ch, x: O.x, y: O.y, w, size, style: it.st, index: it.index, gid: it.gid, angle: Math.atan2(U.y, U.x), m: [U.x, U.y, V.x, V.y], ...(it.parts ? { parts: it.parts, face: it.face } : {}), ...(it.lv ? { lv: it.lv } : {}), ...(it.mir ? { mir: it.mir } : {}) };
}
glyphs.push(withT(g));
for (const c of glyphCorners(g)) b = unionRect(b, { x: c.x, y: c.y, w: 0, h: 0 });
@@ -672,7 +777,7 @@ function layoutOnPath(n: TextNode): TextLayout {
}
s += w - tighten;
}
- return { lines: [], glyphs, bounds: glyphs.length ? b : (() => { const q = spanPoint(ps, s0).p; return { x: q.x, y: q.y, w: 0, h: 0 }; })(), overflow, text, vertical };
+ return { lines: [], glyphs, bounds: glyphs.length ? b : (() => { const q = spanPoint(ps, s0).p; return { x: q.x, y: q.y, w: 0, h: 0 }; })(), overflow, text, vertical, ...(ord ? { complex: true } : {}) };
}
export function textBounds(n: TextNode): Rect {
@@ -682,12 +787,17 @@ export function textBounds(n: TextNode): Rect {
return transformRect(l.bounds, n.xf);
}
+function glyphEm(sh: Shaping, g: Glyph): PathData | null {
+ if (g.parts) return partsShape(g);
+ const gid = g.gid ?? sh.shape(g.style, g.mir ?? g.ch, [])?.[0]?.gid;
+ return gid === undefined ? null : sh.outline(g.style, gid);
+}
export function textOutline(n: TextNode): PathData | null {
if (!shaping) return null;
const out: PathData = [];
for (const g of layoutText(n).glyphs) {
if (!g.ch.trim()) continue;
- const st = g.style, gid = g.gid ?? shaping.shape(st, g.ch, [])?.[0]?.gid, d = gid === undefined ? null : shaping.outline(st, gid);
+ const st = g.style, d = glyphEm(shaping, g);
if (!d) return null;
const sx = (g.size * st.hscale) / 100, sy = (g.size * st.vscale) / 100;
const m: Mat = mul(glyphMat(g), [sx, 0, 0, sy, 0, 0]);
@@ -701,7 +811,7 @@ export function textOutlineRuns(n: TextNode): Array<{ d: PathData; style: CharSt
const runs: Array<{ d: PathData; style: CharStyle }> = [];
for (const g of layoutText(n).glyphs) {
if (!g.ch.trim()) continue;
- const st = g.style, gid = g.gid ?? shaping.shape(st, g.ch, [])?.[0]?.gid, d = gid === undefined ? null : shaping.outline(st, gid);
+ const st = g.style, d = glyphEm(shaping, g);
if (!d) return null;
const m: Mat = mul(glyphMat(g), [(g.size * st.hscale) / 100, 0, 0, (g.size * st.vscale) / 100, 0, 0]);
const out = transformPath(d, n.mode === 'path' ? m : mul(n.xf, m)).map((sp) => ({ ...sp, closed: true }));
@@ -717,7 +827,7 @@ export function textOutlineGlyphs(n: TextNode): Array<{ d: PathData; style: Char
const list: Array<{ d: PathData; style: CharStyle }> = [];
for (const g of layoutText(n).glyphs) {
if (!g.ch.trim()) continue;
- const st = g.style, gid = g.gid ?? shaping.shape(st, g.ch, [])?.[0]?.gid, d = gid === undefined ? null : shaping.outline(st, gid);
+ const st = g.style, d = glyphEm(shaping, g);
if (!d) return null;
const m: Mat = mul(glyphMat(g), [(g.size * st.hscale) / 100, 0, 0, (g.size * st.vscale) / 100, 0, 0]);
list.push({ d: transformPath(d, n.mode === 'path' ? m : mul(n.xf, m)).map((sp) => ({ ...sp, closed: true })), style: st });
@@ -751,7 +861,7 @@ export function drawText(ctx: CanvasRenderingContext2D, n: TextNode, paintStyle:
if (st.hscale !== 100 || st.vscale !== 100) ctx.scale(st.hscale / 100, st.vscale / 100);
ctx.font = cssFont(st, g.size);
const fillStyle = paintStyle(st.fill, b);
- const shape = g.gid !== undefined ? glyphOutline(st, g.gid) : null;
+ const shape = g.parts ? partsShape(g) : g.gid !== undefined ? glyphOutline(st, g.gid) : null;
if (shape) {
let p2 = glyphPaths.get(shape);
if (!p2) { p2 = toPath2D(shape); glyphPaths.set(shape, p2); }
@@ -763,11 +873,12 @@ export function drawText(ctx: CanvasRenderingContext2D, n: TextNode, paintStyle:
if (ss) { ctx.strokeStyle = ss; ctx.lineWidth = st.strokeWidth / Math.max(1e-6, g.size); ctx.lineJoin = 'round'; ctx.stroke(p2); }
ctx.restore();
} else {
- if (fillStyle) { ctx.fillStyle = fillStyle; ctx.fillText(g.ch, 0, 0); }
- for (const f of extraFills) { ctx.fillStyle = f; ctx.fillText(g.ch, 0, 0); }
+ const ch = g.mir ?? g.ch;
+ if (fillStyle) { ctx.fillStyle = fillStyle; ctx.fillText(ch, 0, 0); }
+ for (const f of extraFills) { ctx.fillStyle = f; ctx.fillText(ch, 0, 0); }
if (st.stroke.type !== 'none' && st.strokeWidth > 0) {
const ss = paintStyle(st.stroke, b);
- if (ss) { ctx.strokeStyle = ss; ctx.lineWidth = st.strokeWidth; ctx.lineJoin = 'round'; ctx.strokeText(g.ch, 0, 0); }
+ if (ss) { ctx.strokeStyle = ss; ctx.lineWidth = st.strokeWidth; ctx.lineJoin = 'round'; ctx.strokeText(ch, 0, 0); }
}
}
if (!g.up && (st.underline || st.strike)) {
diff --git a/frontend/src/io/fonts.ts b/frontend/src/io/fonts.ts
index b1616ef..5b97901 100644
--- a/frontend/src/io/fonts.ts
+++ b/frontend/src/io/fonts.ts
@@ -1,6 +1,6 @@
import { parse, type Font, type PathCommand } from 'opentype.js';
import { anchor, mul, transformPath } from '../engine/geometry';
-import { axesKey, fontsChanged, glyphMat, hasAxes, layoutText, setShaping, weightOf } from '../engine/text';
+import { axesKey, fontsChanged, glyphMat, hasAxes, layoutText, scriptOf, setShaping, weightOf, type BidiLevels, type ComplexRun } from '../engine/text';
import type { Anchor, CharStyle, Mat, PathData, SubPath, TextNode } from '../engine';
import { api, type FontInfo, type SimilarFont } from './api';
@@ -585,8 +585,99 @@ function featureGlyphs(font: Font, st: CharStyle, text: string, features: string
return gs;
}
+type Hb = typeof import('harfbuzzjs');
+type HbFont = InstanceType;
+type BidiApi = ReturnType;
+let hb: Hb | null = null, hbBuf: InstanceType | null = null, bidiApi: BidiApi | null = null, shaperLoad: Promise | null = null;
+function loadShaper(): void {
+ if (shaperLoad) return;
+ shaperLoad = Promise.all([import('harfbuzzjs'), import('bidi-js')]).then(([h, b]) => { hb = h; hbBuf = new h.Buffer(); bidiApi = b.default(); fontsChanged(); onFace?.(); }).catch(() => undefined);
+}
+const isSfnt = (font: Font): boolean => { const b = rawData.get(font); if (!b || b.byteLength < 12) return false; const s = new DataView(b).getUint32(0); return s === 0x00010000 || s === 0x4f54544f || s === 0x74727565; };
+const hbFonts = new WeakMap();
+function hbFontOf(font: Font): { font: HbFont; upem: number } | null {
+ if (!hb) return null;
+ if (hbFonts.has(font)) return hbFonts.get(font) ?? null;
+ let out: { font: HbFont; upem: number } | null = null;
+ const buf = rawData.get(font);
+ if (buf && isSfnt(font)) { try { const face = new hb.Face(new hb.Blob(buf), 0); out = { font: new hb.Font(face), upem: face.upem || font.unitsPerEm || 1000 }; } catch { out = null; } }
+ hbFonts.set(font, out);
+ return out;
+}
+const SCRIPT_FONTS: Record = {
+ Arab: ['Noto Naskh Arabic', 'Noto Sans Arabic', 'Geeza Pro', 'Segoe UI', 'Arial', 'Tahoma', 'Times New Roman', 'DejaVu Sans'],
+ Hebr: ['Noto Sans Hebrew', 'Arial Hebrew', 'Segoe UI', 'Arial', 'Times New Roman', 'DejaVu Sans'],
+ Syrc: ['Noto Sans Syriac', 'Estrangelo Edessa', 'Segoe UI Historic'],
+ Thaa: ['Noto Sans Thaana', 'MV Boli'],
+ Nkoo: ['Noto Sans NKo', 'Ebrima'],
+ Deva: ['Noto Sans Devanagari', 'Kohinoor Devanagari', 'Devanagari Sangam MN', 'Nirmala UI', 'Mangal', 'Lohit Devanagari'],
+ Beng: ['Noto Sans Bengali', 'Kohinoor Bangla', 'Bangla Sangam MN', 'Nirmala UI', 'Vrinda', 'Lohit Bengali'],
+ Guru: ['Noto Sans Gurmukhi', 'Gurmukhi Sangam MN', 'Nirmala UI', 'Raavi', 'Lohit Gurmukhi'],
+ Gujr: ['Noto Sans Gujarati', 'Gujarati Sangam MN', 'Nirmala UI', 'Shruti', 'Lohit Gujarati'],
+ Orya: ['Noto Sans Oriya', 'Oriya Sangam MN', 'Nirmala UI', 'Kalinga', 'Lohit Odia'],
+ Taml: ['Noto Sans Tamil', 'Tamil Sangam MN', 'Nirmala UI', 'Latha', 'Lohit Tamil'],
+ Telu: ['Noto Sans Telugu', 'Telugu Sangam MN', 'Nirmala UI', 'Gautami', 'Lohit Telugu'],
+ Knda: ['Noto Sans Kannada', 'Kannada Sangam MN', 'Nirmala UI', 'Tunga', 'Lohit Kannada'],
+ Mlym: ['Noto Sans Malayalam', 'Malayalam Sangam MN', 'Nirmala UI', 'Kartika', 'Lohit Malayalam'],
+ Sinh: ['Noto Sans Sinhala', 'Sinhala Sangam MN', 'Nirmala UI', 'Iskoola Pota'],
+ Thai: ['Noto Sans Thai', 'Thonburi', 'Leelawadee UI', 'Tahoma'],
+ Laoo: ['Noto Sans Lao', 'Lao Sangam MN', 'Leelawadee UI', 'Lao UI'],
+ Khmr: ['Noto Sans Khmer', 'Khmer Sangam MN', 'Leelawadee UI', 'Khmer UI'],
+ Mymr: ['Noto Sans Myanmar', 'Myanmar Sangam MN', 'Myanmar Text'],
+ Tibt: ['Noto Serif Tibetan', 'Kokonor', 'Microsoft Himalaya'],
+ Mong: ['Noto Sans Mongolian', 'Mongolian Baiti'],
+};
+interface ScriptFace { font: Font; style: CharStyle }
+const scriptFaces = new Map(), facesPending = new Set();
+async function resolveScriptFace(st: CharStyle, script: string, ch: string): Promise {
+ const ok = (f: Font | null): f is Font => !!f && isSfnt(f) && covers(f, ch) > 0;
+ const own = await fontFor(st.font, st.style).catch(() => null);
+ if (ok(own)) return { font: own, style: st };
+ const have = installedNames(await systemFonts().catch((): FontInfo[] => []));
+ for (const fam of (SCRIPT_FONTS[script] ?? []).filter((f) => f !== st.font && (!have.size || have.has(f.toLowerCase())))) {
+ const f = await fontFor(fam, st.style).catch(() => null);
+ if (ok(f)) return { font: f, style: { ...st, font: fam, axes: undefined } };
+ }
+ const hit = await api.coverFont(ch.codePointAt(0) ?? 0, []), f = hit ? await fontFor(hit.family, st.style).catch(() => null) : null;
+ return hit && ok(f) ? { font: f, style: { ...st, font: hit.family, axes: undefined } } : null;
+}
+function scriptFace(st: CharStyle, script: string, ch: string): ScriptFace | null {
+ const key = `${st.font}|${st.style}|${axesKey(st)}|${script}`, hit = scriptFaces.get(key);
+ if (hit !== undefined) return hit;
+ if (!facesPending.has(key)) {
+ facesPending.add(key);
+ void resolveScriptFace(st, script, ch).catch(() => null).then((p) => { scriptFaces.set(key, p); facesPending.delete(key); if (!p) return; ready.set(`${p.style.font}|${p.style.style}`, p.font); fontsChanged(); onFace?.(); });
+ }
+ return null;
+}
+function shapeComplex(st: CharStyle, text: string, start: number, end: number, rtl: boolean, script: string, features: string[]): ComplexRun | null {
+ const h = hb, buf = hbBuf;
+ if (!h || !buf) { loadShaper(); return null; }
+ let ch = '';
+ for (const c of text.slice(start, end)) if (scriptOf(c.codePointAt(0) ?? 0) === script) { ch = c; break; }
+ const pick = ch ? scriptFace(st, script, ch) : null, hf = pick ? hbFontOf(pick.font) : null;
+ if (!pick || !hf) return null;
+ hf.font.setVariations(hasAxes(pick.style) ? Object.entries(pick.style.axes ?? {}).map(([t, v]) => new h.Variation(t, v)) : []);
+ buf.reset();
+ buf.addText(text, start, end - start);
+ buf.setDirection(rtl ? h.Direction.RTL : h.Direction.LTR);
+ if (script !== 'Zzzz') buf.setScript(script);
+ buf.guessSegmentProperties();
+ h.shape(hf.font, buf, [...features.filter((f) => /^[a-z0-9]{4}$/.test(f)).map((f) => new h.Feature(f, 1)), ...(st.kerning === 'none' ? [new h.Feature('kern', 0)] : [])]);
+ const k = 1 / hf.upem;
+ return { face: pick.style, glyphs: buf.getGlyphInfosAndPositions().map((g) => ({ gid: g.codepoint, cl: g.cluster, ax: (g.xAdvance ?? 0) * k, dx: (g.xOffset ?? 0) * k, dy: (g.yOffset ?? 0) * k })) };
+}
+function bidiLevels(text: string): BidiLevels | null {
+ if (!bidiApi) { loadShaper(); return null; }
+ const r = bidiApi.getEmbeddingLevels(text);
+ return { levels: r.levels, paras: r.paragraphs };
+}
+
export function installShaping(): void {
setShaping({
+ complex: shapeComplex,
+ bidi: bidiLevels,
+ mirror: (ch) => bidiApi?.getMirroredCharacter(ch) ?? null,
vertical: (st, text, features) => {
const font = fontNow(st);
if (!font) return null;
From c025160ec4d1d9965303d92b2748dfc416929683 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 15:31:19 -0500
Subject: [PATCH 48/74] feat(type): the caret, clicks, selection and arrow keys
follow right-to-left and mixed-direction lines, and a caret in a ligature or
cluster sits at its edge
---
frontend/src/engine/text.ts | 55 +++++++++++++++++++++++++++++++---
frontend/src/ui/text-editor.ts | 4 ++-
2 files changed, 54 insertions(+), 5 deletions(-)
diff --git a/frontend/src/engine/text.ts b/frontend/src/engine/text.ts
index 7312c6f..67e8846 100644
--- a/frontend/src/engine/text.ts
+++ b/frontend/src/engine/text.ts
@@ -895,12 +895,55 @@ export function drawText(ctx: CanvasRenderingContext2D, n: TextNode, paintStyle:
const caretFrom = (a: Pt, d: Pt): { x: number; y: number; h: number; angle: number } => { const h = Math.hypot(d.x, d.y) || 1; return { x: a.x, y: a.y, h, angle: Math.atan2(-d.x / h, d.y / h) }; };
const gu = (g: Glyph): number => g.iu ?? g.x;
const ga = (g: Glyph): number => g.ia ?? g.w;
+const rtlOf = (g: Glyph): boolean => ((g.lv ?? 0) & 1) === 1;
+function holder(gs: Glyph[], i: number): { g: Glyph; end: boolean } | null {
+ let prev: Glyph | null = null;
+ for (const g of gs) {
+ if (g.syn) continue;
+ if (i >= g.index && i < g.index + g.ch.length) return { g, end: i > g.index };
+ if (g.index < i && (!prev || g.index > prev.index)) prev = g;
+ }
+ return prev ? { g: prev, end: true } : null;
+}
+function bidiStop(l: Line, i: number): number {
+ const h = holder(l.glyphs, i);
+ if (!h) return l.rtl ? l.x + l.width : l.x;
+ return h.end === rtlOf(h.g) ? gu(h.g) : gu(h.g) + ga(h.g);
+}
+function bidiIndexAt(l: Line, x: number): number {
+ const gs = l.glyphs.filter((g) => !g.syn);
+ if (!gs.length) return l.start;
+ let g = gs[0], dist = Infinity, last = 0;
+ for (const q of gs) { const d = x < gu(q) ? gu(q) - x : x > gu(q) + ga(q) ? x - gu(q) - ga(q) : 0; if (d < dist) { dist = d; g = q; } last = Math.max(last, q.index + q.ch.length); }
+ const after = (x > gu(g) + ga(g) / 2) !== rtlOf(g), at = after ? g.index + g.ch.length : g.index;
+ return after && at >= last ? l.end : at;
+}
+export function stepVisual(n: TextNode, caret: number, dir: 1 | -1): number | null {
+ if (n.mode === 'path' || n.vertical) return null;
+ const lay = layoutText(n), li = lay.lines.findIndex((x) => caret >= x.start && caret <= x.end), l = lay.lines[li];
+ if (!l?.bidi) return null;
+ const stops = new Set([l.start, l.end]);
+ for (const g of l.glyphs) if (!g.syn) { stops.add(g.index); stops.add(g.index + g.ch.length); }
+ const cur = bidiStop(l, caret);
+ let best: number | null = null, bd = 0;
+ for (const i of stops) {
+ if (i === caret) continue;
+ const d = (bidiStop(l, i) - cur) * dir;
+ if (d <= 1e-6) continue;
+ if (best === null || d < bd - 1e-6 || (Math.abs(d - bd) <= 1e-6 && Math.abs(i - caret) < Math.abs(best - caret))) { best = i; bd = d; }
+ }
+ if (best !== null) return best;
+ const t = plainText(n);
+ return (dir > 0) !== !!l.rtl ? Math.min(t.length, caret + (/[\ud800-\udbff]/.test(t[caret] ?? '') ? 2 : 1)) : Math.max(0, caret - (/[\udc00-\udfff]/.test(t[caret - 1] ?? '') ? 2 : 1));
+}
export function caretAt(n: TextNode, index: number): { x: number; y: number; h: number; angle: number } {
const lay = layoutText(n), xf = n.xf;
if (n.mode === 'path') {
- let g = lay.glyphs.find((x) => x.index >= index), end = false;
+ const h = lay.complex ? holder(lay.glyphs, index) : null;
+ let g = h ? h.g : lay.glyphs.find((x) => x.index >= index), end = !!h?.end;
if (!g) { g = lay.glyphs[lay.glyphs.length - 1]; end = true; }
+ if (g && rtlOf(g)) end = !end;
if (!g) {
const ps = pathSpan(n), size = n.spans[0]?.style.size ?? 12;
if (!ps) return { x: 0, y: 0, h: size, angle: 0 };
@@ -921,6 +964,7 @@ export function caretAt(n: TextNode, index: number): { x: number; y: number; h:
};
for (const l of lay.lines) {
if (index >= l.start && index <= l.end) {
+ if (l.bidi) { const h = holder(l.glyphs, index), tg = h?.g.t ? h.g : null; return at(bidiStop(l, index), l, tg ? touchMap(tg) : null); }
let u = l.x, prev: Glyph | null = null, next: Glyph | null = null;
for (const g of l.glyphs) { if (g.index >= index) { next = g; break; } u = gu(g) + ga(g); prev = g; }
const tg = next?.t && !next.syn ? next : prev?.t && !prev.syn ? prev : null;
@@ -940,14 +984,14 @@ export function indexAt(n: TextNode, local: Pt): number {
if (d >= bd) continue;
bd = d;
const q = apply(invert(glyphMat(g)), local.x, local.y), bx = glyphBox(g);
- best = (g.up ? q.y > bx.y + bx.h / 2 : q.x > bx.x + bx.w / 2) ? g.index + g.ch.length : g.index;
+ best = (g.up ? q.y > bx.y + bx.h / 2 : q.x > bx.x + bx.w / 2) !== rtlOf(g) ? g.index + g.ch.length : g.index;
}
return best;
}
for (const g of lay.glyphs) {
if (!g.t || g.syn) continue;
const r = apply(invert(glyphMat(g)), local.x, local.y), bx = glyphBox(g);
- if (r.x >= bx.x && r.x <= bx.x + bx.w && r.y >= bx.y && r.y <= bx.y + bx.h) return (g.up ? r.y > bx.y + bx.h / 2 : r.x > bx.x + bx.w / 2) ? g.index + g.ch.length : g.index;
+ if (r.x >= bx.x && r.x <= bx.x + bx.w && r.y >= bx.y && r.y <= bx.y + bx.h) return (g.up ? r.y > bx.y + bx.h / 2 : r.x > bx.x + bx.w / 2) !== rtlOf(g) ? g.index + g.ch.length : g.index;
}
const q = toAbs(lay.vertical, local);
let line = lay.lines[0], ld = Infinity;
@@ -956,6 +1000,7 @@ export function indexAt(n: TextNode, local: Pt): number {
const d = Math.hypot(q.x < x0 ? x0 - q.x : q.x > x1 ? q.x - x1 : 0, q.y < y0 ? y0 - q.y : q.y > y1 ? q.y - y1 : 0) * 4 + Math.abs(q.y - (y0 + y1) / 2) * 0.01;
if (d < ld) { ld = d; line = l; }
}
+ if (line.bidi) return bidiIndexAt(line, q.x);
for (const g of line.glyphs) if (q.x < gu(g) + ga(g) / 2) return g.index;
return line.end;
}
@@ -967,7 +1012,9 @@ export function stepLine(n: TextNode, caret: number, dir: 1 | -1): number {
if (!target) return dir < 0 ? 0 : plainText(n).length;
const l = lay.lines[li];
let u = l.x;
- for (const g of l.glyphs) { if (g.index >= caret) break; u = gu(g) + ga(g); }
+ if (l.bidi) u = bidiStop(l, caret);
+ else for (const g of l.glyphs) { if (g.index >= caret) break; u = gu(g) + ga(g); }
+ if (target.bidi) return bidiIndexAt(target, u);
for (const g of target.glyphs) if (u < gu(g) + ga(g) / 2) return g.index;
return target.end;
}
diff --git a/frontend/src/ui/text-editor.ts b/frontend/src/ui/text-editor.ts
index 9a9aa47..25dd231 100644
--- a/frontend/src/ui/text-editor.ts
+++ b/frontend/src/ui/text-editor.ts
@@ -1,6 +1,6 @@
import { findNode } from '../engine/doc';
import { apply, invert, rectContains, inflate } from '../engine/geometry';
-import { caretAt, cssFont, DEFAULT_CHAR, deleteText, indexAt, insertText, layoutText, plainText, selectionQuads, stepLine, styleAt } from '../engine/text';
+import { caretAt, cssFont, DEFAULT_CHAR, deleteText, indexAt, insertText, layoutText, plainText, selectionQuads, stepLine, stepVisual, styleAt } from '../engine/text';
import type { CharStyle, Engine, PathData, Pt, TextNode } from '../engine';
import type { Paint, ToolContext } from '../extensions/registry';
import { el } from './dom';
@@ -223,6 +223,8 @@ export class TextEditor {
e.preventDefault();
const a = this.arrow(e.key);
if (a.kind === 'line') { this.move(this.lineStep(a.dir), e.shiftKey); return; }
+ const vis = n && !e.altKey && !mod && !(this.range() && !e.shiftKey) ? stepVisual(n, this.caret, a.dir) : null;
+ if (vis !== null) { this.move(vis, e.shiftKey); return; }
if (a.dir < 0) this.move(e.altKey || mod ? wordStart(text, this.caret) : this.range() && !e.shiftKey ? Math.min(this.caret, this.anchor) : prevPoint(text, this.caret), e.shiftKey);
else this.move(e.altKey || mod ? wordEnd(text, this.caret) : this.range() && !e.shiftKey ? Math.max(this.caret, this.anchor) : nextPoint(text, this.caret), e.shiftKey);
return;
From c406eafe10a5ec1a67fd8f33e8bde4ba7c315d67 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 15:43:10 -0500
Subject: [PATCH 49/74] fix(io): shaped and right-to-left type exports to PDF,
SVG, EPS and DXF as it shows on the canvas, and copying it from a PDF gives
its characters in reading order
---
frontend/src/io/dxf.ts | 2 +-
frontend/src/io/fonts.ts | 14 ++++++---
frontend/src/io/pdf-text.ts | 57 ++++++++++++++++++++++++++-----------
frontend/src/io/svg.ts | 12 ++++----
4 files changed, 57 insertions(+), 28 deletions(-)
diff --git a/frontend/src/io/dxf.ts b/frontend/src/io/dxf.ts
index 32d75cc..fdd1b73 100644
--- a/frontend/src/io/dxf.ts
+++ b/frontend/src/io/dxf.ts
@@ -542,7 +542,7 @@ export async function exportDxf(p: Project, o: DxfExportOptions, outline: (n: Te
case 'text': {
if (!on) return;
const fillC = n.spans[0] ? solidOf(n.spans[0].style.fill) ?? { kind: 'rgb', r: 0, g: 0, b: 0 } as Color : { kind: 'rgb', r: 0, g: 0, b: 0 } as Color;
- if (o.text === 'outlines' || n.mode === 'path') { const d = await outline(n); if (d) shapes.push({ layer, d, stroke: null, fill: fillC, even: false }); return; }
+ if (o.text === 'outlines' || n.mode === 'path' || layoutText(n).complex) { const d = await outline(n); if (d) shapes.push({ layer, d, stroke: null, fill: fillC, even: false }); return; }
const lay = layoutText(n), lines: Label['lines'] = [];
for (const ln of lay.lines) {
const t = ln.glyphs.map((gl) => gl.ch).join('').replace(/\s+$/, '');
diff --git a/frontend/src/io/fonts.ts b/frontend/src/io/fonts.ts
index 5b97901..cc682c7 100644
--- a/frontend/src/io/fonts.ts
+++ b/frontend/src/io/fonts.ts
@@ -263,10 +263,10 @@ export function substituteNotes(swapped: Iterable): string[] {
export async function missingGlyphs(n: TextNode, swapped?: Set): Promise {
const out = new Set();
for (const g of layoutText(n).glyphs) {
- if (!g.ch.trim() || g.ch.charCodeAt(0) < 32 || invisibleChar(g.ch)) continue;
+ if (!g.ch.trim() || g.ch.charCodeAt(0) < 32 || invisibleChar(g.ch) || g.parts) continue;
const face = await exportFace(g.style, swapped);
if (!face) continue;
- const pick = await glyphOrFallback(g.ch, face.style, face.font, faceGlyph(face, g.ch, g.gid));
+ const ch = g.mir ?? g.ch, pick = await glyphOrFallback(ch, face.style, face.font, faceGlyph(face, ch, g.gid));
if (pick.missing) out.add(g.ch);
}
return [...out];
@@ -331,11 +331,17 @@ export async function outlineText(n: TextNode, swapped?: Set): Promise }
+export interface LiveGlyph { face: Face; gid: number; tm: Mat; style: CharStyle; act?: number }
+export interface LiveText { node: TextNode; glyphs: LiveGlyph[]; faces: Set; acts?: string[] }
const num = (v: number): string => { const r = Math.round(v * 1e6) / 1e6; return Object.is(r, -0) ? '0' : String(r); };
const hex4 = (v: number): string => v.toString(16).padStart(4, '0');
@@ -80,33 +80,50 @@ export class LiveFonts {
async plan(doc: Doc, n: TextNode, swapped?: Set): Promise {
if (!this.capable(doc, n)) return null;
- const lay = layoutText(n), staged: Array<{ key: string; font: Font; style: CharStyle; gid: number; ch: string; tm: Mat; fallback: boolean }> = [];
+ const lay = layoutText(n), staged: Array<{ key: string; font: Font; style: CharStyle; gid: number; ch: string; tm: Mat; fallback: boolean; cl?: Glyph }> = [];
for (const g of lay.glyphs) {
const code = g.ch.charCodeAt(0);
if (code < 32) continue;
const hasStroke = g.style.stroke.type !== 'none' && g.style.strokeWidth > 0;
if (!solidOrNone(doc, g.style.fill) || (hasStroke && !solidOrNone(doc, g.style.stroke))) return null;
+ if (g.parts) {
+ const fst = g.face ?? g.style, pf = await fontFor(fst.font, fst.style);
+ if (!pf) return null;
+ const local = mul(glyphMat(g), [(g.size * g.style.hscale) / 100, 0, 0, (g.size * g.style.vscale) / 100, 0, 0]), m0 = n.mode === 'path' ? local : mul(n.xf, local);
+ for (const p of g.parts) { const m = mul(m0, [1, 0, 0, 1, p.x, p.y]); staged.push({ key: `${fst.font}|${fst.style}|${hasAxes(fst) ? axesKey(fst) : ''}`, font: pf, style: fst, gid: p.gid, ch: g.ch, tm: [m[0], m[1], -m[2], -m[3], m[4], m[5]], fallback: fst.font !== g.style.font, cl: g }); }
+ continue;
+ }
const face = await exportFace(g.style, swapped);
if (!face) return null;
- const st = face.style, font = face.font, own = faceGlyph(face, g.ch, g.gid);
+ const st = face.style, font = face.font, ch = g.mir ?? g.ch, own = faceGlyph(face, ch, g.gid);
if (own === 0 && /\s/.test(g.ch)) continue;
- const pick = await glyphOrFallback(g.ch, st, font, own), ps = pick.style;
+ const pick = await glyphOrFallback(ch, st, font, own), ps = pick.style;
if (pick.skip) continue;
const local = mul(glyphMat(g), [(g.size * st.hscale) / 100, 0, 0, (g.size * st.vscale) / 100, 0, 0]), m = n.mode === 'path' ? local : mul(n.xf, local);
- staged.push({ key: `${pick.source}|${ps.style}|${hasAxes(ps) ? axesKey(ps) : ''}`, font: pick.font, style: ps, gid: pick.gid, ch: g.ch, tm: [m[0], m[1], -m[2], -m[3], m[4], m[5]], fallback: pick.font !== font });
+ staged.push({ key: `${pick.source}|${ps.style}|${hasAxes(ps) ? axesKey(ps) : ''}`, font: pick.font, style: ps, gid: pick.gid, ch, tm: [m[0], m[1], -m[2], -m[3], m[4], m[5]], fallback: pick.font !== font });
}
- const glyphs: LiveGlyph[] = [], used = new Set();
+ const glyphs: LiveGlyph[] = [], used = new Set(), acts: string[] = [], actOf = new Map();
+ const faceOf = (s: (typeof staged)[number]): Face => { let f = this.faces.get(s.key); if (!f) { f = new Face(s.key, s.font, s.style); this.faces.set(s.key, f); } return f; };
+ const one = (s: (typeof staged)[number]): boolean => !s.cl || (s.cl.parts?.length === 1 && [...s.ch].length === 1);
+ for (const s of staged) { const face = faceOf(s); if (s.gid !== 0 && one(s) && !face.uni.has(s.gid)) face.uni.set(s.gid, s.ch); }
+ const rtl = new Map>();
+ for (const s of staged) if (s.cl && ((s.cl.lv ?? 0) & 1) === 1 && !one(s)) rtl.set(s.cl, [...(rtl.get(s.cl) ?? []), s]);
+ for (const [g, list] of rtl) {
+ const rest = [...g.ch];
+ for (const s of list) { const k = rest.findIndex((c) => s.font.charToGlyph(c).index === s.gid); if (k >= 0 && s.gid !== 0) { const f = faceOf(s); if (!f.uni.has(s.gid)) f.uni.set(s.gid, rest[k]); rest.splice(k, 1); } }
+ const free = list.find((s) => s.gid !== 0 && !faceOf(s).uni.has(s.gid));
+ if (free && rest.length) faceOf(free).uni.set(free.gid, rest.reverse().join(''));
+ }
+ for (const s of staged) if (s.cl && !rtl.has(s.cl) && !actOf.has(s.cl) && (!one(s) || faceOf(s).uni.get(s.gid) !== s.ch) && s.ch.trim()) actOf.set(s.cl, acts.push(s.ch) - 1);
for (const s of staged) {
- let face = this.faces.get(s.key);
- if (!face) { face = new Face(s.key, s.font, s.style); this.faces.set(s.key, face); }
+ const face = faceOf(s), act = s.cl ? actOf.get(s.cl) : undefined;
if (s.fallback) face.fallback = true;
face.gids.add(s.gid);
- if (s.gid !== 0 && !face.uni.has(s.gid)) face.uni.set(s.gid, s.ch);
if (!face.adv.has(s.gid)) face.adv.set(s.gid, Math.round(glyphAdvance(s.font, s.gid, s.style) * 1e4) / 10);
used.add(face);
- glyphs.push({ face, gid: s.gid, tm: s.tm, style: s.style });
+ glyphs.push({ face, gid: s.gid, tm: s.tm, style: s.style, ...(act !== undefined ? { act } : {}) });
}
- return { node: n, glyphs, faces: used };
+ return { node: n, glyphs, faces: used, ...(acts.length ? { acts } : {}) };
}
ok(plan: LiveText): boolean { return [...plan.faces].every((f) => !f.failed); }
@@ -140,7 +157,7 @@ export class LiveFonts {
}
}
-export interface Run { face: Face; ink: Ink; tm: Mat; parts: string[]; hex: string; pos: number; end: number; glyphs: number }
+export interface Run { face: Face; ink: Ink; tm: Mat; parts: string[]; hex: string; pos: number; end: number; glyphs: number; act?: number }
const sameLinear = (a: Mat, b: Mat): boolean => { const tol = 1e-5 * (Math.abs(a[0]) + Math.abs(a[1]) + Math.abs(a[2]) + Math.abs(a[3])) + 1e-9; return Math.abs(a[0] - b[0]) <= tol && Math.abs(a[1] - b[1]) <= tol && Math.abs(a[2] - b[2]) <= tol && Math.abs(a[3] - b[3]) <= tol; };
@@ -153,7 +170,7 @@ export function liveRuns(plan: LiveText, inkOf: (st: CharStyle) => Ink): Run[] {
const ink = inkOf(g.style);
if (!ink.fill && !ink.stroke) { flush(); continue; }
const adv = g.face.adv.get(g.gid) ?? 0;
- if (cur && last && cur.face === g.face && cur.ink.fill === ink.fill && cur.ink.stroke === ink.stroke && cur.ink.width === ink.width && sameLinear(cur.tm, g.tm)) {
+ if (cur && last && cur.face === g.face && cur.act === g.act && cur.ink.fill === ink.fill && cur.ink.stroke === ink.stroke && cur.ink.width === ink.width && sameLinear(cur.tm, g.tm)) {
const a = cur.tm[0], b = cur.tm[1], den = a * a + b * b, dx = g.tm[4] - cur.tm[4], dy = g.tm[5] - cur.tm[5];
const perp = den > 0 ? Math.abs(dx * b - dy * a) / Math.sqrt(den) : Infinity;
if (den > 0 && perp <= 0.01) {
@@ -168,7 +185,7 @@ export function liveRuns(plan: LiveText, inkOf: (st: CharStyle) => Ink): Run[] {
}
}
flush();
- cur = { face: g.face, ink, tm: g.tm, parts: [], hex: hex4(g.gid), pos: 0, end: adv, glyphs: 1 };
+ cur = { face: g.face, ink, tm: g.tm, parts: [], hex: hex4(g.gid), pos: 0, end: adv, glyphs: 1, ...(g.act !== undefined ? { act: g.act } : {}) };
last = g;
}
flush();
@@ -177,8 +194,13 @@ export function liveRuns(plan: LiveText, inkOf: (st: CharStyle) => Ink): Run[] {
export function liveStream(plan: LiveText, inkOf: (st: CharStyle) => Ink): string {
const out: string[] = [];
- let face: Face | null = null, fill = '', stroke = '', mode = -1, width = '';
+ let face: Face | null = null, fill = '', stroke = '', mode = -1, width = '', open: number | undefined;
for (const r of liveRuns(plan, inkOf)) {
+ if (r.act !== open) {
+ if (open !== undefined) out.push('EMC');
+ if (r.act !== undefined) out.push(`/Span << /ActualText >> BDC`);
+ open = r.act;
+ }
const ink = r.ink, m = ink.fill && ink.stroke ? 2 : ink.stroke ? 1 : 0;
if (ink.fill && ink.fill !== fill) { out.push(ink.fill); fill = ink.fill; }
if (ink.stroke) {
@@ -191,5 +213,6 @@ export function liveStream(plan: LiveText, inkOf: (st: CharStyle) => Ink): strin
if (r.face !== face) { out.push(`/${r.face.resource} 1 Tf`); face = r.face; }
out.push(`${r.tm.map(num).join(' ')} Tm`, r.parts.length === 1 && r.parts[0].startsWith('<') ? `${r.parts[0]} Tj` : `[${r.parts.join(' ')}] TJ`, 'ET');
}
+ if (open !== undefined) out.push('EMC');
return out.length ? `q\n${out.join('\n')}\nQ` : '';
}
diff --git a/frontend/src/io/svg.ts b/frontend/src/io/svg.ts
index c8a3ff6..4d71bea 100644
--- a/frontend/src/io/svg.ts
+++ b/frontend/src/io/svg.ts
@@ -254,11 +254,11 @@ class Writer {
const parts: string[] = [];
const st = g.style, m = mul(glyphMat(g), [st.hscale / 100, 0, 0, st.vscale / 100, 0, 0]), f = this.paint(st.fill, b);
const stroked = st.stroke.type !== 'none' && st.strokeWidth > 0, sv = stroked ? this.paint(st.stroke, b).v : '';
- const shape = g.gid !== undefined ? glyphOutline(st, g.gid) : g.t ? glyphShape(g) : null;
+ const shape = g.gid !== undefined ? glyphOutline(st, g.gid) : g.t || g.parts ? glyphShape(g) : null;
if (shape && shape.length) parts.push(` `);
else {
const deco = g.up ? '' : [st.underline ? 'underline' : '', st.strike ? 'line-through' : ''].filter(Boolean).join(' ');
- parts.push(`${esc(g.ch)} `);
+ parts.push(`${esc(g.mir ?? g.ch)} `);
}
if (g.up && (st.underline || st.strike)) {
const bx = glyphBox(g), t = Math.max(0.5, g.size * 0.06), gm = mat(glyphMat(g), pr);
@@ -267,7 +267,7 @@ class Writer {
}
return parts.join('');
};
- const glyphRuns = (gs: typeof lay.glyphs): string => {
+ const glyphRuns = (gs: typeof lay.glyphs, bidi = false): string => {
const parts: string[] = [];
let cur: typeof lay.glyphs = [];
const flush = (): void => {
@@ -275,12 +275,12 @@ class Writer {
const st = cur[0].style;
const f = this.paint(st.fill, b), s = st.stroke.type !== 'none' && st.strokeWidth > 0 ? ` stroke="${this.paint(st.stroke, b).v}" stroke-width="${num(st.strokeWidth)}"` : '';
const deco = [st.underline ? 'underline' : '', st.strike ? 'line-through' : ''].filter(Boolean).join(' ');
- parts.push(`${esc(cur.map((g) => g.ch).join(''))} `);
+ parts.push(`${esc(cur.map((g) => g.mir ?? g.ch).join(''))} `);
cur = [];
};
const loose: string[] = [];
for (const g of gs) {
- if (g.t || outlineOnly(g)) { if (g.ch !== ' ' && g.ch !== '\t') loose.push(one(g)); continue; }
+ if (g.t || bidi || outlineOnly(g)) { if (g.ch !== ' ' && g.ch !== '\t') loose.push(one(g)); continue; }
if (cur.length && (cur[0].style !== g.style || g.style.features.length || cur[cur.length - 1].y !== g.y)) flush();
cur.push(g);
}
@@ -299,7 +299,7 @@ class Writer {
const tp = n.mode === 'path' && n.path ? ` data-formpath-textpath="${esc(JSON.stringify({ d: this.d(n.path), s: n.pathStart ?? 0, e: n.pathEnd ?? 1, f: n.pathFlip ? 1 : 0, fx: n.pathEffect ?? 'rainbow', al: n.pathAlign ?? 'baseline', sp: n.pathSpacing ?? 0, pa: n.para.align, r: runs }))}"` : '';
return `${parts.join('')} `;
}
- for (const l of lay.lines) if (l.glyphs.length) runs.push(glyphRuns(l.glyphs));
+ for (const l of lay.lines) if (l.glyphs.length) runs.push(glyphRuns(l.glyphs, !!l.bidi));
const xf = n.xf[0] === 1 && n.xf[1] === 0 && n.xf[2] === 0 && n.xf[3] === 1 && !n.xf[4] && !n.xf[5] ? '' : ` transform="${mat(n.xf, this.o.precision)}"`;
return `${runs.join('')} `;
}
From 5f5b4dc4818126ae5c8929bda7b85889ebc44651 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 15:48:43 -0500
Subject: [PATCH 50/74] fix(shell): a project opened by double click or Open
With opens in the window, and a second launch on Windows or Linux hands its
files to the running window
---
NOTICE.md | 1 +
frontend/src/app.ts | 3 +-
src-tauri/Cargo.lock | 411 ++++++++++++++++++++++++++++
src-tauri/Cargo.toml | 3 +
src-tauri/build.rs | 2 +-
src-tauri/capabilities/default.json | 4 +-
src-tauri/src/launch_args.rs | 29 ++
src-tauri/src/main.rs | 19 +-
src-tauri/src/opened.rs | 71 +++++
9 files changed, 538 insertions(+), 5 deletions(-)
create mode 100644 src-tauri/src/launch_args.rs
create mode 100644 src-tauri/src/opened.rs
diff --git a/NOTICE.md b/NOTICE.md
index 308f561..e0868db 100644
--- a/NOTICE.md
+++ b/NOTICE.md
@@ -26,6 +26,7 @@ The vector tool and panel icons in `frontend/src/ui/icons-vector.ts`, the app ic
| bidi-js 1.1.0 (Jason Johnston) | MIT | the Unicode Bidirectional Algorithm (Unicode 13 data) for right-to-left and mixed-direction type; loaded with harfbuzzjs. Its declared dependency require-from-string 2.0.2 (MIT) is installed but not bundled |
| @tauri-apps/api | Apache-2.0 or MIT | native menus on macOS |
| tauri, tauri-plugin-shell, tauri-plugin-dialog, tauri-plugin-updater, regex, serde_json | Apache-2.0 or MIT | desktop shell |
+| tauri-plugin-single-instance 2.5.5, with zbus 5.19.0 on Linux | Apache-2.0 or MIT (zbus: MIT) | on Windows and Linux, a second launch hands the files it was given to the running window and ends |
| fastapi, uvicorn, python-multipart, httpx | MIT, BSD-3-Clause, Apache-2.0, BSD-3-Clause | engine |
| Pillow 12.3.0, with LittleCMS 2 | MIT-CMU (HPND); LittleCMS is MIT | ICC profile reading and the colour lookup tables for Color Settings and Proof Colors |
| keyring, with jaraco.classes, jaraco.context, jaraco.functools, more-itertools, jeepney and SecretStorage | MIT (SecretStorage: BSD-3-Clause) | API keys in the system's password store |
diff --git a/frontend/src/app.ts b/frontend/src/app.ts
index 82ae994..292ac2d 100644
--- a/frontend/src/app.ts
+++ b/frontend/src/app.ts
@@ -2253,6 +2253,7 @@ export function startApp(): void {
}
const faces = Promise.all(['400', '500', '600'].map((w) => document.fonts.load(`${w} 12px Inter`))).catch(() => undefined);
- void Promise.race([faces, new Promise((r) => window.setTimeout(r, 2500))]).then(() => requestAnimationFrame(() => { revealApp(); void offerRecovery(); }));
+ const openedByShell = (): void => { void import('@tauri-apps/api/core').then(async ({ invoke }) => { for (const [id, name] of await invoke<[number, string][]>('opened_take')) { try { await openFiles([new File([await invoke('opened_read', { id })], name)]); } catch (err) { toast(`${name}: ${message(err)}`, 'error'); } } }).catch(() => undefined); };
+ void Promise.race([faces, new Promise((r) => window.setTimeout(r, 2500))]).then(() => requestAnimationFrame(() => { revealApp(); void offerRecovery().finally(() => { if (!('__TAURI_INTERNALS__' in window)) return; (window as unknown as { formpathOpened?: () => void }).formpathOpened = openedByShell; openedByShell(); }); }));
void plainText; void hex;
}
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index 978f998..224281b 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -56,6 +56,137 @@ dependencies = [
"derive_arbitrary",
]
+[[package]]
+name = "async-broadcast"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532"
+dependencies = [
+ "event-listener",
+ "event-listener-strategy",
+ "futures-core",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "async-channel"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2"
+dependencies = [
+ "concurrent-queue",
+ "event-listener-strategy",
+ "futures-core",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "async-executor"
+version = "1.14.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f426a31126c735126297bc5ea7a521263c9faff4f63ca415267ee625651c4f37"
+dependencies = [
+ "async-task",
+ "concurrent-queue",
+ "fastrand",
+ "futures-lite",
+ "pin-project-lite",
+ "slab",
+]
+
+[[package]]
+name = "async-io"
+version = "2.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc"
+dependencies = [
+ "autocfg",
+ "cfg-if",
+ "concurrent-queue",
+ "futures-io",
+ "futures-lite",
+ "parking",
+ "polling",
+ "rustix",
+ "slab",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "async-lock"
+version = "3.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0876700b0d007ad25d5508865a4259c3af9af6d296bf663a0d586d0bc3369f6f"
+dependencies = [
+ "event-listener",
+ "event-listener-strategy",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "async-process"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75"
+dependencies = [
+ "async-channel",
+ "async-io",
+ "async-lock",
+ "async-signal",
+ "async-task",
+ "blocking",
+ "cfg-if",
+ "event-listener",
+ "futures-lite",
+ "rustix",
+]
+
+[[package]]
+name = "async-recursion"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4f8abc12baad266b1c8cec146854c195b5864b4221d4b2ca7296a7ae82d9e451"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.6",
+]
+
+[[package]]
+name = "async-signal"
+version = "0.2.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485"
+dependencies = [
+ "async-io",
+ "async-lock",
+ "atomic-waker",
+ "cfg-if",
+ "futures-core",
+ "futures-io",
+ "rustix",
+ "signal-hook-registry",
+ "slab",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "async-task"
+version = "4.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de"
+
+[[package]]
+name = "async-trait"
+version = "0.1.92"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.6",
+]
+
[[package]]
name = "atk"
version = "0.18.2"
@@ -157,6 +288,19 @@ dependencies = [
"objc2",
]
+[[package]]
+name = "blocking"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a70e4329df6cb94385eed412ec92375c3cdd8a6e502493d1229b6414e4036dfa"
+dependencies = [
+ "async-channel",
+ "async-task",
+ "futures-io",
+ "futures-lite",
+ "piper",
+]
+
[[package]]
name = "brotli"
version = "9.0.0"
@@ -347,6 +491,15 @@ dependencies = [
"memchr",
]
+[[package]]
+name = "concurrent-queue"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973"
+dependencies = [
+ "crossbeam-utils",
+]
+
[[package]]
name = "cookie"
version = "0.18.2"
@@ -764,6 +917,33 @@ dependencies = [
"simdutf8",
]
+[[package]]
+name = "endi"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099"
+
+[[package]]
+name = "enumflags2"
+version = "0.7.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef"
+dependencies = [
+ "enumflags2_derive",
+ "serde",
+]
+
+[[package]]
+name = "enumflags2_derive"
+version = "0.7.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
[[package]]
name = "equivalent"
version = "1.0.2"
@@ -791,6 +971,26 @@ dependencies = [
"windows-sys 0.61.2",
]
+[[package]]
+name = "event-listener"
+version = "5.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2"
+dependencies = [
+ "parking",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "event-listener-strategy"
+version = "0.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93"
+dependencies = [
+ "event-listener",
+ "pin-project-lite",
+]
+
[[package]]
name = "fastrand"
version = "2.5.0"
@@ -904,6 +1104,7 @@ dependencies = [
"tauri-build",
"tauri-plugin-dialog",
"tauri-plugin-shell",
+ "tauri-plugin-single-instance",
"tauri-plugin-updater",
"windows-sys 0.61.2",
]
@@ -940,6 +1141,19 @@ version = "0.3.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed"
+[[package]]
+name = "futures-lite"
+version = "2.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad"
+dependencies = [
+ "fastrand",
+ "futures-core",
+ "futures-io",
+ "parking",
+ "pin-project-lite",
+]
+
[[package]]
name = "futures-macro"
version = "0.3.34"
@@ -1294,6 +1508,12 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+[[package]]
+name = "hermit-abi"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e17592d60ebacc7d5e169f4663c5f84f9161cc90328abcfe8456f41e4dfcb284"
+
[[package]]
name = "hex"
version = "0.4.3"
@@ -2302,6 +2522,16 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
+[[package]]
+name = "ordered-stream"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50"
+dependencies = [
+ "futures-core",
+ "pin-project-lite",
+]
+
[[package]]
name = "os_pipe"
version = "1.2.3"
@@ -2351,6 +2581,12 @@ dependencies = [
"system-deps",
]
+[[package]]
+name = "parking"
+version = "2.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba"
+
[[package]]
name = "parking_lot"
version = "0.12.5"
@@ -2439,6 +2675,17 @@ version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
+[[package]]
+name = "piper"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1"
+dependencies = [
+ "atomic-waker",
+ "fastrand",
+ "futures-io",
+]
+
[[package]]
name = "pkg-config"
version = "0.3.34"
@@ -2484,6 +2731,20 @@ dependencies = [
"miniz_oxide 0.8.9",
]
+[[package]]
+name = "polling"
+version = "3.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218"
+dependencies = [
+ "cfg-if",
+ "concurrent-queue",
+ "hermit-abi",
+ "pin-project-lite",
+ "rustix",
+ "windows-sys 0.61.2",
+]
+
[[package]]
name = "portable-atomic"
version = "1.15.0"
@@ -3712,6 +3973,22 @@ dependencies = [
"tokio",
]
+[[package]]
+name = "tauri-plugin-single-instance"
+version = "2.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "726b6da0dd5bd1344f84f4108a622c07d01923baacb5c803a605189672c5352f"
+dependencies = [
+ "serde",
+ "serde_json",
+ "tauri",
+ "thiserror 2.0.21",
+ "tokio",
+ "tracing",
+ "windows-sys 0.61.2",
+ "zbus",
+]
+
[[package]]
name = "tauri-plugin-updater"
version = "2.13.1"
@@ -4138,9 +4415,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
dependencies = [
"pin-project-lite",
+ "tracing-attributes",
"tracing-core",
]
+[[package]]
+name = "tracing-attributes"
+version = "0.1.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
[[package]]
name = "tracing-core"
version = "0.1.36"
@@ -4190,6 +4479,17 @@ version = "1.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
+[[package]]
+name = "uds_windows"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e"
+dependencies = [
+ "memoffset",
+ "tempfile",
+ "windows-sys 0.61.2",
+]
+
[[package]]
name = "unicode-ident"
version = "1.0.26"
@@ -5042,6 +5342,76 @@ dependencies = [
"synstructure",
]
+[[package]]
+name = "zbus"
+version = "5.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5db4be7c075cb421e4b7ee645541604239bd243ba7c357511f4ff3a74b555907"
+dependencies = [
+ "async-broadcast",
+ "async-executor",
+ "async-io",
+ "async-lock",
+ "async-process",
+ "async-recursion",
+ "async-task",
+ "async-trait",
+ "blocking",
+ "enumflags2",
+ "event-listener",
+ "futures-core",
+ "futures-lite",
+ "hex",
+ "libc",
+ "ordered-stream",
+ "rustix",
+ "serde",
+ "serde_repr",
+ "tracing",
+ "uds_windows",
+ "uuid",
+ "windows-sys 0.61.2",
+ "winnow 1.0.4",
+ "zbus_macros",
+ "zbus_names",
+ "zvariant",
+]
+
+[[package]]
+name = "zbus_macros"
+version = "5.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2990635d09ade6df1868f72f8cac69a876a90981e8bd3c40b1be413f8dc88f40"
+dependencies = [
+ "proc-macro-crate 3.5.0",
+ "proc-macro2",
+ "quote",
+ "syn 3.0.6",
+ "zbus_names",
+ "zvariant",
+ "zvariant_utils",
+]
+
+[[package]]
+name = "zbus_names"
+version = "4.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "812a12be4ead7a59e18ea8f047d08add0066b73bc62fc1467066a2472ae088dd"
+dependencies = [
+ "serde",
+ "winnow 1.0.4",
+ "zvariant",
+]
+
+[[package]]
+name = "zcheapstr"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2da34e7164b75d803c3197b86e6cf61b874106fbd472c5082575a8bc5fbd0907"
+dependencies = [
+ "serde",
+]
+
[[package]]
name = "zerofrom"
version = "0.1.8"
@@ -5125,3 +5495,44 @@ name = "zmij"
version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
+
+[[package]]
+name = "zvariant"
+version = "5.15.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "80bf6d6cd6a4b601acb64cfb8284cdc643fcfa75ef26ae3c46ec8aa4e8a1fbb7"
+dependencies = [
+ "endi",
+ "enumflags2",
+ "serde",
+ "winnow 1.0.4",
+ "zcheapstr",
+ "zvariant_derive",
+ "zvariant_utils",
+]
+
+[[package]]
+name = "zvariant_derive"
+version = "5.15.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef2672456ba1cb54b5eaec136e63135b3c7495fb938e53b28a62e633496d486d"
+dependencies = [
+ "proc-macro-crate 3.5.0",
+ "proc-macro2",
+ "quote",
+ "syn 3.0.6",
+ "zvariant_utils",
+]
+
+[[package]]
+name = "zvariant_utils"
+version = "4.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bad0294361a320b694a328460dc73add56c306150f5cb6bfafc44446120008a3"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "serde",
+ "syn 3.0.6",
+ "winnow 1.0.4",
+]
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index 067c961..e985cca 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -21,6 +21,9 @@ serde_json = "1"
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_Security", "Win32_System_JobObjects", "Win32_System_Threading"] }
+[target.'cfg(any(windows, target_os = "linux"))'.dependencies]
+tauri-plugin-single-instance = "=2.5.5"
+
[target.'cfg(target_os = "macos")'.dependencies]
objc2 = "0.6"
objc2-app-kit = { version = "0.3", default-features = false, features = ["std", "NSWindow", "NSButton", "NSControl", "NSView", "NSResponder", "objc2-core-foundation", "NSColor"] }
diff --git a/src-tauri/build.rs b/src-tauri/build.rs
index 266c36c..897489c 100644
--- a/src-tauri/build.rs
+++ b/src-tauri/build.rs
@@ -1,4 +1,4 @@
-const APP_COMMANDS: &[&str] = &["set_window_title", "app_ready", "text_edit"];
+const APP_COMMANDS: &[&str] = &["set_window_title", "app_ready", "text_edit", "opened_take", "opened_read"];
fn main() {
tauri_build::try_build(
diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json
index 2363c10..8cb5528 100644
--- a/src-tauri/capabilities/default.json
+++ b/src-tauri/capabilities/default.json
@@ -1,7 +1,7 @@
{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
- "description": "The app talks HTTP to its engine on a loopback port; through Tauri it asks the shell for the installed fonts and, on macOS, sets its menus in the system menu bar.",
+ "description": "The app talks HTTP to its engine on a loopback port; through Tauri it asks the shell for the installed fonts and for the files the system asked the app to open and, on macOS, sets its menus in the system menu bar.",
"windows": ["splash", "main"],
"remote": { "urls": ["http://127.0.0.1:*"] },
"permissions": [
@@ -9,6 +9,8 @@
"allow-set-window-title",
"allow-app-ready",
"allow-text-edit",
+ "allow-opened-take",
+ "allow-opened-read",
"core:window:allow-minimize",
"core:window:allow-toggle-maximize",
"core:window:allow-maximize",
diff --git a/src-tauri/src/launch_args.rs b/src-tauri/src/launch_args.rs
new file mode 100644
index 0000000..56928ea
--- /dev/null
+++ b/src-tauri/src/launch_args.rs
@@ -0,0 +1,29 @@
+use std::ffi::OsString;
+use std::path::{Path, PathBuf};
+
+pub fn program_end(argv: &[OsString], exe: &Path) -> usize {
+ let exe = exe.to_string_lossy().to_lowercase();
+ let mut program = argv.first().map(|arg| arg.to_string_lossy().to_lowercase()).unwrap_or_default();
+ let mut end = 1;
+ while end < argv.len() && program != exe {
+ program = format!("{program} {}", argv[end].to_string_lossy().to_lowercase());
+ if !exe.starts_with(&program) {
+ break;
+ }
+ end += 1;
+ }
+ if program == exe { end } else { 1 }
+}
+
+pub fn paths(argv: Vec, cwd: &Path, exe: &Path) -> Vec {
+ let end = program_end(&argv, exe);
+ argv.into_iter()
+ .skip(end)
+ .filter(|arg| !arg.is_empty() && !arg.to_string_lossy().starts_with('-'))
+ .map(|arg| cwd.join(arg))
+ .collect()
+}
+
+pub fn own() -> Vec {
+ paths(std::env::args_os().collect(), &std::env::current_dir().unwrap_or_default(), &std::env::current_exe().unwrap_or_default())
+}
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs
index e0d017b..40792f1 100644
--- a/src-tauri/src/main.rs
+++ b/src-tauri/src/main.rs
@@ -1,6 +1,8 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
mod engine_start;
+mod launch_args;
+mod opened;
mod reveal;
mod text_edit;
mod traffic_lights;
@@ -89,7 +91,14 @@ fn check_for_updates(handle: tauri::AppHandle) {
fn main() {
reveal::mark_launch();
- let app = tauri::Builder::default()
+ let app = tauri::Builder::default();
+ #[cfg(any(windows, target_os = "linux"))]
+ let app = app.plugin(tauri_plugin_single_instance::init(|handle, argv, cwd| {
+ let exe = std::env::current_exe().unwrap_or_default();
+ opened::arrive(handle, launch_args::paths(argv.into_iter().map(std::ffi::OsString::from).collect(), std::path::Path::new(&cwd), &exe));
+ opened::bring_forward(handle);
+ }));
+ let app = app
.on_window_event(|window, event| {
if window.label() == "main"
&& matches!(
@@ -103,13 +112,15 @@ fn main() {
traffic_lights::place(window);
}
})
- .invoke_handler(tauri::generate_handler![traffic_lights::set_window_title, reveal::app_ready, text_edit::text_edit])
+ .invoke_handler(tauri::generate_handler![traffic_lights::set_window_title, reveal::app_ready, text_edit::text_edit, opened::opened_take, opened::opened_read])
.plugin(tauri_plugin_shell::init())
.plugin(tauri_plugin_dialog::init())
.plugin(tauri_plugin_updater::Builder::new().build())
.manage(Backend(Mutex::new(None)))
+ .manage(opened::Opened::default())
.setup(|app| {
let handle = app.handle().clone();
+ opened::arrive(&handle, launch_args::own());
reveal::round_splash(&handle);
let started = app
.shell()
@@ -253,6 +264,10 @@ fn main() {
.expect("tauri app should build");
app.run(|handle, event| {
+ #[cfg(target_os = "macos")]
+ if let RunEvent::Opened { urls } = &event {
+ opened::arrive(handle, urls.iter().filter_map(|url| url.to_file_path().ok()).collect());
+ }
if let RunEvent::Exit = event {
kill_backend(handle);
}
diff --git a/src-tauri/src/opened.rs b/src-tauri/src/opened.rs
new file mode 100644
index 0000000..c747056
--- /dev/null
+++ b/src-tauri/src/opened.rs
@@ -0,0 +1,71 @@
+use std::path::{Path, PathBuf};
+use std::sync::Mutex;
+
+use tauri::{Manager, Runtime};
+
+#[derive(Default)]
+pub struct Opened(Mutex);
+
+#[derive(Default)]
+struct Queue {
+ waiting: Vec,
+ offered: Vec>,
+}
+
+pub fn arrive(app: &tauri::AppHandle, paths: Vec) {
+ let Some(opened) = app.try_state::() else { return };
+ if paths.is_empty() {
+ return;
+ }
+ opened.0.lock().unwrap().waiting.extend(paths);
+ if let Some(main) = app.get_webview_window("main") {
+ let _ = main.eval("window.formpathOpened && window.formpathOpened()");
+ }
+}
+
+#[cfg(any(windows, target_os = "linux"))]
+pub fn bring_forward(app: &tauri::AppHandle) {
+ if app.get_webview_window("splash").is_some() {
+ return;
+ }
+ if let Some(main) = app.get_webview_window("main") {
+ let _ = main.unminimize();
+ let _ = main.set_focus();
+ }
+}
+
+fn name(path: &Path) -> String {
+ path.file_name().unwrap_or(path.as_os_str()).to_string_lossy().into_owned()
+}
+
+#[tauri::command]
+pub fn opened_take(app: tauri::AppHandle) -> Vec<(usize, String)> {
+ let opened = app.state::();
+ let mut queue = opened.0.lock().unwrap();
+ let waiting = std::mem::take(&mut queue.waiting);
+ waiting
+ .into_iter()
+ .map(|path| {
+ let shown = name(&path);
+ queue.offered.push(Some(path));
+ (queue.offered.len() - 1, shown)
+ })
+ .collect()
+}
+
+#[tauri::command(async)]
+pub fn opened_read(app: tauri::AppHandle, id: usize) -> Result {
+ let path = app
+ .state::()
+ .0
+ .lock()
+ .unwrap()
+ .offered
+ .get_mut(id)
+ .and_then(Option::take)
+ .ok_or_else(|| "this file was handed over already.".to_string())?;
+ std::fs::read(&path).map(tauri::ipc::Response::new).map_err(|err| match err.kind() {
+ std::io::ErrorKind::NotFound => format!("there is no file at {}.", path.display()),
+ _ => format!("{} could not be read ({err}).", path.display()),
+ })
+}
From 316898cf62989d4f3a3086aedf6607ba441f3ac7 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 15:48:43 -0500
Subject: [PATCH 51/74] fix(shell): the Linux packages pass a double-clicked
file to formpath and tell the system that .fpth files are formpath projects
---
src-tauri/linux/formpath-mime.xml | 8 ++++++++
src-tauri/linux/formpath.desktop | 14 ++++++++++++++
src-tauri/tauri.conf.json | 4 ++++
3 files changed, 26 insertions(+)
create mode 100644 src-tauri/linux/formpath-mime.xml
create mode 100644 src-tauri/linux/formpath.desktop
diff --git a/src-tauri/linux/formpath-mime.xml b/src-tauri/linux/formpath-mime.xml
new file mode 100644
index 0000000..72c99b3
--- /dev/null
+++ b/src-tauri/linux/formpath-mime.xml
@@ -0,0 +1,8 @@
+
+
+
+ formpath Project
+
+
+
+
diff --git a/src-tauri/linux/formpath.desktop b/src-tauri/linux/formpath.desktop
new file mode 100644
index 0000000..c01e397
--- /dev/null
+++ b/src-tauri/linux/formpath.desktop
@@ -0,0 +1,14 @@
+[Desktop Entry]
+Categories={{categories}}
+{{#if comment}}
+Comment={{comment}}
+{{/if}}
+Exec={{exec}} %F
+StartupWMClass={{exec}}
+Icon={{icon}}
+Name={{name}}
+Terminal=false
+Type=Application
+{{#if mime_type}}
+MimeType={{mime_type}}
+{{/if}}
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 9b98fe4..d095995 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -42,6 +42,10 @@
"hardenedRuntime": true,
"entitlements": "entitlements.plist"
},
+ "linux": {
+ "deb": { "desktopTemplate": "linux/formpath.desktop", "files": { "/usr/share/mime/packages/formpath.xml": "linux/formpath-mime.xml" } },
+ "rpm": { "desktopTemplate": "linux/formpath.desktop", "files": { "/usr/share/mime/packages/formpath.xml": "linux/formpath-mime.xml" } }
+ },
"fileAssociations": [
{ "ext": ["fpth"], "name": "formpath Project", "description": "formpath vector illustration project", "role": "Editor", "mimeType": "application/x-formpath" }
],
From 73805820df39d86a5b9cea83facb9e48b65721af Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 16:05:43 -0500
Subject: [PATCH 52/74] fix(pdf): Arabic and Hebrew type from a PDF is stored
in reading order, so it reads and joins correctly now that right-to-left type
is laid out
---
frontend/HASHOUT_LOG.md | 13 +++++++++
frontend/src/io/fonts.ts | 4 +--
frontend/src/io/pdf-read.ts | 55 +++++++++++++++++++++++++++++++++----
3 files changed, 65 insertions(+), 7 deletions(-)
diff --git a/frontend/HASHOUT_LOG.md b/frontend/HASHOUT_LOG.md
index aacedd6..601875f 100644
--- a/frontend/HASHOUT_LOG.md
+++ b/frontend/HASHOUT_LOG.md
@@ -5268,3 +5268,16 @@ Vertical metrics. `/W2` is read per CID: the advance replaces `DW2`'s, and the g
ActualText. A marked-content span that carries `/ActualText` (inline or through `Properties`) supplies the characters of a run that has none: the first such run in the span becomes live type with that text, later runs in the same span add nothing, and an empty or broken ActualText is ignored so the shapes are still drawn. A run that reads on its own keeps its own characters.
Seen in the built window against an untouched 0.61.0 build: 28 of 29 other PDFs give the same objects and message, and the one that differs is `issue8229.pdf` above. Cost: a file with many small symbolic fonts and no ToUnicode sends each program to the engine once (a 23-page public file took about 7 seconds to open where it had taken about 5). Not done: a `ToUnicode` or CID map keyed by code length (a one-byte `<20>` and a two-byte `<0020>` share an entry in ToUnicode), ActualText given only through the structure tree, MacExpert as a base encoding, codes of three or four bytes, and type with no font program in the file, which is still left out and named.
+
+### src/io/pdf-read.ts, src/io/fonts.ts · right-to-left type from a PDF is stored in reading order
+- refers-to: src/io/pdf-read.ts :: readingOrder, rtl, hasRtl, FORMS, MIRROR, show (turned), MARKS; src/io/fonts.ts :: resolveScriptFace
+- kind: fix
+- logged: v0.62.0 · 2026-11-26
+
+A PDF writes a line's glyphs left to right, so Arabic and Hebrew arrive in the order they are seen, not the order they are read. While type was drawn one character at a time that looked right by accident. With bidirectional layout the same string was laid out as right-to-left text and every word came out mirrored: seen on the public `ArabicCIDTrueType.pdf` the moment the two changes met. `readingOrder` turns a run that holds Hebrew or Arabic into reading order: when the rightmost strong character is right-to-left the whole run is reversed and its Latin words and numbers are put back; otherwise only the right-to-left stretches are reversed, with the numbers inside them put back. Brackets that end up inside a reversed stretch are mirrored, and the wide-space spans keep their places. Text supplied by ActualText is already in reading order and is not touched.
+
+Arabic presentation forms (the file's ToUnicode often gives them) are spelt as their base letters only when every one in the run has the neighbour its form calls for, read from the order of the forms in the Unicode block (isolated, final, initial, medial). A run that is one glyph of a word, as a browser's print to PDF writes them, keeps its forms: spelt as base letters, each lone glyph would be drawn in its isolated form, which is what a first attempt did to a browser-printed page. A run with a ligature of Presentation Forms-A keeps its forms too.
+
+`MARKS` now holds code points, not literal combining characters, so the table can be read and edited. `resolveScriptFace` no longer asks the engine for the chosen font when the font listing says it is not installed (a 404 in the console for every style of a substituted font).
+
+Seen in the built window: the public Arabic file reads "انواع الخطوط العربية" word by word, as `pdftotext` gives it, and draws joined; a page printed to PDF from a browser with Arabic, Hebrew and mixed lines looks as it did in 0.61.0; 27 other PDFs are unchanged. Not done: a file that places each letter with its own operator still opens as one object per letter, as before, so its Arabic is not one editable word; mixed lines are put in reading order by this rule of thumb, not by undoing the full bidirectional algorithm.
diff --git a/frontend/src/io/fonts.ts b/frontend/src/io/fonts.ts
index cc682c7..9ce1d98 100644
--- a/frontend/src/io/fonts.ts
+++ b/frontend/src/io/fonts.ts
@@ -637,9 +637,9 @@ interface ScriptFace { font: Font; style: CharStyle }
const scriptFaces = new Map(), facesPending = new Set();
async function resolveScriptFace(st: CharStyle, script: string, ch: string): Promise {
const ok = (f: Font | null): f is Font => !!f && isSfnt(f) && covers(f, ch) > 0;
- const own = await fontFor(st.font, st.style).catch(() => null);
- if (ok(own)) return { font: own, style: st };
const have = installedNames(await systemFonts().catch((): FontInfo[] => []));
+ const own = !have.size || have.has(st.font.toLowerCase()) ? await fontFor(st.font, st.style).catch(() => null) : null;
+ if (ok(own)) return { font: own, style: st };
for (const fam of (SCRIPT_FONTS[script] ?? []).filter((f) => f !== st.font && (!have.size || have.has(f.toLowerCase())))) {
const f = await fontFor(fam, st.style).catch(() => null);
if (ok(f)) return { font: f, style: { ...st, font: fam, axes: undefined } };
diff --git a/frontend/src/io/pdf-read.ts b/frontend/src/io/pdf-read.ts
index 5b02749..c2cf0c2 100644
--- a/frontend/src/io/pdf-read.ts
+++ b/frontend/src/io/pdf-read.ts
@@ -315,7 +315,7 @@ const JOINS: Join[] = ['miter', 'round', 'bevel'];
const WIN: Record = { 128: '€', 130: '‚', 131: 'ƒ', 132: '„', 133: '…', 134: '†', 135: '‡', 136: 'ˆ', 137: '‰', 138: 'Š', 139: '‹', 140: 'Œ', 142: 'Ž', 145: '‘', 146: '’', 147: '“', 148: '”', 149: '•', 150: '–', 151: '\u2014', 152: '˜', 153: '™', 154: 'š', 155: '›', 156: 'œ', 158: 'ž', 159: 'Ÿ' };
const GLYPH: Record = { space: ' ', exclam: '!', quotedbl: '"', numbersign: '#', dollar: '$', percent: '%', ampersand: '&', quotesingle: "'", quoteright: '’', quoteleft: '‘', parenleft: '(', parenright: ')', asterisk: '*', plus: '+', comma: ',', hyphen: '-', minus: '−', period: '.', slash: '/', zero: '0', one: '1', two: '2', three: '3', four: '4', five: '5', six: '6', seven: '7', eight: '8', nine: '9', colon: ':', semicolon: ';', less: '<', equal: '=', greater: '>', question: '?', at: '@', bracketleft: '[', backslash: '\\', bracketright: ']', asciicircum: '^', underscore: '_', grave: '`', braceleft: '{', bar: '|', braceright: '}', asciitilde: '~', bullet: '•', endash: '–', emdash: '\u2014', quotedblleft: '“', quotedblright: '”', fi: 'fi', fl: 'fl', ff: 'ff', ffi: 'ffi', ffl: 'ffl', ellipsis: '…', copyright: '©', registered: '®', trademark: '™', degree: '°', dagger: '†', daggerdbl: '‡', section: '§', paragraph: '¶', periodcentered: '·', guillemotleft: '«', guillemotright: '»', nbspace: ' ' };
-const MARKS: Record = { grave: '̀', acute: '́', circumflex: '̂', tilde: '̃', macron: '̄', breve: '̆', dotaccent: '̇', dieresis: '̈', ring: '̊', hungarumlaut: '̋', caron: '̌', cedilla: '̧', ogonek: '̨', commaaccent: '̧' };
+const MARKS: Record = { grave: 0x300, acute: 0x301, circumflex: 0x302, tilde: 0x303, macron: 0x304, breve: 0x306, dotaccent: 0x307, dieresis: 0x308, ring: 0x30a, hungarumlaut: 0x30b, caron: 0x30c, cedilla: 0x327, ogonek: 0x328, commaaccent: 0x327 };
const LETTERS: Record = { AE: 'Æ', ae: 'æ', OE: 'Œ', oe: 'œ', Oslash: 'Ø', oslash: 'ø', Lslash: 'Ł', lslash: 'ł', Eth: 'Ð', eth: 'ð', Thorn: 'Þ', thorn: 'þ', germandbls: 'ß', dotlessi: 'ı', Dcroat: 'Đ', dcroat: 'đ', exclamdown: '¡', questiondown: '¿', cent: '¢', sterling: '£', yen: '¥', Euro: '€', currency: '¤', florin: 'ƒ', multiply: '×', divide: '÷', plusminus: '±', mu: 'µ', ordfeminine: 'ª', ordmasculine: 'º', quotesinglbase: '‚', quotedblbase: '„', guilsinglleft: '‹', guilsinglright: '›', perthousand: '‰', fraction: '⁄', onequarter: '¼', onehalf: '½', threequarters: '¾', onesuperior: '¹', twosuperior: '²', threesuperior: '³', brokenbar: '¦', logicalnot: '¬', dieresis: '¨', acute: '´', cedilla: '¸', macron: '¯', circumflex: 'ˆ', tilde: '˜', caron: 'ˇ', breve: '˘', dotaccent: '˙', ring: '˚', ogonek: '˛', hungarumlaut: '˝', Scommaaccent: 'Ș', scommaaccent: 'ș', Tcommaaccent: 'Ţ', tcommaaccent: 'ţ' };
function glyphChar(name: string): string {
@@ -325,7 +325,7 @@ function glyphChar(name: string): string {
const u = /^uni([0-9A-Fa-f]{4})$/.exec(name) ?? /^u([0-9A-Fa-f]{4,6})$/.exec(name);
if (u) { const cp = parseInt(u[1], 16); return cp < 32 || cp > 0x10ffff || (cp >= 0xd800 && cp <= 0xf8ff) || cp >= 0xf0000 ? '' : String.fromCodePoint(cp); }
const m = /^([A-Za-z]|dotlessi)([a-z]+)$/.exec(name), mark = m ? MARKS[m[2]] : undefined;
- if (m && mark) { const made = ((m[1] === 'dotlessi' ? 'i' : m[1]) + mark).normalize('NFC'); if (made.length === 1) return made; }
+ if (m && mark) { const made = ((m[1] === 'dotlessi' ? 'i' : m[1]) + String.fromCharCode(mark)).normalize('NFC'); if (made.length === 1) return made; }
if (name.includes('_')) { const parts = name.split('.')[0].split('_').map(glyphChar); return parts.every(Boolean) ? parts.join('') : ''; }
const base = name.split('.')[0];
return base !== name ? glyphChar(base) : '';
@@ -841,16 +841,18 @@ class Painter {
return next;
}
const act = this.actual;
- if (act && lost && act.t.trim()) { if (act.used) return next; act.used = true; text = act.t; ink = adv; lost = 0; gaps.clear(); }
+ const spoken = !!act && lost > 0 && !!act.t.trim();
+ if (act && spoken) { if (act.used) return next; act.used = true; text = act.t; ink = adv; lost = 0; gaps.clear(); }
if (lost && (await this.shapes(f, glyphs, gs, start, size))) return next;
if (lost) this.skipped.add(`characters of type in ${f.shown} that the file gives no Unicode value for`);
if (!text.trim()) return next;
const xf = mul(gs.ctm, mul(start, [gs.th, 0, 0, -1, 0, gs.rise]));
const filled = gs.tr === 1 || gs.tr === 5 ? NONE : gs.fill, stroked = gs.tr === 1 || gs.tr === 2 || gs.tr === 5 || gs.tr === 6 ? gs.stroke : NONE;
const base: CharStyle = { ...DEFAULT_CHAR, font: f.family, style: f.style, size, fill: filled, stroke: stroked, strokeWidth: stroked.type === 'none' ? 0 : gs.lw, tracking: gs.tc ? Math.round((gs.tc / Math.max(0.01, size)) * 1000) : 0 };
- const body = text.replace(/\s+$/, ''), space = emOf(cssFont(base, 100), ' '), spans: Span[] = [];
+ const turned = hasRtl(text) && !spoken ? readingOrder(text.replace(/\s+$/, ''), gaps) : null;
+ const body = turned ? turned.text : text.replace(/\s+$/, ''), space = emOf(cssFont(base, 100), ' '), spans: Span[] = [];
let from = 0;
- for (const [at, em] of gaps) {
+ for (const [at, em] of turned ? turned.gaps : gaps) {
if (at >= body.length) break;
if (at > from) spans.push({ text: body.slice(from, at), style: base });
spans.push({ text: ' ', style: { ...base, tracking: Math.round((em - space) * 1000) } });
@@ -1282,6 +1284,49 @@ function outlineOf(cmds: Array): PathData {
return out;
}
+const MIRROR: Record = { '(': ')', ')': '(', '[': ']', ']': '[', '{': '}', '}': '{', '<': '>', '>': '<' };
+const rtl = (c: string): boolean => { const u = c.charCodeAt(0); return (u >= 0x590 && u <= 0x8ff) || (u >= 0xfb1d && u <= 0xfdff) || (u >= 0xfe70 && u <= 0xfefc); };
+const hasRtl = (s: string): boolean => { for (let i = 0; i < s.length; i++) if (rtl(s[i])) return true; return false; };
+const FORMS = new Map();
+for (let q = 0xfe80, base = '', k = 0; q <= 0xfefc; q++) { const c = String.fromCharCode(q), b = c.normalize('NFKC'); k = b === base ? k + 1 : 0; base = b; FORMS.set(c, k); }
+
+function readingOrder(seen: string, gaps: Map): { text: string; gaps: Map } {
+ const cps = Array.from(seen), n = cps.length, kind = cps.map((c) => (rtl(c) ? 2 : /\p{Nd}/u.test(c) ? 1 : /\p{L}/u.test(c) ? 3 : /\s/.test(c) ? 4 : 0)), order = cps.map((_, i) => i), turn = cps.map(() => false);
+ const flip = (a: number, b: number): void => { for (; a < b; a++, b--) { const t = order[a]; order[a] = order[b]; order[b] = t; } };
+ const spans = (lo: number, hi: number, is: (k: number) => boolean, mid: (k: number) => boolean, each: (a: number, b: number) => void): void => {
+ for (let a = lo; a <= hi; a++) {
+ if (!is(kind[order[a]])) continue;
+ let b = a;
+ for (let c = a + 1; c <= hi && (is(kind[order[c]]) || mid(kind[order[c]])); c++) if (is(kind[order[c]])) b = c;
+ each(a, b);
+ a = b;
+ }
+ };
+ let strong = 0;
+ for (let i = n - 1; i >= 0 && !strong; i--) if (kind[i] === 2 || kind[i] === 3) strong = kind[i];
+ const back = (a: number, b: number): void => { flip(a, b); for (let i = a; i <= b; i++) turn[order[i]] = false; };
+ if (strong === 2) {
+ flip(0, n - 1);
+ turn.fill(true);
+ spans(0, n - 1, (k) => k === 1 || k === 3, (k) => k === 0 || k === 4, (a, b) => { if (order.slice(a, b + 1).some((i) => kind[i] === 3)) back(a, b); else spans(a, b, (k) => k === 1, (k) => k === 0, back); });
+ } else {
+ spans(0, n - 1, (k) => k === 2, (k) => k !== 3, (a, b) => { flip(a, b); for (let i = a; i <= b; i++) turn[order[i]] = true; spans(a, b, (k) => k === 1, (k) => k === 0, flip); });
+ }
+ const from: number[] = [], to: number[] = [], out = new Map();
+ let at = 0, text = '';
+ for (const c of cps) { from.push(at); at += c.length; }
+ const whole = !order.some((i, p) => {
+ const u = cps[i].charCodeAt(0), form = FORMS.get(cps[i]);
+ if (u >= 0xfb50 && u <= 0xfdff) return true;
+ if (form === undefined) return false;
+ const before = p > 0 && kind[order[p - 1]] === 2, after = p + 1 < n && kind[order[p + 1]] === 2;
+ return ((form === 1 || form === 3) && !before) || ((form === 2 || form === 3) && !after);
+ });
+ for (const i of order) { to[i] = text.length; text += turn[i] && MIRROR[cps[i]] ? MIRROR[cps[i]] : whole && kind[i] === 2 && cps[i].charCodeAt(0) >= 0xfb1d ? cps[i].normalize('NFKC') : cps[i]; }
+ for (const [old, em] of [...gaps].map(([g, em]) => [to[from.indexOf(g)], em]).filter(([g]) => g !== undefined).sort((x, y) => x[0] - y[0])) out.set(old, em);
+ return { text, gaps: out };
+}
+
const codeBytes = (space: number[][], b: Uint8Array, i: number): number => (space.some((s) => s[0] === 1 && b[i] >= s[1] && b[i] <= s[2]) ? 1 : space.some((s) => s[0] === 2) && i + 1 < b.length ? 2 : 1);
function parseCidMap(src: string, use: string): CidMap | null {
From 9e665f0dc95a2435fd9804cd81908640c5c698e3 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 16:06:46 -0500
Subject: [PATCH 53/74] docs(log): the reasons behind the 0.62.0 shaping,
shell, launcher and dock changes
---
backend/HASHOUT_LOG.md | 30 +++++++++++++++++++++
frontend/HASHOUT_LOG.md | 60 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 90 insertions(+)
diff --git a/backend/HASHOUT_LOG.md b/backend/HASHOUT_LOG.md
index bf2e891..da90907 100644
--- a/backend/HASHOUT_LOG.md
+++ b/backend/HASHOUT_LOG.md
@@ -1004,3 +1004,33 @@ A font with CFF2 outlines (the variable builds of Source Han and Noto CJK among
`POST /api/fonts/outlines` takes a third kind, `code`, for a PDF's one-byte fonts, with `enc`: the base encoding's name, whether the font is flagged symbolic, and the `Differences` names by code. The answer holds an outline for each of the 256 codes that has one and, in `chars`, the character of each whose glyph name has a Unicode value in the Adobe glyph list (private use and control values are left out; the Latin ligatures are spelt as their letters). Finding the glyph follows the PDF rules: for a Type 1 or name-keyed CFF program the `Differences` name, then the base encoding's name, then the program's own encoding; for a TrueType program the name's Unicode value through the Unicode cmap, the Macintosh cmap, or the glyph's own name, and for a symbolic one the (3,0) cmap at 0xF000 plus the code first, then the (1,0) cmap.
Type 1 programs (`FontFile`) are read with fontTools' `t1Lib` from memory: PFB segment headers are taken off, the encrypted part is found and the font parsed without a file on disk. A TrueType program whose `hmtx` table is cut short, which subsetters produce, no longer fails: its glyphs are drawn straight from `glyf`. Run directly on the embedded programs of 13 public PDFs (Type 1, Type 1C, multiple master, TrueType with and without a cmap) and through the window. A Type 1 font is a small PostScript program; fontTools reads it with its own limited interpreter, every failure is caught and answered as 422, and the 64 MiB limit applies.
+
+### src-tauri/src/opened.rs, src-tauri/src/launch_args.rs, src-tauri/src/main.rs, frontend/src/app.ts · files the system opens with formpath reach the window
+- refers-to: src-tauri/src/opened.rs :: Opened, arrive, bring_forward, opened_take, opened_read; src-tauri/src/launch_args.rs :: program_end, paths, own; src-tauri/src/main.rs :: main; src-tauri/build.rs :: APP_COMMANDS; src-tauri/capabilities/default.json; frontend/src/app.ts :: startApp (openedByShell)
+- kind: fix
+- logged: v0.62.0 · 2026-11-26
+
+The `.fpth` association was declared, but the shell never read the path the system hands over, and a second launch started a second engine that stopped because the first holds the data folder ("FormPath could not start: another copy of its engine holds its data folder."). Both were reproduced with the untouched binary. The shell now queues paths from three places: the launch arguments; a second launch, forwarded by tauri-plugin-single-instance 2.5.5 on Windows and Linux (Apache-2.0 or MIT; 33 new crates, all MIT or Apache-2.0, zbus on Linux; `Cargo.lock` was refreshed by cargo and only gained entries); and `RunEvent::Opened` on macOS, where the system already delivers files to the running app. `arrive` adds to the queue and, when the main window exists, calls `window.formpathOpened()`; `bring_forward` unminimizes and focuses only after the splash is gone. The window pulls the queue after `offerRecovery()` settles, so a restored session is not skipped, and opens each file through the existing `openFiles`; errors are the normal toast. `opened_read(id)` returns raw bytes and reads only paths the system handed over, never a path the page names. `launch_args` drops flags (anything that starts with `-`, `-psn_` included) and joins relative paths to the launch's working folder. `program_end` rebuilds the program path from `current_exe`: the Tauri 2.12.1 NSIS template registers the open command with the program path unquoted, and Rust's parser ends the program name at the first space, so `C:\Program Files\...` would otherwise become extra arguments.
+
+Seen on Linux (debug build, Xvfb, the real engine, the window title read with `xwininfo`): a project, a relative path, a path with spaces and Chinese in its folder and name, a second launch while the window was ready and while it was on the splash (it exits in under a second and the project opens in the first window), a missing path, a text file and a broken project (three toasts), ignored flags, and an SVG argument. `cargo check` and `clippy` are clean on Linux and for `x86_64-pc-windows-gnu` apart from one older warning in `check_for_updates`; `aarch64-apple-darwin` type-checks with its C dependencies stubbed. Not run: the Windows shell (no WebView2 here), the macOS shell and its Opened event. With no D-Bus session the plugin starts normally. After an update restart the app would get its original arguments again and reopen the file; the updater is off today. `fileAssociations` stays `.fpth` only.
+
+### src-tauri/tauri.conf.json, src-tauri/linux/formpath.desktop, src-tauri/linux/formpath-mime.xml · Linux packages pass the file and name the type
+- refers-to: src-tauri/tauri.conf.json :: bundle.linux
+- kind: fix
+- logged: v0.62.0 · 2026-11-26
+
+The pinned CLI 2.12.1 writes `Exec={{exec}}` with no `%F` and installs no MIME definition, so a double click on Linux never passed the file. A desktop template with `%F` and a shared-mime-info file that maps `*.fpth` to `application/x-formpath` are now used by the deb and rpm packages (the AppImage uses the deb template). Checked with a deb built by the pinned CLI, unpacked into a scratch XDG folder: `gio info` reports `application/x-formpath`, and `gio open`, which is what a file manager does, starts formpath with the path and the window title shows the project.
+
+### formpath.bat, setup/bat_args.py · arguments reach the Python commands as typed
+- refers-to: formpath.bat :: PYS, the command table; setup/bat_args.py
+- kind: fix
+- logged: v0.62.0 · 2026-11-26
+
+The `%1` and `shift` loop split arguments at `=`, `,` and `;`, stopped at an empty `""`, and its `set "REST=%REST% %1"` ran the text after `&` in a quoted argument. `call` then expanded `%` a second time and doubled `^` inside quotes. The Python commands (mcp, mcpb, i18n, cli, claude, agents) now chain to `python.bat` without `call` and pass `%*` unchanged; `bat_args.py` changes to the repository root, drops the command word and runs the script with `runpy`. install, desktop, counts and clean get `%2` to `%9`; they only read flag words. Checked under Wine 9.0 with code page 950 and a compiled argument printer standing in for `python.exe`: `key=value`, `a,b;c`, an empty argument, quoted `&`, `|`, `<`, `>`, `!`, `^` and Chinese arrive whole, and `"x&pwn"` no longer runs `pwn.bat`. The `%` cases and exit codes are reasoned only: Wine's `cmd` expands substituted text again and loses batch exit codes, which real `cmd.exe` does not. An argument that ends inside an open quote still gets one trailing space from `python.bat`. Not run on Windows.
+
+### app/services/agent_shim.py, app/services/claude_code.py, setup/claude_launch.py · agent programs start without the command interpreter
+- refers-to: app/services/agent_shim.py :: npm_target, unshim, through_cmd, plain; app/services/claude_code.py :: _direct, _wrap, argv, _chat_argv, _feed, _run; setup/claude_launch.py :: lookup, main
+- kind: fix
+- logged: v0.62.0 · 2026-11-26
+
+On Windows a program installed by npm is a `.cmd` shim that ran through `cmd /c`, which cuts a command line at a line break and acts on `%`, `&` and quotes in it; `list2cmdline` leaves an argument without spaces unquoted, so a message of `x&pwn` ran `pwn`. A shim of the current npm template is now read and started as `node` and its script, or as the `.exe` it points at; only that template is accepted. Where a program would still start through `cmd`, Chat gives the message on standard input as UTF-8, which the program reads as its prompt, and a terminal tab refuses a first message that `cmd` would change, with a sentence that says why. Nothing changes on macOS and Linux. Checked under Wine with shims written from the npm template and compiled stand-ins; on Linux with the tests' stand-in agent program, and with the real program against a local capture server, where the message as an argument and on standard input give the same bytes. Not run: real Windows, real `cmd.exe`, a real npm install on Windows. Left: the shim's PATHEXT change for `node`; typing a message into a running tab followed by Enter, where a line break sends the message early on every system. Shims made by other package managers fall to the standard input and refusal paths.
diff --git a/frontend/HASHOUT_LOG.md b/frontend/HASHOUT_LOG.md
index 601875f..85a58fc 100644
--- a/frontend/HASHOUT_LOG.md
+++ b/frontend/HASHOUT_LOG.md
@@ -5281,3 +5281,63 @@ Arabic presentation forms (the file's ToUnicode often gives them) are spelt as t
`MARKS` now holds code points, not literal combining characters, so the table can be read and edited. `resolveScriptFace` no longer asks the engine for the chosen font when the font listing says it is not installed (a 404 in the console for every style of a substituted font).
Seen in the built window: the public Arabic file reads "انواع الخطوط العربية" word by word, as `pdftotext` gives it, and draws joined; a page printed to PDF from a browser with Arabic, Hebrew and mixed lines looks as it did in 0.61.0; 27 other PDFs are unchanged. Not done: a file that places each letter with its own operator still opens as one object per letter, as before, so its Arabic is not one editable word; mixed lines are put in reading order by this rule of thumb, not by undoing the full bidirectional algorithm.
+
+### src/engine/text.ts, src/io/fonts.ts · complex scripts are shaped and runs follow the bidirectional algorithm
+- refers-to: src/engine/text.ts :: itemsOf, segmentsOf, visualOrder, partsShape, scriptOf; src/io/fonts.ts :: shapeComplex, scriptFace, loadShaper, SCRIPT_FONTS
+- kind: fix
+- logged: v0.62.0 · 2026-11-26
+
+Layout was one character at a time, so Arabic was isolated letters in left-to-right order, Hebrew ran backwards and Indic scripts were not shaped. Text that needs it is split into runs by bidi level and script; HarfBuzz (harfbuzzjs 1.6.4, MIT, WebAssembly, loaded only when a document has such text) shapes each run with the whole text as context; each cluster becomes one item drawn from outlines; lines are reordered by UAX 9 rules L1 and L2 through bidi-js 1.1.0 (MIT, Unicode 13 data). `align: left` stays left. Brackets the font lacks are mirrored when drawn. The face is the chosen font if it covers the script, else a list per script (Noto Naskh Arabic, Noto Sans Hebrew, Noto Sans Devanagari and others), else `GET /api/fonts/cover`.
+
+Text that needs neither shaping nor reordering is untouched: 3,608 layouts (164,251 glyph records: point, area, path and vertical type, tracking, the kerning modes, features, caps, justified lines, tabs and lists, in Latin, Greek, Cyrillic, Chinese, Japanese, Korean, unmarked Thai and emoji) are equal on the 0.61.0 tree and on this one. Against native HarfBuzz 15, 11 of 12 single-direction samples have the same glyph ids and positions; the twelfth differs only where bidi keeps digits left to right. bidi-js passes all 91,699 cases of BidiCharacterTest 13.0.0. Ink overlap with one browser `fillText` of the same string in the same font is 0.96 to 0.996 over 18 samples in Arabic, Persian, Urdu, Hebrew with and without points, Devanagari, Bengali, Tamil, Thai and mixed lines (0.11 to 0.95 before). The always-loaded bundle grows by 8,460 bytes; on demand, `harfbuzz.wasm` is 444,394 bytes, its script 42,161 and bidi-js 12,356. Nothing is fetched from outside the app.
+
+Not done: vertical type is not shaped; clusters the chosen font lacks fall back to drawing character by character; in a right-to-left paragraph list markers and tab stops stay on the left; no hyphenation or kashida justification for such text; tracking is suppressed inside joined Arabic words; small caps are ignored in shaped runs; a failed load of the shaper is not retried; the macOS and Windows font names in the script lists are untried.
+
+### src/engine/text.ts, src/ui/text-editor.ts · the caret on bidirectional lines
+- refers-to: src/engine/text.ts :: caretAt, indexAt, stepLine, stepVisual; src/ui/text-editor.ts :: key
+- kind: fix
+- logged: v0.62.0 · 2026-11-26
+
+The caret assumed that the order on screen is the order in the text. On a mixed-direction line `caretAt`, `indexAt` and `stepLine` work on cluster edges and each glyph's direction, and `stepVisual` drives the arrow keys so they move the way they point. The stored text stays in reading order, and a caret inside a ligature or cluster sits at its edge. Driven in the built window under 4x CPU throttling: typing, arrows, Shift with arrows, Backspace, inserting inside Arabic and Hebrew words, Home and End, a selection across a change of direction; the stored text was right each time and layout shift was 0. On a path the arrow keys still step in reading order.
+
+### src/io/pdf-text.ts, src/io/svg.ts, src/io/fonts.ts, src/io/dxf.ts · exports of shaped type
+- refers-to: src/io/pdf-text.ts :: LiveFonts.plan, liveStream; src/io/fonts.ts :: outlineText; src/io/svg.ts; src/io/dxf.ts :: exportDxf
+- kind: fix
+- logged: v0.62.0 · 2026-11-26
+
+PDF keeps live type: glyphs in the order they are seen, with ToUnicode; the mapping of a right-to-left ligature is stored reversed because poppler and PDFium both reverse it; ActualText is written only on left-to-right clusters (conjuncts, reordered vowels). SVG writes clusters as paths and the other glyphs of such a line one by one, because renderers reorder per-character positions. DXF and DWG outline shaped text instead of writing TEXT entities. Create Outlines and EPS draw the shaped pieces. Against the canvas: the PDF through `pdftoppm` overlaps 0.914, the SVG through rsvg 0.952. `pdftotext` gives Arabic and Devanagari in reading order. An export of Latin, Chinese, Japanese, Korean and Thai text is unchanged (SVG, EPS and DXF byte for byte after ids and dates are normalized; the PDF's objects equal as a set). In poppler, Hebrew points come out on a line of their own; PDFium keeps them in place. EPS was not rasterized (no Ghostscript here). PSD type layers carry the reading-order string; untried in Photoshop.
+
+### src/io/pdf-text.ts, src/io/pdf.ts · the person's own restricted font is outlined, with a note
+- refers-to: src/io/pdf-text.ts :: restricted, LiveFonts.withheld, LiveFonts.build; src/io/pdf.ts :: exportPdf
+- kind: fix
+- logged: v0.62.0 · 2026-11-26
+
+This reverses the 0.53.2 decision not to check the style's own font. `build` now fails every face whose `fsType` forbids embedding, so its type is drawn from the outlines `exportPdf` already made in that font. Families that are not fallbacks go into `withheld`, and `exportPdf` adds one note for each. `restricted` reads bits 1 to 3: bit 1 counts only when neither 4 nor 8 is set. That is the least-restrictive rule the OpenType specification states for OS/2 versions 0 to 2 and says applications may assume for later versions; it is applied to every version. Checked with fontTools copies of DejaVu Sans at `fsType` 2, 0 and 6 in the built window: `pdffonts` lists only the two permitted ones as embedded and `pdftoppm` draws all three lines; on 0.61.0 all three were embedded and nothing was said. Not done: the bitmap-only and no-subsetting bits, and Package, which still copies font files.
+
+### src/io/ai-legacy.ts · graphic style names in their own script
+- refers-to: src/io/ai-legacy.ts :: buildDefs
+- kind: fix
+- logged: v0.62.0 · 2026-11-26
+
+A style's name is shown through `psUni`; the `rd.styles` keys stay raw. Checked by putting UTF-8 names into a public sample's private data. The writer's title and gradient names still go through `ps`: all 22 public samples write them in plain ASCII, so the form for other scripts is still unknown, and guessing it could make a file Illustrator refuses.
+
+### src/i18n · the not-installed sentence of Find Similar Fonts
+- refers-to: src/i18n/keys.json; src/i18n/locales/*.json
+- kind: fix
+- logged: v0.62.0 · 2026-11-26
+
+"{0} is not installed on this computer" was added by hand as the last row of `keys.json` and of each of the 25 locales, in each file's own words for font and installed. The key starts with a placeholder, and `extract`'s CODEISH rule rejects strings that begin with `{`, so the next `extract` then `prune` will drop the row unless that rule changes. Still in English because they are built from parts the mechanism does not cover: the substitute-font export note, "Type the file gives no characters for was kept as shapes", the left-out item for glyph-number type, and the agent note about characters no font draws.
+
+### index.html, src/styles/dock-tokens.css · the terminal names Windows faces before the generic monospace
+- refers-to: index.html :: the dock pre-paint script (data-fp-win); src/styles/dock-tokens.css :: --dock-font-mono under :root[data-fp-win] and :lang(zh, zh-TW, ja, ko)
+- kind: fix
+- logged: v0.62.0 · 2026-11-26
+
+The shared dock module reads `--dock-font-mono`, and its stack had no Windows face, so Windows chose the face for Chinese, Japanese and Korean. The pre-paint script marks Windows with `data-fp-win`. Under that mark the stack keeps today's names, gains Consolas, then that language's Windows face (Microsoft YaHei, Microsoft JhengHei, Yu Gothic, Malgun Gothic), then the other three. macOS and Linux get the same token as before: Yu Gothic also exists on macOS and would have changed what it shows. `--font-mono` itself is unchanged. Seen in Chrome on Linux and with the platform emulated as Win32. Not run on Windows.
+
+### src/dock-adapter.ts · Escape that belongs to a composition leaves the guide open
+- refers-to: src/dock-adapter.ts :: imeEscape, formpathDock; src/dock/tour.ts :: Tour.onKey (read only)
+- kind: fix
+- logged: v0.62.0 · 2026-11-26
+
+The guide's capture-phase Escape listener in the shared module ignores composition, so closing an input method's candidates with Escape ended the guide. The module cannot be edited here. `imeEscape`, registered on window in the capture phase, acts only while `.ft-tour` is shown, only on Escape, only when the key belongs to a composition (`isComposing` or `keyCode` 229): it relabels that event's `key` as `Process`, the value Chrome on Windows already sends for such keys. Nothing is stopped or prevented; the terminal's own textarea still receives the event. Seen at 4x CPU throttling with DevTools compositions; typing Chinese still works in the terminal, Chat, the Type tool and a panel field. Remove it when the module carries the fix. Two findings in the module cannot be reached from outside and are open until the module changes: the dock taking focus from a field being typed in (seen: about 3 seconds after a slow start, focus left a Character field in mid-composition), and terminal widths for Unicode 11 (measured: emoji take 1 cell in the terminal against 2 in the C library). The change note for the module is in the planning sidecar.
From 921884f472b0d49e643c1bce3058e1b3df387ff2 Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 16:11:33 -0500
Subject: [PATCH 54/74] chore(release): 0.62.0
---
CHANGELOG.md | 19 +++++++++++++++++++
README.md | 4 ++--
backend/app/__init__.py | 2 +-
frontend/package-lock.json | 4 ++--
frontend/package.json | 2 +-
frontend/src/version.ts | 2 +-
src-tauri/Cargo.lock | 2 +-
src-tauri/Cargo.toml | 2 +-
src-tauri/tauri.conf.json | 2 +-
9 files changed, 29 insertions(+), 10 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a798cf8..4746122 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,25 @@
Versions follow `v*.*.*` with dots. Dates are UTC.
+## 0.62.0 · 2026-11-26
+
+The five things 0.61.0 left open under issue 17. Tried in a Chromium window on Linux, on the desktop app under a virtual display on Linux, on public files, and for the Windows parts under Wine; nothing in this release has run on real Windows or macOS, and no real input method has typed into it.
+
+- Arabic, Persian, Urdu, Hebrew, Devanagari, Bengali, Tamil and the other Indian scripts, Thai with marks, Khmer, Myanmar and Tibetan are joined, ligated and reordered, and right-to-left text reads right to left with numbers and brackets in place. When the chosen font does not have the script, an installed font that has it is used. The caret, clicks, selection and the arrow keys follow such text. Text in other scripts sets exactly as before.
+- Exporting such text: PDF, SVG, EPS and DXF look like the canvas, and text copied from the PDF comes out in reading order.
+- Opening a PDF: unreadable type in one-byte fonts is kept as shapes too. That is how LibreOffice writes Chinese, so a label like the one in issue 17 made that way is drawn, where 0.61.0 left it out. Type whose glyphs carry names that say nothing was shown as wrong characters and is now drawn as shapes. Fonts under a CMap inside the file are read, vertical metrics are followed, and a file's ActualText supplies the characters where it has them.
+- Opening a PDF: accented letters named in the file's own encoding are read ("Rozúčtování" lost five of its letters), and Arabic and Hebrew are stored in reading order.
+- Double clicking a project, or choosing Open With, opens it in FormPath, also when its name or folder is in Chinese or has spaces. It did nothing before. On Windows and Linux, opening a project while FormPath is running opens it in the running window instead of an error about the engine. A file that is missing or is not a project gives a clear message.
+- Windows: `formpath.bat` passes `key=value`, empty and quoted arguments to its commands as typed.
+- Windows: a Chat message with several lines, quotes, `%` or Chinese text reaches Claude Code whole, and can no longer start another program.
+- Windows: Chinese, Japanese and Korean text in the terminal panel uses the system's font for that language.
+- Pressing Escape to close an input method's suggestions no longer closes the panel guide.
+- Exporting a PDF: a font whose licence forbids embedding is no longer put into the file. Its type is drawn as shapes in that font, and the export says so.
+- Graphic style names in an .ai file show in their own script, and Find Similar Fonts says a font is not installed in your language.
+- New parts, all under MIT or Apache-2.0 and listed in NOTICE.md: harfbuzzjs and bidi-js for shaping (loaded only when a document has such text; nothing is fetched from outside the app), and the Tauri single-instance plugin on Windows and Linux.
+- Not in this release: vertical type is not shaped; a PDF that places every letter on its own, as a browser's print to PDF does, still opens as one object per letter; the terminal panel can still take the caret from a field after a slow start, and it measures emoji one cell too narrow (both are in the module the Form apps share, and a change note for it is written).
+- The three demos are not rebuilt and still say 0.59.0.
+
## 0.61.0 · 2026-11-26
The rest of issue 17: what 0.60.0 found and left. Tried on public PDFs of the pdf.js test corpus and on PDFs made here with real embedded Chinese fonts, in a Chromium window on Linux; nothing in this release has run on Windows or macOS yet, and no real input method has typed into it.
diff --git a/README.md b/README.md
index 684ad78..d75f44e 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@
-
+
@@ -120,7 +120,7 @@ In the window, Window > Terminal (or the Terminal button in the title bar) opens
- **Service:** a FastAPI engine for projects, fonts, file import and export, and the MCP endpoint at `/mcp`.
- **Desktop:** a Tauri 2 shell that starts the engine as a sidecar.
- **UI:** keyed DOM patching and a pre-paint theme boot, so changes do not flash or re-render.
-- **Size:** about 62,400 lines of TypeScript, 2,400 of CSS, 8,000 of Python and 700 of Rust (product code, tests excluded; `./formpath counts --check` verifies it).
+- **Size:** about 62,800 lines of TypeScript, 2,400 of CSS, 8,200 of Python and 800 of Rust (product code, tests excluded; `./formpath counts --check` verifies it).
- **Tested:** Vitest suites for `.fpth`, SVG, PDF, Pathfinder and type outlines, plus pytest suites for the engine guard, consent, MCP, versions and project files.
## Download
diff --git a/backend/app/__init__.py b/backend/app/__init__.py
index a076e5d..647040d 100644
--- a/backend/app/__init__.py
+++ b/backend/app/__init__.py
@@ -1 +1 @@
-__version__ = "0.61.0"
+__version__ = "0.62.0"
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index 39c29d6..fe07270 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "formpath",
- "version": "0.61.0",
+ "version": "0.62.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "formpath",
- "version": "0.61.0",
+ "version": "0.62.0",
"license": "Apache-2.0",
"dependencies": {
"@fontsource/inter": "5.3.0",
diff --git a/frontend/package.json b/frontend/package.json
index 3ed6b9b..f3caebe 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -1,7 +1,7 @@
{
"name": "formpath",
"private": true,
- "version": "0.61.0",
+ "version": "0.62.0",
"description": "formpath · vector illustration editor in the NodeMode style",
"license": "Apache-2.0",
"type": "module",
diff --git a/frontend/src/version.ts b/frontend/src/version.ts
index e4fe5c4..a9f07f5 100644
--- a/frontend/src/version.ts
+++ b/frontend/src/version.ts
@@ -1 +1 @@
-export const VERSION = '0.61.0';
+export const VERSION = '0.62.0';
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index 224281b..11f1f33 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -1093,7 +1093,7 @@ dependencies = [
[[package]]
name = "formpath"
-version = "0.61.0"
+version = "0.62.0"
dependencies = [
"objc2",
"objc2-app-kit",
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index e985cca..594c3d7 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "formpath"
-version = "0.61.0"
+version = "0.62.0"
description = "formpath desktop shell"
authors = ["nodemode-ai"]
license = "Apache-2.0"
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index d095995..76e5316 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "FormPath",
- "version": "0.61.0",
+ "version": "0.62.0",
"identifier": "ai.nodemode.formpath",
"build": {
"frontendDist": "../frontend/dist"
From e3dfd08357b630d70466b07512408b5d7c6872fd Mon Sep 17 00:00:00 2001
From: nodemode-ai
Date: Thu, 26 Nov 2026 17:22:20 -0500
Subject: [PATCH 55/74] fix(pdf): a line written one glyph at a time opens as a
line, and Chinese, Japanese and Korean type with no font in the file is read
by its character collection
---
NOTICE.md | 1 +
frontend/HASHOUT_LOG.md | 24 +
frontend/src/io/cmaps/Adobe-CNS1-UCS2.txt | 18303 +++++++++++++++++
frontend/src/io/cmaps/Adobe-GB1-UCS2.txt | 14268 +++++++++++++
frontend/src/io/cmaps/Adobe-Japan1-UCS2.txt | 19160 ++++++++++++++++++
frontend/src/io/cmaps/Adobe-KR-UCS2.txt | 12436 ++++++++++++
frontend/src/io/cmaps/Adobe-Korea1-UCS2.txt | 9265 +++++++++
frontend/src/io/pdf-read.ts | 115 +-
8 files changed, 73542 insertions(+), 30 deletions(-)
create mode 100644 frontend/src/io/cmaps/Adobe-CNS1-UCS2.txt
create mode 100644 frontend/src/io/cmaps/Adobe-GB1-UCS2.txt
create mode 100644 frontend/src/io/cmaps/Adobe-Japan1-UCS2.txt
create mode 100644 frontend/src/io/cmaps/Adobe-KR-UCS2.txt
create mode 100644 frontend/src/io/cmaps/Adobe-Korea1-UCS2.txt
diff --git a/NOTICE.md b/NOTICE.md
index e0868db..0b98462 100644
--- a/NOTICE.md
+++ b/NOTICE.md
@@ -22,6 +22,7 @@ The vector tool and panel icons in `frontend/src/ui/icons-vector.ts`, the app ic
| Inter, JetBrains Mono (via @fontsource) | SIL OFL 1.1 fonts, MIT packaging | bundled font files (latin, latin-ext, Greek, Cyrillic and Vietnamese subsets), also used for Create Outlines and as the fallback for characters a PDF's font lacks |
| paper.js 0.12.18 | MIT | the curve kernel behind Pathfinder, offset and simplify |
| opentype.js 2.0.0 | MIT | glyph outlines for type rendering, Create Outlines and PDF type |
+| Adobe mapping resources for PDF (pdf2unicode: Adobe-Japan1-UCS2, Adobe-GB1-UCS2, Adobe-CNS1-UCS2, Adobe-Korea1-UCS2, Adobe-KR-UCS2; adobe-type-tools/mapping-resources-pdf at 2dd5e53) | BSD-3-Clause (the notice is at the head of each file) | five unchanged text files in `frontend/src/io/cmaps/` that give the characters of Chinese, Japanese and Korean type in a PDF that names a standard character collection and has no Unicode table of its own; each is loaded only when such a PDF is opened |
| harfbuzzjs 1.6.4 (HarfBuzz compiled to WebAssembly) | MIT (HarfBuzz itself: Old MIT) | shaping of Arabic, Hebrew, Indic, Thai and other scripts that join, reorder or stack; its `harfbuzz.wasm` is bundled and loaded only when a document has such text |
| bidi-js 1.1.0 (Jason Johnston) | MIT | the Unicode Bidirectional Algorithm (Unicode 13 data) for right-to-left and mixed-direction type; loaded with harfbuzzjs. Its declared dependency require-from-string 2.0.2 (MIT) is installed but not bundled |
| @tauri-apps/api | Apache-2.0 or MIT | native menus on macOS |
diff --git a/frontend/HASHOUT_LOG.md b/frontend/HASHOUT_LOG.md
index 85a58fc..b76f1f6 100644
--- a/frontend/HASHOUT_LOG.md
+++ b/frontend/HASHOUT_LOG.md
@@ -5341,3 +5341,27 @@ The shared dock module reads `--dock-font-mono`, and its stack had no Windows fa
- logged: v0.62.0 · 2026-11-26
The guide's capture-phase Escape listener in the shared module ignores composition, so closing an input method's candidates with Escape ended the guide. The module cannot be edited here. `imeEscape`, registered on window in the capture phase, acts only while `.ft-tour` is shown, only on Escape, only when the key belongs to a composition (`isComposing` or `keyCode` 229): it relabels that event's `key` as `Process`, the value Chrome on Windows already sends for such keys. Nothing is stopped or prevented; the terminal's own textarea still receives the event. Seen at 4x CPU throttling with DevTools compositions; typing Chinese still works in the terminal, Chat, the Type tool and a panel field. Remove it when the module carries the fix. Two findings in the module cannot be reached from outside and are open until the module changes: the dock taking focus from a field being typed in (seen: about 3 seconds after a slow start, focus left a Character field in mid-composition), and terminal widths for Unicode 11 (measured: emoji take 1 cell in the terminal against 2 in the C library). The change note for the module is in the planning sidecar.
+
+### src/io/pdf-read.ts · runs that continue a line are gathered into the line
+- refers-to: src/io/pdf-read.ts :: Piece, Painter.show, typeset, place, close, pieces, open, run (its last line), readingOrder (spelt), show (the reversed ligature mapping)
+- kind: fix
+- logged: v0.63.0 · 2026-11-26
+
+A PDF made by a browser's print to PDF writes one glyph per show operator, each with its own position. Every letter became its own text object: a line of English was thirty objects, and an Arabic line was thirty isolated letters that the reading-order step could not put back into words. `show` now hands `place` a `Piece` (the characters as seen, the wide-space marks, the style, the matrix, where the ink and the advance end) instead of a finished node. `place` extends the line being gathered when the new piece starts where that line's advance ends (within 0.12 of the type size), on its baseline (within 0.02), with the same matrix and the same style; a piece of spaces only may come from another font, because browsers take the space from the first font of the stack. The joined piece is typeset again as one node, so reading order, the spelling of presentation forms and the fit to the file's width are worked out for the whole line. Runs with a gap between them, in another font or on another baseline stay separate objects, exactly as before.
+
+Joining lines into paragraphs moved from `place` to `close`, which runs when a line is finished: when the next piece does not continue it, and at the end of every content stream. The test and the result are the ones `place` had; only the moment changed, because a line must be whole before it can be compared with the line above it.
+
+Two things in the reading-order step were made finer because whole lines now reach it. Presentation forms are spelt as base letters word by word, not run by run, so one word with a ligature of Presentation Forms-A at its edge no longer keeps the whole line in forms; such a ligature inside a word is accepted. A glyph whose ToUnicode entry is several right-to-left characters (a ligature) has them in reading order while everything around it is in the order seen, so they are turned before the run is; without that the browser-printed page read "اهلل" for "الله", as `pdftotext` still does.
+
+Seen in the built window against an untouched 0.62.0 build, on every test PDF at hand (50): the browser-printed page with Arabic, Hebrew and English opens with its Latin line as one object and its first Arabic line as one line reading "السلام عليكم ورحمة الله", joined (0.62.0: one object per letter); the public Arabic file opens as four lines reading "انواع الخطوط العربية" (0.62.0: three words per line, one of them in presentation forms); a LibreOffice file's line of four runs is one line; two more files gather a contiguous pair. The others give the same objects and message. Not done: a line whose words are in different fonts (a browser falls back per character, so digits and commas inside Hebrew come from another font) is still several objects, because a piece carries one style; marks placed off the baseline end the line.
+
+### src/io/pdf-read.ts, src/io/cmaps · type with no font in the file and no Unicode table is read by its character collection
+- refers-to: src/io/pdf-read.ts :: CID_FILES, cidTable, FontInfo (collection, std), Painter.font, prepareFonts, show (named); src/io/cmaps/Adobe-Japan1-UCS2.txt, Adobe-GB1-UCS2.txt, Adobe-CNS1-UCS2.txt, Adobe-Korea1-UCS2.txt, Adobe-KR-UCS2.txt; NOTICE.md
+- kind: fix
+- logged: v0.63.0 · 2026-11-26
+
+The last case of unreadable PDF type that was left out with a sentence: a Chinese, Japanese or Korean font that is not in the file, under Identity-H or Identity-V, with no ToUnicode. There is nothing to draw from. But a font that is not embedded can only be shown by any reader if it names one of the standard character collections, and for those the meaning of each CID is published. The five tables of Adobe's `mapping-resources-pdf` (`pdf2unicode`, BSD-3-Clause, each file carrying its notice) are in `src/io/cmaps/` unchanged, each a separate chunk that is loaded only when a PDF needs it (147 to 294 kB each). `prepareFonts` loads the table for a Type0 font whose codes are CIDs, whose `CIDSystemInfo` ordering is Japan1, GB1, CNS1, Korea1 or KR, which has no ToUnicode and no font program; `show` then reads the character by CID. A CID the table maps to U+FFFD is still unreadable and still named.
+
+Deliberately not used when the font program is in the file: such type is kept as shapes, as since 0.61.0. Two public files claim the Japan1 collection for an embedded TrueType font whose codes are plainly its own glyph numbers (`arial_unicode_en_cidfont.pdf`, `vertical.pdf`); reading them by the collection would have turned English into wrong Japanese, and the shapes are exact.
+
+Seen: `noembed-identity.pdf` reads "あいうえお" where it had the left-out sentence, `noembed-identity-2.pdf` reads "あAbstract012" (poppler cannot draw either without its language pack); the two files above still open as shapes.
diff --git a/frontend/src/io/cmaps/Adobe-CNS1-UCS2.txt b/frontend/src/io/cmaps/Adobe-CNS1-UCS2.txt
new file mode 100644
index 0000000..d8265ce
--- /dev/null
+++ b/frontend/src/io/cmaps/Adobe-CNS1-UCS2.txt
@@ -0,0 +1,18303 @@
+%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (Adobe-CNS1-UCS2)
+%%Title: (Adobe-CNS1-UCS2 Adobe CNS1 7)
+%%Version: 15.000
+%%Copyright: -----------------------------------------------------------
+%%Copyright: Copyright 1990-2020 Adobe. All rights reserved.
+%%Copyright:
+%%Copyright: Redistribution and use in source and binary forms, with or
+%%Copyright: without modification, are permitted provided that the
+%%Copyright: following conditions are met:
+%%Copyright:
+%%Copyright: Redistributions of source code must retain the above
+%%Copyright: copyright notice, this list of conditions and the following
+%%Copyright: disclaimer.
+%%Copyright:
+%%Copyright: Redistributions in binary form must reproduce the above
+%%Copyright: copyright notice, this list of conditions and the following
+%%Copyright: disclaimer in the documentation and/or other materials
+%%Copyright: provided with the distribution.
+%%Copyright:
+%%Copyright: Neither the name of Adobe nor the names of its contributors
+%%Copyright: may be used to endorse or promote products derived from
+%%Copyright: this software without specific prior written permission.
+%%Copyright:
+%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+%%Copyright: -----------------------------------------------------------
+%%EndComments
+
+/CIDInit /ProcSet findresource begin
+
+12 dict begin
+
+begincmap
+
+/CIDSystemInfo 3 dict dup begin
+/Registry (Adobe) def
+/Ordering (Adobe_CNS1_UCS2) def
+/Supplement 7 def
+end def
+
+/CMapName /Adobe-CNS1-UCS2 def
+
+/CMapVersion 15.000 def
+/CMapType 2 def
+
+/XUID [1 10 25335 1212] def
+
+/WMode 0 def
+
+1 begincodespacerange
+ <0000>
+endcodespacerange
+
+100 beginbfchar
+<0000>
+<0060> <00a9>
+<0061> <2122>
+<0062> <2026>
+<0063> <3000>
+<0064>
+<0067>
+<0068> <2027>
+<0069>
+<006a>
+<006b>
+<006c>
+<006d>
+<006e> <2026>
+<006f> <2025>
+<0073> <00b7>
+<0078>
+<0079> <2013>
+<007a>
+<007b> <2014>
+<007c>
+<007d>
+<007e>
+<007f>
+<0084>
+<0085>
+<00ac> <2035>
+<00ad> <2032>
+<00ae>
+<00af>
+<00b0>
+<00b1> <203b>
+<00b2> <00a7>
+<00b3> <3003>
+<00b4> <25cb>
+<00b5> <25cf>
+<00b6> <25b3>
+<00b7> <25b2>
+<00b8> <25ce>
+<00b9> <2606>
+<00ba> <2605>
+<00bb> <25c7>
+<00bc> <25c6>
+<00bd> <25a1>
+<00be> <25a0>
+<00bf> <25bd>
+<00c0> <25bc>
+<00c1> <32a3>
+<00c2> <2105>
+<00c3> <00af>
+<00c4>
+<00c5>
+<00c6> <02cd>
+<00d0>
+<00d1>
+<00d2> <00d7>
+<00d3> <00f7>
+<00d4> <00b1>
+<00d5> <221a>
+<00d6>
+<00d7>
+<00d8>
+<00db> <2260>
+<00dc> <221e>
+<00dd> <2252>
+<00de> <2261>
+<00e4>
+<00e7> <22a5>
+<00e8> <2220>
+<00e9> <221f>
+<00ea> <22bf>
+<00eb> <33d2>
+<00ec> <33d1>
+<00ed> <222b>
+<00ee> <222e>
+<00ef> <2235>
+<00f0> <2234>
+<00f1> <2640>
+<00f2> <2642>
+<00f3> <2295>
+<00f4> <2299>
+<00f5> <2191>
+<00f6> <2193>
+<00f7> <2192>
+<00f8> <2190>
+<00fb> <2199>
+<00fc> <2198>
+<00fd> <2225>
+<00fe> <2223>
+<00ff>
+<0100>
+<0101>
+<0102>
+<0103>
+<0104>
+<0105> <3012>
+<0108>
+<0109>
+<010a> <2103>
+<010b> <2109>
+endbfchar
+
+100 beginbfchar
+<010f> <33d5>
+<0113> <33ce>
+<0114> <33a1>
+<0117> <33c4>
+<0118> <00b0>
+<0119> <5159>
+<011a> <515b>
+<011b> <515e>
+<011c> <515d>
+<011d> <5161>
+<011e> <5163>
+<011f> <55e7>
+<0120> <74e9>
+<0121> <7cce>
+<012a> <258f>
+<012b> <258e>
+<012c> <258d>
+<012d> <258c>
+<012e> <258b>
+<012f> <258a>
+<0130> <2589>
+<0131> <253c>
+<0132> <2534>
+<0133> <252c>
+<0134> <2524>
+<0135> <251c>
+<0136> <2594>
+<0137> <2500>
+<0138> <2502>
+<0139> <2595>
+<013a> <250c>
+<013b> <2510>
+<013c> <2514>
+<013d> <2518>
+<0140> <2570>
+<0141> <256f>
+<0142> <2550>
+<0143> <255e>
+<0144> <256a>
+<0145> <2561>
+<0148> <25e5>
+<0149> <25e4>
+<016a> <3038>
+<016b> <5344>
+<016c> <303a>
+<01f6> <02d9>
+<01f7> <02ca>
+<01f8> <02c7>
+<01f9> <02cb>
+<0218> <4e28>
+<0219> <4e36>
+<021a> <4e3f>
+<021b> <4e85>
+<021c> <4ea0>
+<021d> <5182>
+<021e> <5196>
+<021f> <51ab>
+<0220> <52f9>
+<0221> <5338>
+<0222> <5369>
+<0223> <53b6>
+<0224> <590a>
+<0225> <5b80>
+<0226> <5ddb>
+<0227> <5e7a>
+<0228> <5e7f>
+<0229> <5ef4>
+<022a> <5f50>
+<022b> <5f61>
+<022c> <6534>
+<022d> <65e0>
+<022e> <7592>
+<022f> <7676>
+<0230> <8fb5>
+<0231> <96b6>
+<0252> <2421>
+<0253> <4e00>
+<0254> <4e59>
+<0255> <4e01>
+<0256> <4e03>
+<0257> <4e43>
+<0258> <4e5d>
+<0259> <4e86>
+<025a> <4e8c>
+<025b> <4eba>
+<025c> <513f>
+<025d> <5165>
+<025e> <516b>
+<025f> <51e0>
+<0262> <529b>
+<0263> <5315>
+<0264> <5341>
+<0265> <535c>
+<0266> <53c8>
+<0267> <4e09>
+<0268> <4e0b>
+<0269> <4e08>
+<026a> <4e0a>
+<026b> <4e2b>
+<026c> <4e38>
+endbfchar
+
+100 beginbfchar
+<026d> <51e1>
+<026e> <4e45>
+<026f> <4e48>
+<0270> <4e5f>
+<0271> <4e5e>
+<0272> <4e8e>
+<0273> <4ea1>
+<0274> <5140>
+<0275> <5203>
+<0276> <52fa>
+<0277> <5343>
+<0278> <53c9>
+<0279> <53e3>
+<027a> <571f>
+<027b> <58eb>
+<027c> <5915>
+<027d> <5927>
+<027e> <5973>
+<0281> <5b53>
+<0282> <5bf8>
+<0283> <5c0f>
+<0284> <5c22>
+<0285> <5c38>
+<0286> <5c71>
+<0287> <5ddd>
+<0288> <5de5>
+<028c> <5dfe>
+<028d> <5e72>
+<028e> <5efe>
+<028f> <5f0b>
+<0290> <5f13>
+<0291> <624d>
+<0292> <4e11>
+<0293> <4e10>
+<0294> <4e0d>
+<0295> <4e2d>
+<0296> <4e30>
+<0297> <4e39>
+<0298> <4e4b>
+<0299> <5c39>
+<029a> <4e88>
+<029b> <4e91>
+<029c> <4e95>
+<029d> <4e92>
+<029e> <4e94>
+<029f> <4ea2>
+<02a0> <4ec1>
+<02a1> <4ec0>
+<02a2> <4ec3>
+<02a5> <4ecd>
+<02a8> <4ec4>
+<02a9> <5143>
+<02aa> <5141>
+<02ab> <5167>
+<02ae> <516c>
+<02af> <5197>
+<02b0> <51f6>
+<02b4> <52fb>
+<02b7> <5316>
+<02b8> <5339>
+<02b9> <5348>
+<02ba> <5347>
+<02bb> <5345>
+<02bc> <535e>
+<02bd> <5384>
+<02be> <53cb>
+<02bf> <53ca>
+<02c0> <53cd>
+<02c1> <58ec>
+<02c2> <5929>
+<02c3> <592b>
+<02c4> <592a>
+<02c5> <592d>
+<02c6> <5b54>
+<02c7> <5c11>
+<02c8> <5c24>
+<02c9> <5c3a>
+<02ca> <5c6f>
+<02cb> <5df4>
+<02cc> <5e7b>
+<02cd> <5eff>
+<02d0> <5fc3>
+<02d1> <6208>
+<02d2> <6236>
+<02d3> <624b>
+<02d4> <624e>
+<02d5> <652f>
+<02d6> <6587>
+<02d7> <6597>
+<02d8> <65a4>
+<02d9> <65b9>
+<02da> <65e5>
+<02db> <66f0>
+<02dc> <6708>
+<02dd> <6728>
+<02de> <6b20>
+<02df> <6b62>
+<02e0> <6b79>
+<02e1> <6bcb>
+<02e2> <6bd4>
+endbfchar
+
+100 beginbfchar
+<02e3> <6bdb>
+<02e4> <6c0f>
+<02e5> <6c34>
+<02e6> <706b>
+<02e7> <722a>
+<02e8> <7236>
+<02e9> <723b>
+<02ea> <7247>
+<02eb> <7259>
+<02ec> <725b>
+<02ed> <72ac>
+<02ee> <738b>
+<02ef> <4e19>
+<02f0> <4e16>
+<02f1> <4e15>
+<02f2> <4e14>
+<02f3> <4e18>
+<02f4> <4e3b>
+<02f5> <4e4d>
+<02f6> <4e4f>
+<02f7> <4e4e>
+<02f8> <4ee5>
+<02f9> <4ed8>
+<0300> <4ed9>
+<0301> <4ede>
+<0302> <5145>
+<0303> <5144>
+<0306> <51ac>
+<0309> <51f8>
+<030a> <520a>
+<030b> <52a0>
+<030c> <529f>
+<030f> <5317>
+<0310> <531d>
+<0311> <4edf>
+<0312> <534a>
+<0313> <5349>
+<0314> <5361>
+<0315> <5360>
+<0316> <536f>
+<0317> <536e>
+<0318> <53bb>
+<0319> <53ef>
+<031a> <53e4>
+<031b> <53f3>
+<031c> <53ec>
+<031d> <53ee>
+<031e> <53e9>
+<031f> <53e8>
+<0320> <53fc>
+<0321> <53f8>
+<0322> <53f5>
+<0323> <53eb>
+<0324> <53e6>
+<0325> <53ea>
+<0326> <53f2>
+<0327> <53f1>
+<0328> <53f0>
+<0329> <53e5>
+<032a> <53ed>
+<032b> <53fb>
+<032c> <56db>
+<032d> <56da>
+<032e> <5916>
+<032f> <592e>
+<0330> <5931>
+<0331> <5974>
+<0332> <5976>
+<0333> <5b55>
+<0334> <5b83>
+<0335> <5c3c>
+<0336> <5de8>
+<0337> <5de7>
+<0338> <5de6>
+<033b> <5e73>
+<033c> <5e7c>
+<033d> <5f01>
+<033e> <5f18>
+<033f> <5f17>
+<0340> <5fc5>
+<0341> <620a>
+<0344> <6252>
+<0345> <6251>
+<0346> <65a5>
+<0347> <65e6>
+<0348> <672e>
+<0349> <672c>
+<034c> <672d>
+<034d> <6b63>
+<034e> <6bcd>
+<034f> <6c11>
+<0350> <6c10>
+<0351> <6c38>
+<0352> <6c41>
+<0353> <6c40>
+<0354> <6c3e>
+<0355> <72af>
+<0356> <7384>
+<0357> <7389>
+<0358> <74dc>
+endbfchar
+
+100 beginbfchar
+<0359> <74e6>
+<035a> <7518>
+<035b> <751f>
+<0362> <758b>
+<0363> <767d>
+<0364> <76ae>
+<0365> <76bf>
+<0366> <76ee>
+<0367> <77db>
+<0368> <77e2>
+<0369> <77f3>
+<036a> <793a>
+<036b> <79be>
+<036c> <7a74>
+<036d> <7acb>
+<0372> <4e69>
+<0373> <4e99>
+<0374> <4ea4>
+<0375> <4ea6>
+<0376> <4ea5>
+<0377> <4eff>
+<0378> <4f09>
+<0379> <4f19>
+<037a> <4f0a>
+<037b> <4f15>
+<037c> <4f0d>
+<037f> <4f0f>
+<0380> <4ef2>
+<0381> <4ef6>
+<0382> <4efb>
+<0383> <4ef0>
+<0384> <4ef3>
+<0385> <4efd>
+<0386> <4f01>
+<0387> <4f0b>
+<0388> <5149>
+<0389> <5147>
+<038a> <5146>
+<038b> <5148>
+<038c> <5168>
+<038d> <5171>
+<038e> <518d>
+<038f> <51b0>
+<0390> <5217>
+<0393> <520e>
+<0394> <5216>
+<0395> <52a3>
+<0396> <5308>
+<0397> <5321>
+<0398> <5320>
+<039b> <5409>
+<039c> <540f>
+<039d> <540c>
+<039e> <540a>
+<039f> <5410>
+<03a0> <5401>
+<03a1> <540b>
+<03a2> <5404>
+<03a3> <5411>
+<03a4> <540d>
+<03a5> <5408>
+<03a6> <5403>
+<03a7> <540e>
+<03a8> <5406>
+<03a9> <5412>
+<03aa> <56e0>
+<03ab> <56de>
+<03ac> <56dd>
+<03ad> <5733>
+<03ae> <5730>
+<03af> <5728>
+<03b0> <572d>
+<03b1> <572c>
+<03b2> <572f>
+<03b3> <5729>
+<03b8> <5984>
+<03b9> <5978>
+<03ba> <5983>
+<03bb> <597d>
+<03bc> <5979>
+<03bd> <5982>
+<03be> <5981>
+<03c3> <5b85>
+<03c4> <5b89>
+<03c5> <5bfa>
+<03c6> <5c16>
+<03c7> <5c79>
+<03c8> <5dde>
+<03c9> <5e06>
+<03ca> <5e76>
+<03cb> <5e74>
+<03cc> <5f0f>
+<03cd> <5f1b>
+<03ce> <5fd9>
+<03cf> <5fd6>
+<03d0> <620e>
+<03d3> <6210>
+<03d4> <6263>
+<03d5> <625b>
+<03d6> <6258>
+endbfchar
+
+100 beginbfchar
+<03d7> <6536>
+<03d8> <65e9>
+<03d9> <65e8>
+<03de> <6709>
+<03df> <673d>
+<03e0> <6734>
+<03e1> <6731>
+<03e2> <6735>
+<03e3> <6b21>
+<03e4> <6b64>
+<03e5> <6b7b>
+<03e6> <6c16>
+<03e7> <6c5d>
+<03e8> <6c57>
+<03e9> <6c59>
+<03ec> <6c50>
+<03ed> <6c55>
+<03ee> <6c61>
+<03ef> <6c5b>
+<03f2> <7070>
+<03f3> <725f>
+<03f4> <725d>
+<03f5> <767e>
+<03f6> <7af9>
+<03f7> <7c73>
+<03f8> <7cf8>
+<03f9> <7f36>
+<03fa> <7f8a>
+<03fb> <7fbd>
+<03fc> <8001>
+<03fd> <8003>
+<03fe> <800c>
+<03ff> <8012>
+<0400> <8033>
+<0401> <807f>
+<0402> <8089>
+<0405> <81e3>
+<0406> <81ea>
+<0407> <81f3>
+<0408> <81fc>
+<0409> <820c>
+<040a> <821b>
+<040b> <821f>
+<040c> <826e>
+<040d> <8272>
+<040e> <827e>
+<040f> <866b>
+<0410> <8840>
+<0411> <884c>
+<0412> <8863>
+<0413> <897f>
+<0414> <9621>
+<0415> <4e32>
+<0416> <4ea8>
+<0417> <4f4d>
+<0418> <4f4f>
+<0419> <4f47>
+<041a> <4f57>
+<041b> <4f5e>
+<041c> <4f34>
+<041d> <4f5b>
+<041e> <4f55>
+<041f> <4f30>
+<0422> <4f3d>
+<0423> <4f3a>
+<0424> <4f38>
+<0425> <4f43>
+<0426> <4f54>
+<0427> <4f3c>
+<0428> <4f46>
+<0429> <4f63>
+<042a> <4f5c>
+<042b> <4f60>
+<042c> <4f2f>
+<042d> <4f4e>
+<042e> <4f36>
+<042f> <4f59>
+<0430> <4f5d>
+<0431> <4f48>
+<0432> <4f5a>
+<0433> <514c>
+<0434> <514b>
+<0435> <514d>
+<0436> <5175>
+<0439> <5225>
+<043a> <5224>
+<043d> <5228>
+<043e> <52ab>
+<0441> <52ac>
+<0442> <5323>
+<0443> <5373>
+<0444> <5375>
+<0445> <541d>
+<0446> <542d>
+<0447> <541e>
+<0448> <543e>
+<0449> <5426>
+<044a> <544e>
+<044b> <5427>
+<044c> <5446>
+endbfchar
+
+100 beginbfchar
+<044d> <5443>
+<044e> <5433>
+<044f> <5448>
+<0450> <5442>
+<0451> <541b>
+<0452> <5429>
+<0453> <544a>
+<0454> <5439>
+<0455> <543b>
+<0456> <5438>
+<0457> <542e>
+<045a> <5420>
+<045b> <543c>
+<045c> <5440>
+<045d> <5431>
+<045e> <542b>
+<045f> <541f>
+<0460> <542c>
+<0461> <56ea>
+<0462> <56f0>
+<0463> <56e4>
+<0464> <56eb>
+<0465> <574a>
+<0466> <5751>
+<0467> <5740>
+<0468> <574d>
+<0469> <5747>
+<046a> <574e>
+<046b> <573e>
+<046c> <5750>
+<046d> <574f>
+<046e> <573b>
+<046f> <58ef>
+<0470> <593e>
+<0471> <599d>
+<0472> <5992>
+<0473> <59a8>
+<0474> <599e>
+<0475> <59a3>
+<0476> <5999>
+<0477> <5996>
+<0478> <598d>
+<0479> <59a4>
+<047a> <5993>
+<047b> <598a>
+<047c> <59a5>
+<047d> <5b5d>
+<047e> <5b5c>
+<0481> <5b8c>
+<0482> <5b8b>
+<0483> <5b8f>
+<0484> <5c2c>
+<0487> <5c3f>
+<0488> <5c3e>
+<048b> <5c94>
+<048c> <5c8c>
+<048d> <5deb>
+<048e> <5e0c>
+<048f> <5e8f>
+<0490> <5e87>
+<0491> <5e8a>
+<0492> <5ef7>
+<0493> <5f04>
+<0494> <5f1f>
+<0495> <5f64>
+<0496> <5f62>
+<0497> <5f77>
+<0498> <5f79>
+<0499> <5fd8>
+<049a> <5fcc>
+<049b> <5fd7>
+<049c> <5fcd>
+<049d> <5ff1>
+<049e> <5feb>
+<049f> <5ff8>
+<04a0> <5fea>
+<04a1> <6212>
+<04a2> <6211>
+<04a3> <6284>
+<04a4> <6297>
+<04a5> <6296>
+<04a6> <6280>
+<04a7> <6276>
+<04a8> <6289>
+<04a9> <626d>
+<04aa> <628a>
+<04ab> <627c>
+<04ac> <627e>
+<04ad> <6279>
+<04ae> <6273>
+<04af> <6292>
+<04b0> <626f>
+<04b1> <6298>
+<04b2> <626e>
+<04b3> <6295>
+<04b4> <6293>
+<04b5> <6291>
+<04b6> <6286>
+<04b7> <6539>
+<04b8> <653b>
+endbfchar
+
+100 beginbfchar
+<04b9> <6538>
+<04ba> <65f1>
+<04bb> <66f4>
+<04bc> <675f>
+<04c1> <675c>
+<04c2> <6756>
+<04c3> <675e>
+<04c4> <6749>
+<04c5> <6746>
+<04c6> <6760>
+<04c7> <6753>
+<04c8> <6757>
+<04c9> <6b65>
+<04ca> <6bcf>
+<04cb> <6c42>
+<04cc> <6c5e>
+<04cd> <6c99>
+<04ce> <6c81>
+<04d1> <6c85>
+<04d2> <6c9b>
+<04d3> <6c6a>
+<04d4> <6c7a>
+<04d5> <6c90>
+<04d6> <6c70>
+<04d7> <6c8c>
+<04d8> <6c68>
+<04d9> <6c96>
+<04da> <6c92>
+<04db> <6c7d>
+<04dc> <6c83>
+<04dd> <6c72>
+<04de> <6c7e>
+<04df> <6c74>
+<04e0> <6c86>
+<04e1> <6c76>
+<04e2> <6c8d>
+<04e3> <6c94>
+<04e4> <6c98>
+<04e5> <6c82>
+<04e6> <7076>
+<04e9> <7078>
+<04ea> <7262>
+<04eb> <7261>
+<04ec> <7260>
+<04ed> <72c4>
+<04ee> <72c2>
+<04ef> <7396>
+<04f0> <752c>
+<04f1> <752b>
+<04f4> <7682>
+<04f5> <76ef>
+<04f6> <77e3>
+<04f7> <79c1>
+<04f8> <79c0>
+<04f9> <79bf>
+<04fa> <7a76>
+<04fb> <7cfb>
+<04fc> <7f55>
+<04fd> <8096>
+<04fe> <8093>
+<04ff> <809d>
+<0500> <8098>
+<0501> <809b>
+<0502> <809a>
+<0503> <80b2>
+<0504> <826f>
+<0505> <8292>
+<0506> <828b>
+<0507> <828d>
+<0508> <898b>
+<0509> <89d2>
+<050a> <8a00>
+<050b> <8c37>
+<050c> <8c46>
+<050d> <8c55>
+<050e> <8c9d>
+<050f> <8d64>
+<0510> <8d70>
+<0511> <8db3>
+<0512> <8eab>
+<0513> <8eca>
+<0514> <8f9b>
+<0515> <8fb0>
+<0516> <8fc2>
+<0517> <8fc6>
+<0518> <8fc5>
+<0519> <8fc4>
+<051a> <5de1>
+<051b> <9091>
+<051c> <90a2>
+<051d> <90aa>
+<051e> <90a6>
+<051f> <90a3>
+<0520> <9149>
+<0521> <91c6>
+<0522> <91cc>
+<0523> <9632>
+<0524> <962e>
+<0525> <9631>
+<0526> <962a>
+endbfchar
+
+100 beginbfchar
+<0527> <962c>
+<0528> <4e26>
+<0529> <4e56>
+<052a> <4e73>
+<052b> <4e8b>
+<052c> <4e9b>
+<052d> <4e9e>
+<0530> <4f6f>
+<0531> <4f9d>
+<0532> <4f8d>
+<0533> <4f73>
+<0534> <4f7f>
+<0535> <4f6c>
+<0536> <4f9b>
+<0537> <4f8b>
+<0538> <4f86>
+<0539> <4f83>
+<053a> <4f70>
+<053b> <4f75>
+<053c> <4f88>
+<053d> <4f69>
+<053e> <4f7b>
+<053f> <4f96>
+<0540> <4f7e>
+<0541> <4f8f>
+<0542> <4f91>
+<0543> <4f7a>
+<0544> <5154>
+<0545> <5152>
+<0546> <5155>
+<0547> <5169>
+<0548> <5177>
+<0549> <5176>
+<054a> <5178>
+<054b> <51bd>
+<054c> <51fd>
+<054d> <523b>
+<054e> <5238>
+<054f> <5237>
+<0550> <523a>
+<0551> <5230>
+<0552> <522e>
+<0553> <5236>
+<0554> <5241>
+<0555> <52be>
+<0556> <52bb>
+<0557> <5352>
+<0558> <5354>
+<0559> <5353>
+<055a> <5351>
+<055b> <5366>
+<055f> <53d6>
+<0560> <53d4>
+<0561> <53d7>
+<0562> <5473>
+<0563> <5475>
+<0564> <5496>
+<0565> <5478>
+<0566> <5495>
+<0567> <5480>
+<0568> <547b>
+<0569> <5477>
+<056a> <5484>
+<056b> <5492>
+<056c> <5486>
+<056d> <547c>
+<056e> <5490>
+<056f> <5471>
+<0570> <5476>
+<0571> <548c>
+<0572> <549a>
+<0573> <5462>
+<0574> <5468>
+<0575> <548b>
+<0576> <547d>
+<0577> <548e>
+<0578> <56fa>
+<0579> <5783>
+<057a> <5777>
+<057b> <576a>
+<057c> <5769>
+<057d> <5761>
+<057e> <5766>
+<057f> <5764>
+<0580> <577c>
+<0581> <591c>
+<0582> <5949>
+<0585> <5944>
+<0586> <5954>
+<0587> <59be>
+<0588> <59bb>
+<0589> <59d4>
+<058a> <59b9>
+<058b> <59ae>
+<058c> <59d1>
+<058d> <59c6>
+<058e> <59d0>
+<058f> <59cd>
+<0590> <59cb>
+<0591> <59d3>
+endbfchar
+
+100 beginbfchar
+<0592> <59ca>
+<0593> <59af>
+<0594> <59b3>
+<0595> <59d2>
+<0596> <59c5>
+<0597> <5b5f>
+<0598> <5b64>
+<0599> <5b63>
+<059a> <5b97>
+<059b> <5b9a>
+<059c> <5b98>
+<059d> <5b9c>
+<059e> <5b99>
+<059f> <5b9b>
+<05a0> <5c1a>
+<05a1> <5c48>
+<05a4> <5cb7>
+<05a5> <5ca1>
+<05a6> <5cb8>
+<05a7> <5ca9>
+<05a8> <5cab>
+<05a9> <5cb1>
+<05aa> <5cb3>
+<05ab> <5e18>
+<05ac> <5e1a>
+<05ad> <5e16>
+<05ae> <5e15>
+<05af> <5e1b>
+<05b0> <5e11>
+<05b1> <5e78>
+<05b2> <5e9a>
+<05b3> <5e97>
+<05b4> <5e9c>
+<05b7> <5ef6>
+<05ba> <5f29>
+<05bd> <5f7f>
+<05be> <5f7c>
+<05bf> <5fdd>
+<05c0> <5fe0>
+<05c1> <5ffd>
+<05c2> <5ff5>
+<05c3> <5fff>
+<05c4> <600f>
+<05c5> <6014>
+<05c6> <602f>
+<05c7> <6035>
+<05c8> <6016>
+<05c9> <602a>
+<05ca> <6015>
+<05cb> <6021>
+<05cc> <6027>
+<05cd> <6029>
+<05ce> <602b>
+<05cf> <601b>
+<05d0> <6216>
+<05d1> <6215>
+<05d2> <623f>
+<05d3> <623e>
+<05d4> <6240>
+<05d5> <627f>
+<05d6> <62c9>
+<05d7> <62cc>
+<05d8> <62c4>
+<05d9> <62bf>
+<05da> <62c2>
+<05db> <62b9>
+<05dc> <62d2>
+<05dd> <62db>
+<05de> <62ab>
+<05e1> <62cb>
+<05e2> <62c8>
+<05e3> <62a8>
+<05e4> <62bd>
+<05e5> <62bc>
+<05e6> <62d0>
+<05e7> <62d9>
+<05e8> <62c7>
+<05e9> <62cd>
+<05ea> <62b5>
+<05eb> <62da>
+<05ec> <62b1>
+<05ed> <62d8>
+<05f0> <62c6>
+<05f1> <62ac>
+<05f2> <62ce>
+<05f3> <653e>
+<05f4> <65a7>
+<05f5> <65bc>
+<05f6> <65fa>
+<05f7> <6614>
+<05f8> <6613>
+<05f9> <660c>
+<05fa> <6606>
+<05fb> <6602>
+<05fc> <660e>
+<05fd> <6600>
+<05fe> <660f>
+<05ff> <6615>
+<0600> <660a>
+<0601> <6607>
+endbfchar
+
+100 beginbfchar
+<0602> <670d>
+<0603> <670b>
+<0604> <676d>
+<0605> <678b>
+<0606> <6795>
+<0607> <6771>
+<0608> <679c>
+<0609> <6773>
+<060a> <6777>
+<060b> <6787>
+<060c> <679d>
+<060d> <6797>
+<0610> <677f>
+<0611> <6789>
+<0612> <677e>
+<0613> <6790>
+<0614> <6775>
+<0615> <679a>
+<0616> <6793>
+<0617> <677c>
+<0618> <676a>
+<0619> <6772>
+<061a> <6b23>
+<061d> <6b7f>
+<061e> <6c13>
+<061f> <6c1b>
+<0620> <6ce3>
+<0621> <6ce8>
+<0622> <6cf3>
+<0623> <6cb1>
+<0624> <6ccc>
+<0625> <6ce5>
+<0626> <6cb3>
+<0629> <6cbc>
+<062a> <6ce2>
+<062b> <6cab>
+<062c> <6cd5>
+<062d> <6cd3>
+<062e> <6cb8>
+<062f> <6cc4>
+<0630> <6cb9>
+<0631> <6cc1>
+<0632> <6cae>
+<0633> <6cd7>
+<0634> <6cc5>
+<0635> <6cf1>
+<0636> <6cbf>
+<0637> <6cbb>
+<0638> <6ce1>
+<0639> <6cdb>
+<063a> <6cca>
+<063b> <6cac>
+<063c> <6cef>
+<063d> <6cdc>
+<063e> <6cd6>
+<063f> <6ce0>
+<0640> <7095>
+<0641> <708e>
+<0642> <7092>
+<0643> <708a>
+<0644> <7099>
+<0647> <7238>
+<0648> <7248>
+<0649> <7267>
+<064a> <7269>
+<064b> <72c0>
+<064c> <72ce>
+<064d> <72d9>
+<064e> <72d7>
+<064f> <72d0>
+<0650> <73a9>
+<0651> <73a8>
+<0652> <739f>
+<0653> <73ab>
+<0654> <73a5>
+<0655> <753d>
+<0656> <759d>
+<0659> <7684>
+<065a> <76c2>
+<065b> <76f2>
+<065c> <76f4>
+<065d> <77e5>
+<065e> <77fd>
+<065f> <793e>
+<0662> <79c9>
+<0663> <79c8>
+<0664> <7a7a>
+<0665> <7a79>
+<0666> <7afa>
+<0667> <7cfe>
+<0668> <7f54>
+<0669> <7f8c>
+<066a> <7f8b>
+<066b> <8005>
+<066c> <80ba>
+<066d> <80a5>
+<066e> <80a2>
+<066f> <80b1>
+<0670> <80a1>
+<0671> <80ab>
+endbfchar
+
+100 beginbfchar
+<0672> <80a9>
+<0673> <80b4>
+<0674> <80aa>
+<0675> <80af>
+<0676> <81e5>
+<0677> <81fe>
+<0678> <820d>
+<0679> <82b3>
+<067a> <829d>
+<067b> <8299>
+<067c> <82ad>
+<067d> <82bd>
+<067e> <829f>
+<067f> <82b9>
+<0680> <82b1>
+<0681> <82ac>
+<0682> <82a5>
+<0683> <82af>
+<0684> <82b8>
+<0685> <82a3>
+<0686> <82b0>
+<0687> <82be>
+<0688> <82b7>
+<0689> <864e>
+<068a> <8671>
+<068b> <521d>
+<068c> <8868>
+<068d> <8ecb>
+<068e> <8fce>
+<068f> <8fd4>
+<0690> <8fd1>
+<0691> <90b5>
+<0692> <90b8>
+<0693> <90b1>
+<0694> <90b6>
+<0695> <91c7>
+<0696> <91d1>
+<0697> <9577>
+<0698> <9580>
+<0699> <961c>
+<069a> <9640>
+<069b> <963f>
+<069c> <963b>
+<069d> <9644>
+<069e> <9642>
+<069f> <96b9>
+<06a0> <96e8>
+<06a1> <9752>
+<06a2> <975e>
+<06a3> <4e9f>
+<06a6> <4fe1>
+<06a7> <4fb5>
+<06a8> <4faf>
+<06a9> <4fbf>
+<06aa> <4fe0>
+<06ab> <4fd1>
+<06ac> <4fcf>
+<06ad> <4fdd>
+<06ae> <4fc3>
+<06af> <4fb6>
+<06b0> <4fd8>
+<06b1> <4fdf>
+<06b2> <4fca>
+<06b3> <4fd7>
+<06b4> <4fae>
+<06b5> <4fd0>
+<06b6> <4fc4>
+<06b7> <4fc2>
+<06b8> <4fda>
+<06b9> <4fce>
+<06ba> <4fde>
+<06bb> <4fb7>
+<06bc> <5157>
+<06bd> <5192>
+<06be> <5191>
+<06bf> <51a0>
+<06c0> <524e>
+<06c1> <5243>
+<06c2> <524a>
+<06c3> <524d>
+<06c4> <524c>
+<06c5> <524b>
+<06c6> <5247>
+<06c7> <52c7>
+<06c8> <52c9>
+<06c9> <52c3>
+<06ca> <52c1>
+<06cb> <530d>
+<06cc> <5357>
+<06cd> <537b>
+<06ce> <539a>
+<06cf> <53db>
+<06d0> <54ac>
+<06d1> <54c0>
+<06d2> <54a8>
+<06d3> <54ce>
+<06d4> <54c9>
+<06d5> <54b8>
+<06d6> <54a6>
+<06d7> <54b3>
+endbfchar
+
+100 beginbfchar
+<06d8> <54c7>
+<06d9> <54c2>
+<06da> <54bd>
+<06db> <54aa>
+<06dc> <54c1>
+<06dd> <54c4>
+<06de> <54c8>
+<06df> <54af>
+<06e0> <54ab>
+<06e1> <54b1>
+<06e2> <54bb>
+<06e3> <54a9>
+<06e4> <54a7>
+<06e5> <54bf>
+<06e6> <56ff>
+<06e7> <5782>
+<06e8> <578b>
+<06e9> <57a0>
+<06ea> <57a3>
+<06eb> <57a2>
+<06ec> <57ce>
+<06ed> <57ae>
+<06ee> <5793>
+<06ef> <5955>
+<06f0> <5951>
+<06f1> <594f>
+<06f2> <594e>
+<06f3> <5950>
+<06f4> <59dc>
+<06f5> <59d8>
+<06f6> <59ff>
+<06f7> <59e3>
+<06f8> <59e8>
+<06f9> <5a03>
+<06fa> <59e5>
+<06fb> <59ea>
+<06fc> <59da>
+<06fd> <59e6>
+<06fe> <5a01>
+<06ff> <59fb>
+<0700> <5b69>
+<0701> <5ba3>
+<0702> <5ba6>
+<0703> <5ba4>
+<0704> <5ba2>
+<0705> <5ba5>
+<0706> <5c01>
+<0709> <5c4d>
+<070a> <5c4b>
+<070b> <5cd9>
+<070c> <5cd2>
+<070d> <5df7>
+<070e> <5e1d>
+<070f> <5e25>
+<0710> <5e1f>
+<0711> <5e7d>
+<0712> <5ea0>
+<0713> <5ea6>
+<0714> <5efa>
+<0715> <5f08>
+<0716> <5f2d>
+<0717> <5f65>
+<0718> <5f88>
+<0719> <5f85>
+<071c> <5f87>
+<071d> <5f8c>
+<071e> <5f89>
+<071f> <6012>
+<0720> <601d>
+<0721> <6020>
+<0722> <6025>
+<0723> <600e>
+<0724> <6028>
+<0725> <604d>
+<0726> <6070>
+<0727> <6068>
+<0728> <6062>
+<0729> <6046>
+<072a> <6043>
+<072b> <606c>
+<072c> <606b>
+<072d> <606a>
+<072e> <6064>
+<072f> <6241>
+<0730> <62dc>
+<0731> <6316>
+<0732> <6309>
+<0733> <62fc>
+<0734> <62ed>
+<0735> <6301>
+<0736> <62ee>
+<0737> <62fd>
+<0738> <6307>
+<0739> <62f1>
+<073a> <62f7>
+<073b> <62ef>
+<073c> <62ec>
+<073d> <62fe>
+<073e> <62f4>
+<073f> <6311>
+endbfchar
+
+100 beginbfchar
+<0740> <6302>
+<0741> <653f>
+<0742> <6545>
+<0743> <65ab>
+<0744> <65bd>
+<0745> <65e2>
+<0746> <6625>
+<0747> <662d>
+<0748> <6620>
+<0749> <6627>
+<074a> <662f>
+<074b> <661f>
+<074c> <6628>
+<074d> <6631>
+<074e> <6624>
+<074f> <66f7>
+<0750> <67ff>
+<0751> <67d3>
+<0752> <67f1>
+<0753> <67d4>
+<0754> <67d0>
+<0755> <67ec>
+<0756> <67b6>
+<0757> <67af>
+<0758> <67f5>
+<0759> <67e9>
+<075a> <67ef>
+<075b> <67c4>
+<075c> <67d1>
+<075d> <67b4>
+<075e> <67da>
+<075f> <67e5>
+<0760> <67b8>
+<0761> <67cf>
+<0762> <67de>
+<0763> <67f3>
+<0764> <67b0>
+<0765> <67d9>
+<0766> <67e2>
+<0767> <67dd>
+<0768> <67d2>
+<0769> <6b6a>
+<076a> <6b83>
+<076b> <6b86>
+<076c> <6bb5>
+<076d> <6bd2>
+<076e> <6bd7>
+<076f> <6c1f>
+<0770> <6cc9>
+<0771> <6d0b>
+<0772> <6d32>
+<0773> <6d2a>
+<0774> <6d41>
+<0775> <6d25>
+<0776> <6d0c>
+<0777> <6d31>
+<0778> <6d1e>
+<0779> <6d17>
+<077a> <6d3b>
+<077d> <6d36>
+<077e> <6d1b>
+<077f> <6cf5>
+<0780> <6d39>
+<0781> <6d27>
+<0782> <6d38>
+<0783> <6d29>
+<0784> <6d2e>
+<0785> <6d35>
+<0786> <6d0e>
+<0787> <6d2b>
+<0788> <70ab>
+<0789> <70ba>
+<078a> <70b3>
+<078b> <70ac>
+<078c> <70af>
+<078d> <70ad>
+<078e> <70b8>
+<078f> <70ae>
+<0790> <70a4>
+<0791> <7230>
+<0792> <7272>
+<0793> <726f>
+<0794> <7274>
+<0795> <72e9>
+<0798> <73b7>
+<0799> <73ca>
+<079a> <73bb>
+<079b> <73b2>
+<079c> <73cd>
+<079d> <73c0>
+<079e> <73b3>
+<079f> <751a>
+<07a0> <752d>
+<07a1> <754f>
+<07a2> <754c>
+<07a3> <754e>
+<07a4> <754b>
+<07a5> <75ab>
+<07aa> <7678>
+<07ae> <76c8>
+endbfchar
+
+100 beginbfchar
+<07af> <76c6>
+<07b0> <76c3>
+<07b1> <76c5>
+<07b2> <7701>
+<07b3> <76f9>
+<07b4> <76f8>
+<07b5> <7709>
+<07b6> <770b>
+<07b7> <76fe>
+<07b8> <76fc>
+<07b9> <7707>
+<07ba> <77dc>
+<07bb> <7802>
+<07bc> <7814>
+<07bf> <7946>
+<07c0> <7949>
+<07c1> <7948>
+<07c2> <7947>
+<07c7> <79cb>
+<07c8> <7a7f>
+<07c9> <7a81>
+<07ca> <7aff>
+<07cb> <7afd>
+<07cc> <7c7d>
+<07cd> <7d02>
+<07ce> <7d05>
+<07cf> <7d00>
+<07d0> <7d09>
+<07d1> <7d07>
+<07d2> <7d04>
+<07d3> <7d06>
+<07d4> <7f38>
+<07d5> <7f8e>
+<07d6> <7fbf>
+<07d7> <8010>
+<07d8> <800d>
+<07d9> <8011>
+<07da> <8036>
+<07db> <80d6>
+<07dc> <80e5>
+<07dd> <80da>
+<07e0> <80cc>
+<07e1> <80e1>
+<07e2> <80db>
+<07e3> <80ce>
+<07e4> <80de>
+<07e5> <80e4>
+<07e6> <80dd>
+<07e7> <81f4>
+<07e8> <8222>
+<07e9> <82e7>
+<07ea> <8303>
+<07eb> <8305>
+<07ec> <82e3>
+<07ed> <82db>
+<07ee> <82e6>
+<07ef> <8304>
+<07f0> <82e5>
+<07f1> <8302>
+<07f2> <8309>
+<07f3> <82d2>
+<07f4> <82d7>
+<07f5> <82f1>
+<07f6> <8301>
+<07f7> <82dc>
+<07f8> <82d4>
+<07f9> <82d1>
+<07fa> <82de>
+<07fb> <82d3>
+<07fc> <82df>
+<07fd> <82ef>
+<07fe> <8306>
+<07ff> <8650>
+<0800> <8679>
+<0801> <867b>
+<0802> <867a>
+<0803> <884d>
+<0804> <886b>
+<0805> <8981>
+<0806> <89d4>
+<0807> <8a08>
+<080a> <8c9e>
+<080b> <8ca0>
+<080c> <8d74>
+<080d> <8d73>
+<080e> <8db4>
+<080f> <8ecd>
+<0810> <8ecc>
+<0811> <8ff0>
+<0812> <8fe6>
+<0813> <8fe2>
+<0814> <8fea>
+<0815> <8fe5>
+<0816> <8fed>
+<0817> <8feb>
+<0818> <8fe4>
+<0819> <8fe8>
+<081a> <90ca>
+<081b> <90ce>
+<081c> <90c1>
+endbfchar
+
+100 beginbfchar
+<081d> <90c3>
+<081e> <914b>
+<081f> <914a>
+<0820> <91cd>
+<0821> <9582>
+<0822> <9650>
+<0826> <9762>
+<0827> <9769>
+<0828> <97cb>
+<0829> <97ed>
+<082a> <97f3>
+<082b> <9801>
+<082c> <98a8>
+<082d> <98db>
+<082e> <98df>
+<082f> <9996>
+<0830> <9999>
+<0831> <4e58>
+<0832> <4eb3>
+<0835> <5023>
+<0836> <4fef>
+<0837> <5026>
+<0838> <5025>
+<0839> <4ff8>
+<083a> <5029>
+<083b> <5016>
+<083c> <5006>
+<083d> <503c>
+<083e> <501f>
+<083f> <501a>
+<0840> <5012>
+<0841> <5011>
+<0842> <4ffa>
+<0843> <5000>
+<0844> <5014>
+<0845> <5028>
+<0846> <4ff1>
+<0847> <5021>
+<0848> <500b>
+<0849> <5019>
+<084a> <5018>
+<084b> <4ff3>
+<084c> <4fee>
+<084d> <502d>
+<084e> <502a>
+<084f> <4ffe>
+<0850> <502b>
+<0851> <5009>
+<0852> <517c>
+<0855> <51a2>
+<0856> <51cd>
+<0857> <51cc>
+<0858> <51c6>
+<0859> <51cb>
+<085a> <5256>
+<085b> <525c>
+<085c> <5254>
+<085d> <525b>
+<085e> <525d>
+<085f> <532a>
+<0860> <537f>
+<0861> <539f>
+<0862> <539d>
+<0863> <53df>
+<0864> <54e8>
+<0865> <5510>
+<0866> <5501>
+<0867> <5537>
+<0868> <54fc>
+<0869> <54e5>
+<086a> <54f2>
+<086b> <5506>
+<086c> <54fa>
+<086d> <5514>
+<086e> <54e9>
+<086f> <54ed>
+<0870> <54e1>
+<0871> <5509>
+<0872> <54ee>
+<0873> <54ea>
+<0874> <54e6>
+<0875> <5527>
+<0876> <5507>
+<0877> <54fd>
+<0878> <550f>
+<087b> <57c2>
+<087c> <57d4>
+<087d> <57cb>
+<087e> <57c3>
+<087f> <5809>
+<0880> <590f>
+<0883> <595a>
+<0884> <5a11>
+<0885> <5a18>
+<0886> <5a1c>
+<0887> <5a1f>
+<0888> <5a1b>
+<0889> <5a13>
+<088a> <59ec>
+<088b> <5a20>
+endbfchar
+
+100 beginbfchar
+<088c> <5a23>
+<088d> <5a29>
+<088e> <5a25>
+<088f> <5a0c>
+<0890> <5a09>
+<0891> <5b6b>
+<0892> <5c58>
+<0893> <5bb0>
+<0894> <5bb3>
+<0895> <5bb6>
+<0896> <5bb4>
+<0897> <5bae>
+<0898> <5bb5>
+<0899> <5bb9>
+<089a> <5bb8>
+<089b> <5c04>
+<089c> <5c51>
+<089d> <5c55>
+<089e> <5c50>
+<089f> <5ced>
+<08a0> <5cfd>
+<08a1> <5cfb>
+<08a2> <5cea>
+<08a3> <5ce8>
+<08a4> <5cf0>
+<08a5> <5cf6>
+<08a6> <5d01>
+<08a7> <5cf4>
+<08a8> <5dee>
+<08a9> <5e2d>
+<08aa> <5e2b>
+<08ab> <5eab>
+<08ac> <5ead>
+<08ad> <5ea7>
+<08ae> <5f31>
+<08af> <5f92>
+<08b0> <5f91>
+<08b1> <5f90>
+<08b2> <6059>
+<08b3> <6063>
+<08b4> <6065>
+<08b5> <6050>
+<08b6> <6055>
+<08b7> <606d>
+<08b8> <6069>
+<08b9> <606f>
+<08ba> <6084>
+<08bb> <609f>
+<08bc> <609a>
+<08bd> <608d>
+<08be> <6094>
+<08bf> <608c>
+<08c0> <6085>
+<08c1> <6096>
+<08c2> <6247>
+<08c3> <62f3>
+<08c4> <6308>
+<08c5> <62ff>
+<08c6> <634e>
+<08c7> <633e>
+<08c8> <632f>
+<08c9> <6355>
+<08ca> <6342>
+<08cb> <6346>
+<08cc> <634f>
+<08cd> <6349>
+<08ce> <633a>
+<08cf> <6350>
+<08d0> <633d>
+<08d3> <6328>
+<08d4> <634d>
+<08d5> <634c>
+<08d8> <6599>
+<08d9> <65c1>
+<08da> <65c5>
+<08db> <6642>
+<08dc> <6649>
+<08dd> <664f>
+<08de> <6643>
+<08df> <6652>
+<08e0> <664c>
+<08e1> <6645>
+<08e2> <6641>
+<08e3> <66f8>
+<08e6> <6717>
+<08e7> <6821>
+<08e8> <6838>
+<08e9> <6848>
+<08ea> <6846>
+<08eb> <6853>
+<08ec> <6839>
+<08ed> <6842>
+<08ee> <6854>
+<08ef> <6829>
+<08f0> <68b3>
+<08f1> <6817>
+<08f2> <684c>
+<08f3> <6851>
+<08f4> <683d>
+<08f5> <67f4>
+endbfchar
+
+100 beginbfchar
+<08f6> <6850>
+<08f7> <6840>
+<08f8> <683c>
+<08f9> <6843>
+<08fa> <682a>
+<08fb> <6845>
+<08fc> <6813>
+<08fd> <6818>
+<08fe> <6841>
+<08ff> <6b8a>
+<0900> <6b89>
+<0901> <6bb7>
+<0902> <6c23>
+<0905> <6c26>
+<0906> <6c24>
+<0907> <6cf0>
+<0908> <6d6a>
+<0909> <6d95>
+<090a> <6d88>
+<090b> <6d87>
+<090c> <6d66>
+<090d> <6d78>
+<090e> <6d77>
+<090f> <6d59>
+<0910> <6d93>
+<0911> <6d6c>
+<0912> <6d89>
+<0913> <6d6e>
+<0914> <6d5a>
+<0915> <6d74>
+<0916> <6d69>
+<0917> <6d8c>
+<0918> <6d8a>
+<0919> <6d79>
+<091a> <6d85>
+<091b> <6d65>
+<091c> <6d94>
+<091d> <70ca>
+<091e> <70d8>
+<091f> <70e4>
+<0920> <70d9>
+<0921> <70c8>
+<0922> <70cf>
+<0923> <7239>
+<0924> <7279>
+<0925> <72fc>
+<0926> <72f9>
+<0927> <72fd>
+<0928> <72f8>
+<0929> <72f7>
+<092a> <7386>
+<092b> <73ed>
+<092c> <7409>
+<092d> <73ee>
+<092e> <73e0>
+<092f> <73ea>
+<0930> <73de>
+<0931> <7554>
+<0932> <755d>
+<0933> <755c>
+<0934> <755a>
+<0935> <7559>
+<0936> <75be>
+<0937> <75c5>
+<0938> <75c7>
+<093b> <75bd>
+<093c> <75bc>
+<093d> <75b9>
+<093e> <75c2>
+<093f> <75b8>
+<0940> <768b>
+<0941> <76b0>
+<0942> <76ca>
+<0945> <7729>
+<0948> <7728>
+<0949> <77e9>
+<094a> <7830>
+<094b> <7827>
+<094c> <7838>
+<094d> <781d>
+<094e> <7834>
+<094f> <7837>
+<0950> <7825>
+<0951> <782d>
+<0952> <7820>
+<0953> <781f>
+<0954> <7832>
+<0955> <7955>
+<0956> <7950>
+<0957> <7960>
+<0958> <795f>
+<0959> <7956>
+<095a> <795e>
+<095b> <795d>
+<095c> <7957>
+<095d> <795a>
+<095e> <79e4>
+<095f> <79e3>
+<0960> <79e7>
+<0961> <79df>
+endbfchar
+
+100 beginbfchar
+<0962> <79e6>
+<0963> <79e9>
+<0964> <79d8>
+<0965> <7a84>
+<0966> <7a88>
+<0967> <7ad9>
+<0968> <7b06>
+<0969> <7b11>
+<096a> <7c89>
+<096b> <7d21>
+<096c> <7d17>
+<096d> <7d0b>
+<096e> <7d0a>
+<096f> <7d20>
+<0970> <7d22>
+<0971> <7d14>
+<0972> <7d10>
+<0973> <7d15>
+<0974> <7d1a>
+<0975> <7d1c>
+<0976> <7d0d>
+<0977> <7d19>
+<0978> <7d1b>
+<0979> <7f3a>
+<097a> <7f5f>
+<097b> <7f94>
+<097c> <7fc5>
+<097d> <7fc1>
+<097e> <8006>
+<097f> <8004>
+<0980> <8018>
+<0981> <8015>
+<0982> <8019>
+<0983> <8017>
+<0984> <803d>
+<0985> <803f>
+<0986> <80f1>
+<0987> <8102>
+<0988> <80f0>
+<0989> <8105>
+<098a> <80ed>
+<098b> <80f4>
+<098c> <8106>
+<098d> <80f8>
+<098e> <80f3>
+<098f> <8108>
+<0990> <80fd>
+<0991> <810a>
+<0992> <80fc>
+<0993> <80ef>
+<0994> <81ed>
+<0995> <81ec>
+<0996> <8200>
+<0997> <8210>
+<099a> <8228>
+<099b> <822c>
+<099c> <82bb>
+<099d> <832b>
+<099e> <8352>
+<099f> <8354>
+<09a0> <834a>
+<09a1> <8338>
+<09a2> <8350>
+<09a3> <8349>
+<09a4> <8335>
+<09a5> <8334>
+<09a6> <834f>
+<09a7> <8332>
+<09a8> <8339>
+<09a9> <8336>
+<09aa> <8317>
+<09ab> <8340>
+<09ac> <8331>
+<09ad> <8328>
+<09ae> <8343>
+<09af> <8654>
+<09b0> <868a>
+<09b1> <86aa>
+<09b2> <8693>
+<09b3> <86a4>
+<09b4> <86a9>
+<09b5> <868c>
+<09b6> <86a3>
+<09b7> <869c>
+<09b8> <8870>
+<09b9> <8877>
+<09bc> <887d>
+<09bd> <8879>
+<09be> <8a18>
+<09bf> <8a10>
+<09c0> <8a0e>
+<09c1> <8a0c>
+<09c2> <8a15>
+<09c3> <8a0a>
+<09c4> <8a17>
+<09c5> <8a13>
+<09c6> <8a16>
+<09c7> <8a0f>
+<09c8> <8a11>
+<09c9> <8c48>
+endbfchar
+
+100 beginbfchar
+<09ca> <8c7a>
+<09cb> <8c79>
+<09ce> <8d77>
+<09cf> <8eac>
+<09d0> <8ed2>
+<09d1> <8ed4>
+<09d2> <8ecf>
+<09d3> <8fb1>
+<09d4> <9001>
+<09d5> <9006>
+<09d6> <8ff7>
+<09d7> <9000>
+<09d8> <8ffa>
+<09d9> <8ff4>
+<09da> <9003>
+<09db> <8ffd>
+<09dc> <9005>
+<09dd> <8ff8>
+<09de> <9095>
+<09df> <90e1>
+<09e0> <90dd>
+<09e1> <90e2>
+<09e2> <9152>
+<09e3> <914d>
+<09e4> <914c>
+<09e5> <91d8>
+<09e6> <91dd>
+<09e7> <91d7>
+<09e8> <91dc>
+<09e9> <91d9>
+<09ea> <9583>
+<09ed> <9661>
+<09ee> <965b>
+<09ef> <965d>
+<09f0> <9664>
+<09f1> <9658>
+<09f2> <965e>
+<09f3> <96bb>
+<09f4> <98e2>
+<09f5> <99ac>
+<09f6> <9aa8>
+<09f7> <9ad8>
+<09f8> <9b25>
+<09f9> <9b32>
+<09fa> <9b3c>
+<09fb> <4e7e>
+<09fc> <507a>
+<09fd> <507d>
+<09fe> <505c>
+<09ff> <5047>
+<0a00> <5043>
+<0a01> <504c>
+<0a02> <505a>
+<0a03> <5049>
+<0a04> <5065>
+<0a05> <5076>
+<0a06> <504e>
+<0a07> <5055>
+<0a08> <5075>
+<0a09> <5074>
+<0a0a> <5077>
+<0a0b> <504f>
+<0a0c> <500f>
+<0a0d> <506f>
+<0a0e> <506d>
+<0a0f> <515c>
+<0a10> <5195>
+<0a11> <51f0>
+<0a12> <526a>
+<0a13> <526f>
+<0a14> <52d2>
+<0a15> <52d9>
+<0a16> <52d8>
+<0a17> <52d5>
+<0a18> <5310>
+<0a19> <530f>
+<0a1a> <5319>
+<0a1d> <533e>
+<0a1e> <53c3>
+<0a1f> <66fc>
+<0a20> <5546>
+<0a21> <556a>
+<0a22> <5566>
+<0a23> <5544>
+<0a24> <555e>
+<0a25> <5561>
+<0a26> <5543>
+<0a27> <554a>
+<0a28> <5531>
+<0a29> <5556>
+<0a2a> <554f>
+<0a2b> <5555>
+<0a2c> <552f>
+<0a2d> <5564>
+<0a2e> <5538>
+<0a2f> <552e>
+<0a30> <555c>
+<0a31> <552c>
+<0a32> <5563>
+<0a33> <5533>
+endbfchar
+
+100 beginbfchar
+<0a34> <5541>
+<0a35> <5557>
+<0a36> <5708>
+<0a37> <570b>
+<0a38> <5709>
+<0a39> <57df>
+<0a3a> <5805>
+<0a3b> <580a>
+<0a3c> <5806>
+<0a3d> <57e0>
+<0a3e> <57e4>
+<0a3f> <57fa>
+<0a40> <5802>
+<0a41> <5835>
+<0a42> <57f7>
+<0a43> <57f9>
+<0a44> <5920>
+<0a45> <5962>
+<0a46> <5a36>
+<0a47> <5a41>
+<0a48> <5a49>
+<0a49> <5a66>
+<0a4a> <5a6a>
+<0a4b> <5a40>
+<0a4c> <5a3c>
+<0a4d> <5a62>
+<0a4e> <5a5a>
+<0a4f> <5a46>
+<0a50> <5a4a>
+<0a51> <5b70>
+<0a52> <5bc7>
+<0a53> <5bc5>
+<0a54> <5bc4>
+<0a55> <5bc2>
+<0a56> <5bbf>
+<0a57> <5bc6>
+<0a58> <5c09>
+<0a59> <5c08>
+<0a5a> <5c07>
+<0a5b> <5c60>
+<0a5e> <5d07>
+<0a5f> <5d06>
+<0a60> <5d0e>
+<0a61> <5d1b>
+<0a62> <5d16>
+<0a63> <5d22>
+<0a64> <5d11>
+<0a65> <5d29>
+<0a66> <5d14>
+<0a67> <5d19>
+<0a68> <5d24>
+<0a69> <5d27>
+<0a6a> <5d17>
+<0a6b> <5de2>
+<0a6c> <5e38>
+<0a6d> <5e36>
+<0a6e> <5e33>
+<0a6f> <5e37>
+<0a72> <5eb6>
+<0a73> <5eb5>
+<0a74> <5ebe>
+<0a75> <5f35>
+<0a76> <5f37>
+<0a77> <5f57>
+<0a78> <5f6c>
+<0a79> <5f69>
+<0a7a> <5f6b>
+<0a7b> <5f97>
+<0a7c> <5f99>
+<0a7d> <5f9e>
+<0a7e> <5f98>
+<0a7f> <5fa1>
+<0a80> <5fa0>
+<0a81> <5f9c>
+<0a82> <607f>
+<0a83> <60a3>
+<0a84> <6089>
+<0a85> <60a0>
+<0a86> <60a8>
+<0a87> <60cb>
+<0a88> <60b4>
+<0a89> <60e6>
+<0a8a> <60bd>
+<0a8b> <60c5>
+<0a8c> <60bb>
+<0a8d> <60b5>
+<0a8e> <60dc>
+<0a8f> <60bc>
+<0a90> <60d8>
+<0a91> <60d5>
+<0a92> <60c6>
+<0a93> <60df>
+<0a94> <60b8>
+<0a95> <60da>
+<0a96> <60c7>
+<0a99> <6248>
+<0a9a> <63a0>
+<0a9b> <63a7>
+<0a9c> <6372>
+<0a9d> <6396>
+endbfchar
+
+100 beginbfchar
+<0a9e> <63a2>
+<0a9f> <63a5>
+<0aa0> <6377>
+<0aa1> <6367>
+<0aa2> <6398>
+<0aa3> <63aa>
+<0aa4> <6371>
+<0aa5> <63a9>
+<0aa6> <6389>
+<0aa7> <6383>
+<0aa8> <639b>
+<0aa9> <636b>
+<0aaa> <63a8>
+<0aab> <6384>
+<0aac> <6388>
+<0aad> <6399>
+<0aae> <63a1>
+<0aaf> <63ac>
+<0ab0> <6392>
+<0ab1> <638f>
+<0ab2> <6380>
+<0ab3> <637b>
+<0ab4> <6369>
+<0ab5> <6368>
+<0ab6> <637a>
+<0ab7> <655d>
+<0ab8> <6556>
+<0ab9> <6551>
+<0aba> <6559>
+<0abb> <6557>
+<0abc> <555f>
+<0abd> <654f>
+<0abe> <6558>
+<0abf> <6555>
+<0ac0> <6554>
+<0ac1> <659c>
+<0ac2> <659b>
+<0ac3> <65ac>
+<0ac4> <65cf>
+<0ac7> <65ce>
+<0ac8> <665d>
+<0ac9> <665a>
+<0aca> <6664>
+<0acb> <6668>
+<0acc> <6666>
+<0acd> <665e>
+<0ace> <66f9>
+<0acf> <52d7>
+<0ad0> <671b>
+<0ad1> <6881>
+<0ad2> <68af>
+<0ad3> <68a2>
+<0ad4> <6893>
+<0ad5> <68b5>
+<0ad6> <687f>
+<0ad7> <6876>
+<0ad8> <68b1>
+<0ad9> <68a7>
+<0ada> <6897>
+<0adb> <68b0>
+<0adc> <6883>
+<0add> <68c4>
+<0ade> <68ad>
+<0adf> <6886>
+<0ae0> <6885>
+<0ae1> <6894>
+<0ae2> <689d>
+<0ae3> <68a8>
+<0ae4> <689f>
+<0ae5> <68a1>
+<0ae6> <6882>
+<0ae7> <6b32>
+<0ae8> <6bba>
+<0aeb> <6c2b>
+<0aec> <6d8e>
+<0aed> <6dbc>
+<0aee> <6df3>
+<0aef> <6dd9>
+<0af0> <6db2>
+<0af1> <6de1>
+<0af2> <6dcc>
+<0af3> <6de4>
+<0af4> <6dfb>
+<0af5> <6dfa>
+<0af6> <6e05>
+<0af7> <6dc7>
+<0af8> <6dcb>
+<0af9> <6daf>
+<0afa> <6dd1>
+<0afb> <6dae>
+<0afc> <6dde>
+<0afd> <6df9>
+<0afe> <6db8>
+<0aff> <6df7>
+<0b00> <6df5>
+<0b01> <6dc5>
+<0b02> <6dd2>
+<0b03> <6e1a>
+<0b04> <6db5>
+<0b05> <6dda>
+endbfchar
+
+100 beginbfchar
+<0b06> <6deb>
+<0b07> <6dd8>
+<0b08> <6dea>
+<0b09> <6df1>
+<0b0a> <6dee>
+<0b0b> <6de8>
+<0b0c> <6dc6>
+<0b0d> <6dc4>
+<0b0e> <6daa>
+<0b0f> <6dec>
+<0b10> <6dbf>
+<0b11> <6de6>
+<0b12> <70f9>
+<0b15> <70fd>
+<0b16> <70ef>
+<0b17> <723d>
+<0b18> <727d>
+<0b19> <7281>
+<0b1a> <731c>
+<0b1b> <731b>
+<0b1c> <7316>
+<0b1d> <7313>
+<0b1e> <7319>
+<0b1f> <7387>
+<0b20> <7405>
+<0b21> <740a>
+<0b22> <7403>
+<0b23> <7406>
+<0b24> <73fe>
+<0b25> <740d>
+<0b26> <74e0>
+<0b29> <751c>
+<0b2a> <7522>
+<0b2d> <7562>
+<0b2e> <7570>
+<0b2f> <758f>
+<0b32> <75b5>
+<0b33> <75ca>
+<0b34> <75cd>
+<0b35> <768e>
+<0b36> <76d4>
+<0b37> <76d2>
+<0b38> <76db>
+<0b39> <7737>
+<0b3a> <773e>
+<0b3b> <773c>
+<0b3c> <7736>
+<0b3d> <7738>
+<0b3e> <773a>
+<0b3f> <786b>
+<0b40> <7843>
+<0b41> <784e>
+<0b42> <7965>
+<0b43> <7968>
+<0b44> <796d>
+<0b45> <79fb>
+<0b46> <7a92>
+<0b47> <7a95>
+<0b48> <7b20>
+<0b49> <7b28>
+<0b4a> <7b1b>
+<0b4b> <7b2c>
+<0b4c> <7b26>
+<0b4d> <7b19>
+<0b4e> <7b1e>
+<0b4f> <7b2e>
+<0b50> <7c92>
+<0b51> <7c97>
+<0b52> <7c95>
+<0b53> <7d46>
+<0b54> <7d43>
+<0b55> <7d71>
+<0b56> <7d2e>
+<0b57> <7d39>
+<0b58> <7d3c>
+<0b59> <7d40>
+<0b5a> <7d30>
+<0b5b> <7d33>
+<0b5c> <7d44>
+<0b5d> <7d2f>
+<0b5e> <7d42>
+<0b5f> <7d32>
+<0b60> <7d31>
+<0b61> <7f3d>
+<0b62> <7f9e>
+<0b63> <7f9a>
+<0b64> <7fcc>
+<0b65> <7fce>
+<0b66> <7fd2>
+<0b67> <801c>
+<0b68> <804a>
+<0b69> <8046>
+<0b6a> <812f>
+<0b6b> <8116>
+<0b6c> <8123>
+<0b6d> <812b>
+<0b6e> <8129>
+<0b6f> <8130>
+<0b70> <8124>
+<0b71> <8202>
+endbfchar
+
+100 beginbfchar
+<0b72> <8235>
+<0b73> <8237>
+<0b74> <8236>
+<0b75> <8239>
+<0b76> <838e>
+<0b77> <839e>
+<0b78> <8398>
+<0b79> <8378>
+<0b7a> <83a2>
+<0b7b> <8396>
+<0b7c> <83bd>
+<0b7d> <83ab>
+<0b7e> <8392>
+<0b7f> <838a>
+<0b80> <8393>
+<0b81> <8389>
+<0b82> <83a0>
+<0b83> <8377>
+<0b86> <8386>
+<0b87> <83a7>
+<0b88> <8655>
+<0b89> <5f6a>
+<0b8a> <86c7>
+<0b8b> <86c0>
+<0b8c> <86b6>
+<0b8d> <86c4>
+<0b8e> <86b5>
+<0b8f> <86c6>
+<0b90> <86cb>
+<0b91> <86b1>
+<0b92> <86af>
+<0b93> <86c9>
+<0b94> <8853>
+<0b95> <889e>
+<0b96> <8888>
+<0b97> <88ab>
+<0b98> <8892>
+<0b99> <8896>
+<0b9a> <888d>
+<0b9b> <888b>
+<0b9c> <8993>
+<0b9d> <898f>
+<0b9e> <8a2a>
+<0b9f> <8a1d>
+<0ba0> <8a23>
+<0ba1> <8a25>
+<0ba2> <8a31>
+<0ba3> <8a2d>
+<0ba4> <8a1f>
+<0ba5> <8a1b>
+<0ba6> <8a22>
+<0ba7> <8c49>
+<0ba8> <8c5a>
+<0ba9> <8ca9>
+<0baa> <8cac>
+<0bab> <8cab>
+<0bac> <8ca8>
+<0bad> <8caa>
+<0bae> <8ca7>
+<0baf> <8d67>
+<0bb0> <8d66>
+<0bb1> <8dbe>
+<0bb2> <8dba>
+<0bb3> <8edb>
+<0bb4> <8edf>
+<0bb5> <9019>
+<0bb6> <900d>
+<0bb7> <901a>
+<0bb8> <9017>
+<0bb9> <9023>
+<0bba> <901f>
+<0bbb> <901d>
+<0bbc> <9010>
+<0bbd> <9015>
+<0bbe> <901e>
+<0bbf> <9020>
+<0bc0> <900f>
+<0bc1> <9022>
+<0bc2> <9016>
+<0bc3> <901b>
+<0bc4> <9014>
+<0bc5> <90e8>
+<0bc6> <90ed>
+<0bc7> <90fd>
+<0bc8> <9157>
+<0bc9> <91ce>
+<0bca> <91f5>
+<0bcb> <91e6>
+<0bcc> <91e3>
+<0bcd> <91e7>
+<0bce> <91ed>
+<0bcf> <91e9>
+<0bd0> <9589>
+<0bd1> <966a>
+<0bd2> <9675>
+<0bd3> <9673>
+<0bd4> <9678>
+<0bd5> <9670>
+<0bd6> <9674>
+<0bd9> <966c>
+endbfchar
+
+100 beginbfchar
+<0bda> <96c0>
+<0bdb> <96ea>
+<0bdc> <96e9>
+<0bdd> <7ae0>
+<0bde> <7adf>
+<0be1> <9b5a>
+<0be2> <9ce5>
+<0be3> <9e75>
+<0be4> <9e7f>
+<0be5> <9ea5>
+<0be6> <9ebb>
+<0be7> <50a2>
+<0be8> <508d>
+<0be9> <5085>
+<0bea> <5099>
+<0beb> <5091>
+<0bec> <5080>
+<0bed> <5096>
+<0bee> <5098>
+<0bef> <509a>
+<0bf0> <6700>
+<0bf1> <51f1>
+<0bf2> <5272>
+<0bf5> <5269>
+<0bf6> <52de>
+<0bf7> <52dd>
+<0bf8> <52db>
+<0bf9> <535a>
+<0bfa> <53a5>
+<0bfb> <557b>
+<0bfc> <5580>
+<0bfd> <55a7>
+<0bfe> <557c>
+<0bff> <558a>
+<0c00> <559d>
+<0c01> <5598>
+<0c02> <5582>
+<0c03> <559c>
+<0c04> <55aa>
+<0c05> <5594>
+<0c06> <5587>
+<0c07> <558b>
+<0c08> <5583>
+<0c09> <55b3>
+<0c0a> <55ae>
+<0c0b> <559f>
+<0c0c> <553e>
+<0c0d> <55b2>
+<0c0e> <559a>
+<0c0f> <55bb>
+<0c10> <55ac>
+<0c11> <55b1>
+<0c12> <557e>
+<0c13> <5589>
+<0c14> <55ab>
+<0c15> <5599>
+<0c16> <570d>
+<0c17> <582f>
+<0c18> <582a>
+<0c19> <5834>
+<0c1a> <5824>
+<0c1d> <5821>
+<0c1e> <581d>
+<0c1f> <5820>
+<0c22> <5960>
+<0c23> <5a77>
+<0c24> <5a9a>
+<0c25> <5a7f>
+<0c26> <5a92>
+<0c27> <5a9b>
+<0c28> <5aa7>
+<0c29> <5b73>
+<0c2a> <5b71>
+<0c2b> <5bd2>
+<0c2c> <5bcc>
+<0c2d> <5bd3>
+<0c2e> <5bd0>
+<0c31> <5c31>
+<0c32> <5d4c>
+<0c33> <5d50>
+<0c34> <5d34>
+<0c35> <5d47>
+<0c36> <5dfd>
+<0c37> <5e45>
+<0c38> <5e3d>
+<0c39> <5e40>
+<0c3a> <5e43>
+<0c3b> <5e7e>
+<0c3c> <5eca>
+<0c3f> <5ec4>
+<0c40> <5f3c>
+<0c41> <5f6d>
+<0c44> <5fa8>
+<0c45> <60d1>
+<0c46> <60e1>
+<0c47> <60b2>
+<0c48> <60b6>
+<0c49> <60e0>
+<0c4a> <611c>
+<0c4b> <6123>
+endbfchar
+
+100 beginbfchar
+<0c4c> <60fa>
+<0c4d> <6115>
+<0c4e> <60f0>
+<0c4f> <60fb>
+<0c50> <60f4>
+<0c51> <6168>
+<0c52> <60f1>
+<0c53> <610e>
+<0c54> <60f6>
+<0c55> <6109>
+<0c56> <6100>
+<0c57> <6112>
+<0c58> <621f>
+<0c59> <6249>
+<0c5a> <63a3>
+<0c5b> <638c>
+<0c5c> <63cf>
+<0c5d> <63c0>
+<0c5e> <63e9>
+<0c5f> <63c9>
+<0c60> <63c6>
+<0c61> <63cd>
+<0c62> <63d2>
+<0c63> <63e3>
+<0c64> <63d0>
+<0c65> <63e1>
+<0c66> <63d6>
+<0c69> <6376>
+<0c6a> <63f4>
+<0c6b> <63ea>
+<0c6c> <63db>
+<0c6d> <6452>
+<0c6e> <63da>
+<0c6f> <63f9>
+<0c70> <655e>
+<0c71> <6566>
+<0c74> <6591>
+<0c75> <6590>
+<0c76> <65af>
+<0c77> <666e>
+<0c78> <6670>
+<0c79> <6674>
+<0c7a> <6676>
+<0c7b> <666f>
+<0c7c> <6691>
+<0c7d> <667a>
+<0c7e> <667e>
+<0c7f> <6677>
+<0c82> <671f>
+<0c83> <671d>
+<0c84> <68fa>
+<0c85> <68d5>
+<0c86> <68e0>
+<0c87> <68d8>
+<0c88> <68d7>
+<0c89> <6905>
+<0c8a> <68df>
+<0c8b> <68f5>
+<0c8c> <68ee>
+<0c8d> <68e7>
+<0c8e> <68f9>
+<0c8f> <68d2>
+<0c90> <68f2>
+<0c91> <68e3>
+<0c92> <68cb>
+<0c93> <68cd>
+<0c94> <690d>
+<0c95> <6912>
+<0c96> <690e>
+<0c97> <68c9>
+<0c98> <68da>
+<0c99> <696e>
+<0c9a> <68fb>
+<0c9b> <6b3e>
+<0c9c> <6b3a>
+<0c9d> <6b3d>
+<0c9e> <6b98>
+<0c9f> <6b96>
+<0ca0> <6bbc>
+<0ca1> <6bef>
+<0ca4> <6c2c>
+<0ca5> <6e2f>
+<0ca6> <6e38>
+<0ca7> <6e54>
+<0ca8> <6e21>
+<0ca9> <6e32>
+<0caa> <6e67>
+<0cab> <6e4a>
+<0cac> <6e20>
+<0cad> <6e25>
+<0cae> <6e23>
+<0caf> <6e1b>
+<0cb0> <6e5b>
+<0cb1> <6e58>
+<0cb2> <6e24>
+<0cb3> <6e56>
+<0cb4> <6e6e>
+<0cb5> <6e2d>
+<0cb6> <6e26>
+<0cb7> <6e6f>
+endbfchar
+
+100 beginbfchar
+<0cb8> <6e34>
+<0cb9> <6e4d>
+<0cba> <6e3a>
+<0cbb> <6e2c>
+<0cbc> <6e43>
+<0cbd> <6e1d>
+<0cbe> <6e3e>
+<0cbf> <6ecb>
+<0cc0> <6e89>
+<0cc1> <6e19>
+<0cc2> <6e4e>
+<0cc3> <6e63>
+<0cc4> <6e44>
+<0cc5> <6e72>
+<0cc6> <6e69>
+<0cc7> <6e5f>
+<0cca> <7126>
+<0ccb> <7130>
+<0ccc> <7121>
+<0ccd> <7136>
+<0cce> <716e>
+<0ccf> <711c>
+<0cd0> <724c>
+<0cd1> <7284>
+<0cd2> <7280>
+<0cd3> <7336>
+<0cd4> <7325>
+<0cd5> <7334>
+<0cd6> <7329>
+<0cd7> <743a>
+<0cd8> <742a>
+<0cd9> <7433>
+<0cda> <7422>
+<0cdb> <7425>
+<0cde> <7434>
+<0cdf> <742f>
+<0ce0> <741b>
+<0ce1> <7426>
+<0ce2> <7428>
+<0ce5> <756b>
+<0ce6> <756a>
+<0ce7> <75e2>
+<0ce8> <75db>
+<0ce9> <75e3>
+<0cea> <75d9>
+<0ceb> <75d8>
+<0cec> <75de>
+<0ced> <75e0>
+<0cf0> <7696>
+<0cf1> <7693>
+<0cf2> <76b4>
+<0cf3> <76dc>
+<0cf4> <774f>
+<0cf5> <77ed>
+<0cf6> <785d>
+<0cf7> <786c>
+<0cf8> <786f>
+<0cf9> <7a0d>
+<0cfa> <7a08>
+<0cfb> <7a0b>
+<0cfc> <7a05>
+<0cfd> <7a00>
+<0cfe> <7a98>
+<0cff> <7a97>
+<0d00> <7a96>
+<0d01> <7ae5>
+<0d02> <7ae3>
+<0d03> <7b49>
+<0d04> <7b56>
+<0d05> <7b46>
+<0d06> <7b50>
+<0d07> <7b52>
+<0d08> <7b54>
+<0d09> <7b4d>
+<0d0a> <7b4b>
+<0d0b> <7b4f>
+<0d0c> <7b51>
+<0d0d> <7c9f>
+<0d0e> <7ca5>
+<0d0f> <7d5e>
+<0d10> <7d50>
+<0d11> <7d68>
+<0d12> <7d55>
+<0d13> <7d2b>
+<0d14> <7d6e>
+<0d15> <7d72>
+<0d16> <7d61>
+<0d17> <7d66>
+<0d18> <7d62>
+<0d19> <7d70>
+<0d1a> <7d73>
+<0d1b> <5584>
+<0d1e> <800b>
+<0d1f> <8052>
+<0d20> <8085>
+<0d21> <8155>
+<0d22> <8154>
+<0d23> <814b>
+<0d24> <8151>
+<0d25> <814e>
+endbfchar
+
+100 beginbfchar
+<0d26> <8139>
+<0d27> <8146>
+<0d28> <813e>
+<0d29> <814c>
+<0d2a> <8153>
+<0d2b> <8174>
+<0d2c> <8212>
+<0d2d> <821c>
+<0d2e> <83e9>
+<0d2f> <8403>
+<0d30> <83f8>
+<0d31> <840d>
+<0d32> <83e0>
+<0d33> <83c5>
+<0d34> <840b>
+<0d35> <83c1>
+<0d36> <83ef>
+<0d37> <83f1>
+<0d38> <83f4>
+<0d39> <8457>
+<0d3a> <840a>
+<0d3b> <83f0>
+<0d3c> <840c>
+<0d3d> <83cc>
+<0d3e> <83fd>
+<0d3f> <83f2>
+<0d40> <83ca>
+<0d41> <8438>
+<0d42> <840e>
+<0d43> <8404>
+<0d44> <83dc>
+<0d45> <8407>
+<0d46> <83d4>
+<0d47> <83df>
+<0d48> <865b>
+<0d49> <86df>
+<0d4a> <86d9>
+<0d4b> <86ed>
+<0d4c> <86d4>
+<0d4d> <86db>
+<0d4e> <86e4>
+<0d4f> <86d0>
+<0d50> <86de>
+<0d51> <8857>
+<0d54> <88b1>
+<0d55> <8983>
+<0d56> <8996>
+<0d57> <8a3b>
+<0d58> <8a60>
+<0d59> <8a55>
+<0d5a> <8a5e>
+<0d5b> <8a3c>
+<0d5c> <8a41>
+<0d5d> <8a54>
+<0d5e> <8a5b>
+<0d5f> <8a50>
+<0d60> <8a46>
+<0d61> <8a34>
+<0d62> <8a3a>
+<0d63> <8a36>
+<0d64> <8a56>
+<0d65> <8c61>
+<0d66> <8c82>
+<0d67> <8caf>
+<0d68> <8cbc>
+<0d69> <8cb3>
+<0d6a> <8cbd>
+<0d6b> <8cc1>
+<0d6c> <8cbb>
+<0d6d> <8cc0>
+<0d6e> <8cb4>
+<0d6f> <8cb7>
+<0d70> <8cb6>
+<0d71> <8cbf>
+<0d72> <8cb8>
+<0d73> <8d8a>
+<0d74> <8d85>
+<0d75> <8d81>
+<0d76> <8dce>
+<0d77> <8ddd>
+<0d78> <8dcb>
+<0d79> <8dda>
+<0d7a> <8dd1>
+<0d7b> <8dcc>
+<0d7c> <8ddb>
+<0d7d> <8dc6>
+<0d7e> <8efb>
+<0d7f> <8ef8>
+<0d80> <8efc>
+<0d81> <8f9c>
+<0d82> <902e>
+<0d83> <9035>
+<0d84> <9031>
+<0d85> <9038>
+<0d86> <9032>
+<0d87> <9036>
+<0d88> <9102>
+<0d89> <90f5>
+<0d8a> <9109>
+<0d8b> <90fe>
+endbfchar
+
+100 beginbfchar
+<0d8c> <9163>
+<0d8d> <9165>
+<0d8e> <91cf>
+<0d91> <9223>
+<0d92> <9209>
+<0d93> <921e>
+<0d94> <920d>
+<0d95> <9210>
+<0d96> <9207>
+<0d97> <9211>
+<0d98> <9594>
+<0d99> <958f>
+<0d9a> <958b>
+<0d9b> <9591>
+<0d9c> <9593>
+<0d9d> <9592>
+<0d9e> <958e>
+<0d9f> <968a>
+<0da0> <968e>
+<0da1> <968b>
+<0da2> <967d>
+<0da5> <968d>
+<0da6> <9672>
+<0da7> <9684>
+<0da8> <96c1>
+<0da9> <96c5>
+<0daa> <96c4>
+<0dad> <96ef>
+<0dae> <96f2>
+<0daf> <97cc>
+<0db2> <9808>
+<0db3> <98e7>
+<0db4> <98ea>
+<0db5> <98ef>
+<0db6> <98e9>
+<0db7> <98f2>
+<0db8> <98ed>
+<0db9> <99ae>
+<0dba> <99ad>
+<0dbb> <9ec3>
+<0dbc> <9ecd>
+<0dbd> <9ed1>
+<0dbe> <4e82>
+<0dbf> <50ad>
+<0dc0> <50b5>
+<0dc3> <50c5>
+<0dc4> <50be>
+<0dc5> <50ac>
+<0dc6> <50b7>
+<0dc7> <50bb>
+<0dc8> <50af>
+<0dc9> <50c7>
+<0dca> <527f>
+<0dcb> <5277>
+<0dcc> <527d>
+<0dcd> <52df>
+<0dce> <52e6>
+<0dcf> <52e4>
+<0dd2> <532f>
+<0dd3> <55df>
+<0dd4> <55e8>
+<0dd5> <55d3>
+<0dd6> <55e6>
+<0dd7> <55ce>
+<0dd8> <55dc>
+<0dd9> <55c7>
+<0dda> <55d1>
+<0ddd> <55ef>
+<0dde> <55da>
+<0ddf> <55e1>
+<0de2> <55e5>
+<0de3> <55c9>
+<0de6> <585e>
+<0de7> <5851>
+<0de8> <5858>
+<0de9> <5857>
+<0dea> <585a>
+<0deb> <5854>
+<0dec> <586b>
+<0ded> <584c>
+<0dee> <586d>
+<0def> <584a>
+<0df0> <5862>
+<0df1> <5852>
+<0df2> <584b>
+<0df3> <5967>
+<0df4> <5ac1>
+<0df5> <5ac9>
+<0df6> <5acc>
+<0df7> <5abe>
+<0df8> <5abd>
+<0df9> <5abc>
+<0dfa> <5ab3>
+<0dfb> <5ac2>
+<0dfc> <5ab2>
+<0dfd> <5d69>
+<0dfe> <5d6f>
+<0dff> <5e4c>
+<0e00> <5e79>
+<0e01> <5ec9>
+endbfchar
+
+100 beginbfchar
+<0e02> <5ec8>
+<0e03> <5f12>
+<0e04> <5f59>
+<0e05> <5fac>
+<0e06> <5fae>
+<0e07> <611a>
+<0e08> <610f>
+<0e09> <6148>
+<0e0a> <611f>
+<0e0b> <60f3>
+<0e0c> <611b>
+<0e0d> <60f9>
+<0e0e> <6101>
+<0e0f> <6108>
+<0e10> <614e>
+<0e11> <614c>
+<0e12> <6144>
+<0e13> <614d>
+<0e14> <613e>
+<0e15> <6134>
+<0e16> <6127>
+<0e17> <610d>
+<0e18> <6106>
+<0e19> <6137>
+<0e1c> <6413>
+<0e1d> <643e>
+<0e1e> <641e>
+<0e1f> <642a>
+<0e20> <642d>
+<0e21> <643d>
+<0e22> <642c>
+<0e23> <640f>
+<0e24> <641c>
+<0e25> <6414>
+<0e26> <640d>
+<0e27> <6436>
+<0e2a> <6406>
+<0e2b> <656c>
+<0e2c> <659f>
+<0e2d> <65b0>
+<0e2e> <6697>
+<0e2f> <6689>
+<0e32> <6696>
+<0e33> <6684>
+<0e34> <6698>
+<0e35> <668d>
+<0e36> <6703>
+<0e37> <6994>
+<0e38> <696d>
+<0e39> <695a>
+<0e3a> <6977>
+<0e3b> <6960>
+<0e3c> <6954>
+<0e3d> <6975>
+<0e3e> <6930>
+<0e3f> <6982>
+<0e40> <694a>
+<0e41> <6968>
+<0e42> <696b>
+<0e43> <695e>
+<0e44> <6953>
+<0e45> <6979>
+<0e46> <6986>
+<0e47> <695d>
+<0e48> <6963>
+<0e49> <695b>
+<0e4a> <6b47>
+<0e4b> <6b72>
+<0e4c> <6bc0>
+<0e4d> <6bbf>
+<0e4e> <6bd3>
+<0e4f> <6bfd>
+<0e50> <6ea2>
+<0e51> <6eaf>
+<0e52> <6ed3>
+<0e53> <6eb6>
+<0e54> <6ec2>
+<0e55> <6e90>
+<0e56> <6e9d>
+<0e57> <6ec7>
+<0e58> <6ec5>
+<0e59> <6ea5>
+<0e5a> <6e98>
+<0e5b> <6ebc>
+<0e5c> <6eba>
+<0e5d> <6eab>
+<0e5e> <6ed1>
+<0e5f> <6e96>
+<0e60> <6e9c>
+<0e61> <6ec4>
+<0e62> <6ed4>
+<0e63> <6eaa>
+<0e64> <6ea7>
+<0e65> <6eb4>
+<0e66> <714e>
+<0e67> <7159>
+<0e68> <7169>
+<0e69> <7164>
+<0e6a> <7149>
+<0e6b> <7167>
+endbfchar
+
+100 beginbfchar
+<0e6c> <715c>
+<0e6d> <716c>
+<0e6e> <7166>
+<0e6f> <714c>
+<0e70> <7165>
+<0e71> <715e>
+<0e72> <7146>
+<0e73> <7168>
+<0e74> <7156>
+<0e75> <723a>
+<0e76> <7252>
+<0e77> <7337>
+<0e78> <7345>
+<0e79> <733f>
+<0e7a> <733e>
+<0e7b> <746f>
+<0e7c> <745a>
+<0e7d> <7455>
+<0e7e> <745f>
+<0e7f> <745e>
+<0e80> <7441>
+<0e81> <743f>
+<0e82> <7459>
+<0e85> <7576>
+<0e86> <7578>
+<0e87> <7600>
+<0e88> <75f0>
+<0e89> <7601>
+<0e8a> <75f2>
+<0e8b> <75f1>
+<0e8c> <75fa>
+<0e8d> <75ff>
+<0e8e> <75f4>
+<0e8f> <75f3>
+<0e92> <775b>
+<0e93> <776b>
+<0e94> <7766>
+<0e95> <775e>
+<0e96> <7763>
+<0e97> <7779>
+<0e98> <776a>
+<0e99> <776c>
+<0e9a> <775c>
+<0e9b> <7765>
+<0e9c> <7768>
+<0e9d> <7762>
+<0e9e> <77ee>
+<0e9f> <788e>
+<0ea0> <78b0>
+<0ea3> <788c>
+<0ea4> <7889>
+<0ea5> <787c>
+<0ea6> <7891>
+<0ea7> <7893>
+<0ea8> <787f>
+<0ea9> <797a>
+<0eaa> <797f>
+<0eab> <7981>
+<0eac> <842c>
+<0ead> <79bd>
+<0eae> <7a1c>
+<0eaf> <7a1a>
+<0eb0> <7a20>
+<0eb1> <7a14>
+<0eb2> <7a1f>
+<0eb3> <7a1e>
+<0eb6> <7b77>
+<0eb7> <7bc0>
+<0eb8> <7b60>
+<0eb9> <7b6e>
+<0eba> <7b67>
+<0ebb> <7cb1>
+<0ebc> <7cb3>
+<0ebd> <7cb5>
+<0ebe> <7d93>
+<0ebf> <7d79>
+<0ec0> <7d91>
+<0ec1> <7d81>
+<0ec2> <7d8f>
+<0ec3> <7d5b>
+<0ec4> <7f6e>
+<0ec7> <7f72>
+<0ec8> <7fa9>
+<0ec9> <7fa8>
+<0eca> <7fa4>
+<0ecb> <8056>
+<0ecc> <8058>
+<0ecd> <8086>
+<0ece> <8084>
+<0ecf> <8171>
+<0ed0> <8170>
+<0ed1> <8178>
+<0ed2> <8165>
+<0ed3> <816e>
+<0ed4> <8173>
+<0ed5> <816b>
+<0ed8> <8166>
+<0ed9> <8205>
+<0eda> <8247>
+<0edb> <8482>
+endbfchar
+
+100 beginbfchar
+<0edc> <8477>
+<0edd> <843d>
+<0ede> <8431>
+<0edf> <8475>
+<0ee0> <8466>
+<0ee1> <846b>
+<0ee2> <8449>
+<0ee3> <846c>
+<0ee4> <845b>
+<0ee5> <843c>
+<0ee6> <8435>
+<0ee7> <8461>
+<0ee8> <8463>
+<0ee9> <8469>
+<0eea> <846d>
+<0eeb> <8446>
+<0eec> <865e>
+<0eed> <865c>
+<0eee> <865f>
+<0eef> <86f9>
+<0ef0> <8713>
+<0ef1> <8708>
+<0ef2> <8707>
+<0ef3> <8700>
+<0ef4> <86fe>
+<0ef5> <86fb>
+<0ef8> <8706>
+<0ef9> <870a>
+<0efa> <8859>
+<0efb> <88df>
+<0efc> <88d4>
+<0efd> <88d9>
+<0efe> <88dc>
+<0eff> <88d8>
+<0f00> <88dd>
+<0f01> <88e1>
+<0f02> <88ca>
+<0f03> <88d5>
+<0f04> <88d2>
+<0f05> <899c>
+<0f06> <89e3>
+<0f07> <8a6b>
+<0f0a> <8a66>
+<0f0b> <8a69>
+<0f0c> <8a70>
+<0f0d> <8a87>
+<0f0e> <8a7c>
+<0f0f> <8a63>
+<0f10> <8aa0>
+<0f11> <8a71>
+<0f12> <8a85>
+<0f13> <8a6d>
+<0f14> <8a62>
+<0f15> <8a6e>
+<0f16> <8a6c>
+<0f17> <8a79>
+<0f18> <8a7b>
+<0f19> <8a3e>
+<0f1a> <8a68>
+<0f1b> <8c62>
+<0f1c> <8c8a>
+<0f1d> <8c89>
+<0f1e> <8cca>
+<0f21> <8cc4>
+<0f22> <8cb2>
+<0f23> <8cc3>
+<0f24> <8cc2>
+<0f25> <8cc5>
+<0f26> <8de1>
+<0f27> <8ddf>
+<0f28> <8de8>
+<0f29> <8def>
+<0f2a> <8df3>
+<0f2b> <8dfa>
+<0f2c> <8dea>
+<0f2d> <8de4>
+<0f2e> <8de6>
+<0f2f> <8eb2>
+<0f30> <8f03>
+<0f31> <8f09>
+<0f32> <8efe>
+<0f33> <8f0a>
+<0f34> <8f9f>
+<0f35> <8fb2>
+<0f36> <904b>
+<0f37> <904a>
+<0f38> <9053>
+<0f39> <9042>
+<0f3a> <9054>
+<0f3b> <903c>
+<0f3c> <9055>
+<0f3d> <9050>
+<0f3e> <9047>
+<0f3f> <904f>
+<0f40> <904e>
+<0f41> <904d>
+<0f42> <9051>
+<0f43> <903e>
+<0f44> <9041>
+<0f45> <9112>
+endbfchar
+
+100 beginbfchar
+<0f46> <9117>
+<0f47> <916c>
+<0f48> <916a>
+<0f49> <9169>
+<0f4a> <91c9>
+<0f4b> <9237>
+<0f4c> <9257>
+<0f4d> <9238>
+<0f4e> <923d>
+<0f4f> <9240>
+<0f50> <923e>
+<0f51> <925b>
+<0f52> <924b>
+<0f53> <9264>
+<0f54> <9251>
+<0f55> <9234>
+<0f56> <9249>
+<0f57> <924d>
+<0f58> <9245>
+<0f59> <9239>
+<0f5a> <923f>
+<0f5b> <925a>
+<0f5c> <9598>
+<0f5d> <9698>
+<0f60> <96cd>
+<0f61> <96cb>
+<0f64> <96f7>
+<0f65> <96fb>
+<0f66> <96f9>
+<0f67> <96f6>
+<0f68> <9756>
+<0f69> <9774>
+<0f6a> <9776>
+<0f6d> <9813>
+<0f6e> <980a>
+<0f6f> <9812>
+<0f70> <980c>
+<0f71> <98fc>
+<0f72> <98f4>
+<0f75> <99b3>
+<0f76> <99b1>
+<0f77> <99b4>
+<0f78> <9ae1>
+<0f79> <9ce9>
+<0f7a> <9e82>
+<0f7b> <9f0e>
+<0f7c> <9f13>
+<0f7d> <9f20>
+<0f7e> <50e7>
+<0f7f> <50ee>
+<0f80> <50e5>
+<0f81> <50d6>
+<0f82> <50ed>
+<0f83> <50da>
+<0f84> <50d5>
+<0f85> <50cf>
+<0f86> <50d1>
+<0f87> <50f1>
+<0f88> <50ce>
+<0f89> <50e9>
+<0f8a> <5162>
+<0f8b> <51f3>
+<0f8c> <5283>
+<0f8d> <5282>
+<0f8e> <5331>
+<0f8f> <53ad>
+<0f90> <55fe>
+<0f91> <5600>
+<0f92> <561b>
+<0f93> <5617>
+<0f94> <55fd>
+<0f95> <5614>
+<0f96> <5606>
+<0f97> <5609>
+<0f9a> <55f7>
+<0f9b> <5616>
+<0f9c> <561f>
+<0f9d> <5608>
+<0f9e> <5610>
+<0f9f> <55f6>
+<0fa0> <5718>
+<0fa1> <5716>
+<0fa2> <5875>
+<0fa3> <587e>
+<0fa4> <5883>
+<0fa5> <5893>
+<0fa6> <588a>
+<0fa7> <5879>
+<0fa8> <5885>
+<0fa9> <587d>
+<0faa> <58fd>
+<0fab> <5925>
+<0fac> <5922>
+<0fad> <5924>
+<0fae> <596a>
+<0faf> <5969>
+<0fb0> <5ae1>
+<0fb1> <5ae6>
+<0fb2> <5ae9>
+<0fb3> <5ad7>
+endbfchar
+
+100 beginbfchar
+<0fb4> <5ad6>
+<0fb5> <5ad8>
+<0fb6> <5ae3>
+<0fb7> <5b75>
+<0fb8> <5bde>
+<0fb9> <5be7>
+<0fba> <5be1>
+<0fbd> <5be8>
+<0fbe> <5be2>
+<0fbf> <5be4>
+<0fc0> <5bdf>
+<0fc1> <5c0d>
+<0fc2> <5c62>
+<0fc3> <5d84>
+<0fc4> <5d87>
+<0fc5> <5e5b>
+<0fc6> <5e63>
+<0fc7> <5e55>
+<0fc8> <5e57>
+<0fc9> <5e54>
+<0fca> <5ed3>
+<0fcb> <5ed6>
+<0fcc> <5f0a>
+<0fcd> <5f46>
+<0fce> <5f70>
+<0fcf> <5fb9>
+<0fd0> <6147>
+<0fd1> <613f>
+<0fd2> <614b>
+<0fd3> <6177>
+<0fd6> <615f>
+<0fd7> <615a>
+<0fd8> <6158>
+<0fd9> <6175>
+<0fda> <622a>
+<0fdb> <6487>
+<0fdc> <6458>
+<0fdd> <6454>
+<0fde> <64a4>
+<0fdf> <6478>
+<0fe0> <645f>
+<0fe1> <647a>
+<0fe2> <6451>
+<0fe3> <6467>
+<0fe4> <6434>
+<0fe5> <646d>
+<0fe6> <647b>
+<0fe7> <6572>
+<0fe8> <65a1>
+<0fe9> <65d7>
+<0fea> <65d6>
+<0feb> <66a2>
+<0fec> <66a8>
+<0fed> <669d>
+<0fee> <699c>
+<0fef> <69a8>
+<0ff0> <6995>
+<0ff1> <69c1>
+<0ff2> <69ae>
+<0ff3> <69d3>
+<0ff4> <69cb>
+<0ff5> <699b>
+<0ff6> <69b7>
+<0ff7> <69bb>
+<0ff8> <69ab>
+<0ff9> <69b4>
+<0ffa> <69d0>
+<0ffb> <69cd>
+<0ffc> <69ad>
+<0ffd> <69cc>
+<0ffe> <69a6>
+<0fff> <69c3>
+<1000> <69a3>
+<1001> <6b49>
+<1002> <6b4c>
+<1003> <6c33>
+<1004> <6f33>
+<1005> <6f14>
+<1006> <6efe>
+<1007> <6f13>
+<1008> <6ef4>
+<1009> <6f29>
+<100a> <6f3e>
+<100b> <6f20>
+<100c> <6f2c>
+<100d> <6f0f>
+<100e> <6f02>
+<100f> <6f22>
+<1010> <6eff>
+<1011> <6eef>
+<1012> <6f06>
+<1013> <6f31>
+<1014> <6f38>
+<1015> <6f32>
+<1016> <6f23>
+<1017> <6f15>
+<1018> <6f2b>
+<1019> <6f2f>
+<101a> <6f88>
+<101b> <6f2a>
+endbfchar
+
+100 beginbfchar
+<101c> <6eec>
+<101d> <6f01>
+<101e> <6ef2>
+<101f> <6ecc>
+<1020> <6ef7>
+<1021> <7194>
+<1022> <7199>
+<1023> <717d>
+<1024> <718a>
+<1025> <7184>
+<1026> <7192>
+<1027> <723e>
+<1028> <7292>
+<1029> <7296>
+<102a> <7344>
+<102b> <7350>
+<102c> <7464>
+<102d> <7463>
+<102e> <746a>
+<102f> <7470>
+<1030> <746d>
+<1031> <7504>
+<1032> <7591>
+<1033> <7627>
+<1034> <760d>
+<1035> <760b>
+<1036> <7609>
+<1037> <7613>
+<1038> <76e1>
+<1039> <76e3>
+<103a> <7784>
+<103b> <777d>
+<103c> <777f>
+<103d> <7761>
+<103e> <78c1>
+<103f> <789f>
+<1040> <78a7>
+<1041> <78b3>
+<1042> <78a9>
+<1043> <78a3>
+<1046> <798d>
+<1047> <7a2e>
+<1048> <7a31>
+<1049> <7aaa>
+<104a> <7aa9>
+<104b> <7aed>
+<104c> <7aef>
+<104d> <7ba1>
+<104e> <7b95>
+<104f> <7b8b>
+<1050> <7b75>
+<1051> <7b97>
+<1052> <7b9d>
+<1053> <7b94>
+<1054> <7b8f>
+<1055> <7bb8>
+<1056> <7b87>
+<1057> <7b84>
+<1058> <7cb9>
+<105b> <7dbb>
+<105c> <7db0>
+<105d> <7d9c>
+<1060> <7da0>
+<1061> <7dca>
+<1062> <7db4>
+<1063> <7db2>
+<1064> <7db1>
+<1065> <7dba>
+<1066> <7da2>
+<1067> <7dbf>
+<1068> <7db5>
+<1069> <7db8>
+<106a> <7dad>
+<106b> <7dd2>
+<106c> <7dc7>
+<106d> <7dac>
+<106e> <7f70>
+<1071> <7fdf>
+<1072> <805e>
+<1073> <805a>
+<1074> <8087>
+<1075> <8150>
+<1076> <8180>
+<1077> <818f>
+<1078> <8188>
+<1079> <818a>
+<107a> <817f>
+<107b> <8182>
+<107c> <81e7>
+<107d> <81fa>
+<107e> <8207>
+<107f> <8214>
+<1080> <821e>
+<1081> <824b>
+<1082> <84c9>
+<1083> <84bf>
+<1084> <84c6>
+<1085> <84c4>
+<1086> <8499>
+<1087> <849e>
+endbfchar
+
+100 beginbfchar
+<1088> <84b2>
+<1089> <849c>
+<108a> <84cb>
+<108b> <84b8>
+<108c> <84c0>
+<108d> <84d3>
+<108e> <8490>
+<108f> <84bc>
+<1090> <84d1>
+<1091> <84ca>
+<1092> <873f>
+<1093> <871c>
+<1094> <873b>
+<1095> <8722>
+<1096> <8725>
+<1097> <8734>
+<1098> <8718>
+<1099> <8755>
+<109a> <8737>
+<109b> <8729>
+<109c> <88f3>
+<109d> <8902>
+<109e> <88f4>
+<109f> <88f9>
+<10a0> <88f8>
+<10a1> <88fd>
+<10a2> <88e8>
+<10a3> <891a>
+<10a4> <88ef>
+<10a5> <8aa6>
+<10a6> <8a8c>
+<10a7> <8a9e>
+<10a8> <8aa3>
+<10a9> <8a8d>
+<10aa> <8aa1>
+<10ab> <8a93>
+<10ac> <8aa4>
+<10ad> <8aaa>
+<10ae> <8aa5>
+<10af> <8aa8>
+<10b0> <8a98>
+<10b1> <8a91>
+<10b2> <8a9a>
+<10b3> <8aa7>
+<10b4> <8c6a>
+<10b5> <8c8d>
+<10b6> <8c8c>
+<10b7> <8cd3>
+<10ba> <8d6b>
+<10bb> <8d99>
+<10bc> <8d95>
+<10bd> <8dfc>
+<10be> <8f14>
+<10bf> <8f12>
+<10c0> <8f15>
+<10c1> <8f13>
+<10c2> <8fa3>
+<10c3> <9060>
+<10c4> <9058>
+<10c5> <905c>
+<10c6> <9063>
+<10c7> <9059>
+<10c8> <905e>
+<10c9> <9062>
+<10ca> <905d>
+<10cb> <905b>
+<10cc> <9119>
+<10cd> <9118>
+<10ce> <911e>
+<10cf> <9175>
+<10d0> <9178>
+<10d1> <9177>
+<10d2> <9174>
+<10d3> <9278>
+<10d4> <92ac>
+<10d5> <9280>
+<10d6> <9285>
+<10d7> <9298>
+<10d8> <9296>
+<10d9> <927b>
+<10da> <9293>
+<10db> <929c>
+<10dc> <92a8>
+<10dd> <927c>
+<10de> <9291>
+<10df> <95a1>
+<10e2> <95a3>
+<10e3> <95a5>
+<10e4> <95a4>
+<10e5> <9699>
+<10e6> <969c>
+<10e7> <969b>
+<10e8> <96cc>
+<10e9> <96d2>
+<10ea> <9700>
+<10eb> <977c>
+<10ec> <9785>
+<10ed> <97f6>
+<10f0> <98af>
+<10f1> <98b1>
+endbfchar
+
+100 beginbfchar
+<10f2> <9903>
+<10f3> <9905>
+<10f4> <990c>
+<10f5> <9909>
+<10f6> <99c1>
+<10f9> <9ae6>
+<10fc> <9cf4>
+<10fd> <9cf6>
+<10fe> <9cf3>
+<10ff> <9ebc>
+<1100> <9f3b>
+<1101> <9f4a>
+<1102> <5104>
+<1103> <5100>
+<1104> <50fb>
+<1105> <50f5>
+<1106> <50f9>
+<1107> <5102>
+<110a> <5105>
+<110b> <51dc>
+<110f> <528d>
+<1110> <528a>
+<1111> <52f0>
+<1112> <53b2>
+<1113> <562e>
+<1114> <563b>
+<1115> <5639>
+<1116> <5632>
+<1117> <563f>
+<1118> <5634>
+<1119> <5629>
+<111a> <5653>
+<111b> <564e>
+<111c> <5657>
+<111d> <5674>
+<111e> <5636>
+<1121> <5880>
+<1122> <589f>
+<1123> <589e>
+<1124> <58b3>
+<1125> <589c>
+<1126> <58ae>
+<1127> <58a9>
+<1128> <58a6>
+<1129> <596d>
+<112a> <5b09>
+<112b> <5afb>
+<112c> <5b0b>
+<112d> <5af5>
+<112e> <5b0c>
+<112f> <5b08>
+<1130> <5bee>
+<1131> <5bec>
+<1132> <5be9>
+<1133> <5beb>
+<1136> <5d9d>
+<1137> <5d94>
+<1138> <5e62>
+<1139> <5e5f>
+<113a> <5e61>
+<113b> <5ee2>
+<113c> <5eda>
+<113d> <5edf>
+<113e> <5edd>
+<113f> <5ee3>
+<1140> <5ee0>
+<1141> <5f48>
+<1142> <5f71>
+<1143> <5fb7>
+<1144> <5fb5>
+<1145> <6176>
+<1146> <6167>
+<1147> <616e>
+<1148> <615d>
+<1149> <6155>
+<114a> <6182>
+<114b> <617c>
+<114c> <6170>
+<114d> <616b>
+<114e> <617e>
+<114f> <61a7>
+<1150> <6190>
+<1151> <61ab>
+<1152> <618e>
+<1153> <61ac>
+<1154> <619a>
+<1155> <61a4>
+<1156> <6194>
+<1157> <61ae>
+<1158> <622e>
+<1159> <6469>
+<115a> <646f>
+<115b> <6479>
+<115c> <649e>
+<115d> <64b2>
+<115e> <6488>
+<115f> <6490>
+<1160> <64b0>
+<1161> <64a5>
+<1162> <6493>
+endbfchar
+
+100 beginbfchar
+<1163> <6495>
+<1164> <64a9>
+<1165> <6492>
+<1166> <64ae>
+<1167> <64ad>
+<1168> <64ab>
+<1169> <649a>
+<116a> <64ac>
+<116b> <6499>
+<116c> <64a2>
+<116d> <64b3>
+<116e> <6575>
+<1171> <66ae>
+<1172> <66ab>
+<1173> <66b4>
+<1174> <66b1>
+<1175> <6a23>
+<1176> <6a1f>
+<1177> <69e8>
+<1178> <6a01>
+<1179> <6a1e>
+<117a> <6a19>
+<117b> <69fd>
+<117c> <6a21>
+<117d> <6a13>
+<117e> <6a0a>
+<117f> <69f3>
+<1180> <6a02>
+<1181> <6a05>
+<1182> <69ed>
+<1183> <6a11>
+<1184> <6b50>
+<1185> <6b4e>
+<1186> <6ba4>
+<1189> <6f3f>
+<118a> <6f7c>
+<118b> <6f84>
+<118c> <6f51>
+<118d> <6f66>
+<118e> <6f54>
+<118f> <6f86>
+<1190> <6f6d>
+<1191> <6f5b>
+<1192> <6f78>
+<1193> <6f6e>
+<1194> <6f8e>
+<1195> <6f7a>
+<1196> <6f70>
+<1197> <6f64>
+<1198> <6f97>
+<1199> <6f58>
+<119a> <6ed5>
+<119b> <6f6f>
+<119c> <6f60>
+<119d> <6f5f>
+<119e> <719f>
+<119f> <71ac>
+<11a0> <71b1>
+<11a1> <71a8>
+<11a2> <7256>
+<11a3> <729b>
+<11a4> <734e>
+<11a5> <7357>
+<11a6> <7469>
+<11a7> <748b>
+<11a8> <7483>
+<11a9> <747e>
+<11aa> <7480>
+<11ab> <757f>
+<11ac> <7620>
+<11ad> <7629>
+<11ae> <761f>
+<11af> <7624>
+<11b0> <7626>
+<11b3> <769a>
+<11b4> <76ba>
+<11b5> <76e4>
+<11b6> <778e>
+<11b7> <7787>
+<11b8> <778c>
+<11b9> <7791>
+<11ba> <778b>
+<11bb> <78cb>
+<11bc> <78c5>
+<11bd> <78ba>
+<11be> <78ca>
+<11bf> <78be>
+<11c0> <78d5>
+<11c1> <78bc>
+<11c2> <78d0>
+<11c3> <7a3f>
+<11c4> <7a3c>
+<11c5> <7a40>
+<11c6> <7a3d>
+<11c7> <7a37>
+<11c8> <7a3b>
+<11c9> <7aaf>
+<11ca> <7aae>
+<11cb> <7bad>
+<11cc> <7bb1>
+endbfchar
+
+100 beginbfchar
+<11cd> <7bc4>
+<11ce> <7bb4>
+<11d1> <7bc1>
+<11d2> <7ba0>
+<11d3> <7bcc>
+<11d4> <7cca>
+<11d5> <7de0>
+<11d6> <7df4>
+<11d7> <7def>
+<11d8> <7dfb>
+<11d9> <7dd8>
+<11da> <7dec>
+<11db> <7ddd>
+<11dc> <7de8>
+<11dd> <7de3>
+<11de> <7dda>
+<11df> <7dde>
+<11e0> <7de9>
+<11e1> <7d9e>
+<11e2> <7dd9>
+<11e3> <7df2>
+<11e4> <7df9>
+<11e5> <7f75>
+<11e6> <7f77>
+<11e7> <7faf>
+<11e8> <7fe9>
+<11e9> <8026>
+<11ed> <81a0>
+<11ee> <819a>
+<11ef> <8198>
+<11f0> <8517>
+<11f1> <853d>
+<11f2> <851a>
+<11f3> <84ee>
+<11f6> <8513>
+<11f7> <8511>
+<11f8> <8523>
+<11f9> <8521>
+<11fa> <8514>
+<11fb> <84ec>
+<11fc> <8525>
+<11fd> <84ff>
+<11fe> <8506>
+<11ff> <8782>
+<1200> <8774>
+<1201> <8776>
+<1202> <8760>
+<1203> <8766>
+<1204> <8778>
+<1205> <8768>
+<1206> <8759>
+<1207> <8757>
+<1208> <874c>
+<1209> <8753>
+<120a> <885b>
+<120b> <885d>
+<120c> <8910>
+<120d> <8907>
+<1210> <8915>
+<1211> <890a>
+<1212> <8abc>
+<1213> <8ad2>
+<1214> <8ac7>
+<1215> <8ac4>
+<1216> <8a95>
+<1217> <8acb>
+<1218> <8af8>
+<1219> <8ab2>
+<121a> <8ac9>
+<121b> <8ac2>
+<121c> <8abf>
+<121d> <8ab0>
+<121e> <8ad6>
+<121f> <8acd>
+<1220> <8ab6>
+<1221> <8ab9>
+<1222> <8adb>
+<1223> <8c4c>
+<1224> <8c4e>
+<1225> <8c6c>
+<1226> <8ce0>
+<1227> <8cde>
+<1228> <8ce6>
+<1229> <8ce4>
+<122e> <8cdc>
+<122f> <8cea>
+<1230> <8ce1>
+<1231> <8d6d>
+<1232> <8d9f>
+<1233> <8da3>
+<1234> <8e2b>
+<1235> <8e10>
+<1236> <8e1d>
+<1237> <8e22>
+<1238> <8e0f>
+<1239> <8e29>
+<123a> <8e1f>
+<123b> <8e21>
+<123c> <8e1e>
+<123d> <8eba>
+endbfchar
+
+100 beginbfchar
+<123e> <8f1d>
+<123f> <8f1b>
+<1240> <8f1f>
+<1241> <8f29>
+<1242> <8f26>
+<1243> <8f2a>
+<1244> <8f1c>
+<1245> <8f1e>
+<1246> <8f25>
+<1247> <9069>
+<1248> <906e>
+<1249> <9068>
+<124a> <906d>
+<124b> <9077>
+<124c> <9130>
+<124d> <912d>
+<124e> <9127>
+<124f> <9131>
+<1250> <9187>
+<1251> <9189>
+<1252> <918b>
+<1253> <9183>
+<1254> <92c5>
+<1255> <92bb>
+<1256> <92b7>
+<1257> <92ea>
+<1258> <92e4>
+<1259> <92c1>
+<125a> <92b3>
+<125b> <92bc>
+<125c> <92d2>
+<125d> <92c7>
+<125e> <92f0>
+<125f> <92b2>
+<1260> <95ad>
+<1261> <95b1>
+<1262> <9704>
+<1265> <9709>
+<1266> <9760>
+<1267> <978d>
+<1268> <978b>
+<1269> <978f>
+<126a> <9821>
+<126b> <982b>
+<126c> <981c>
+<126d> <98b3>
+<126e> <990a>
+<126f> <9913>
+<1270> <9912>
+<1271> <9918>
+<1272> <99dd>
+<1273> <99d0>
+<1274> <99df>
+<1275> <99db>
+<1276> <99d1>
+<1277> <99d5>
+<1278> <99d2>
+<1279> <99d9>
+<127a> <9ab7>
+<127d> <9b27>
+<127e> <9b45>
+<127f> <9b44>
+<1280> <9b77>
+<1281> <9b6f>
+<1282> <9d06>
+<1283> <9d09>
+<1284> <9d03>
+<1285> <9ea9>
+<1286> <9ebe>
+<1287> <9ece>
+<1288> <58a8>
+<1289> <9f52>
+<128a> <5112>
+<128b> <5118>
+<128c> <5114>
+<128d> <5110>
+<128e> <5115>
+<128f> <5180>
+<1290> <51aa>
+<1291> <51dd>
+<1292> <5291>
+<1293> <5293>
+<1294> <52f3>
+<1295> <5659>
+<1296> <566b>
+<1297> <5679>
+<1298> <5669>
+<1299> <5664>
+<129a> <5678>
+<129b> <566a>
+<129c> <5668>
+<129d> <5665>
+<129e> <5671>
+<129f> <566f>
+<12a0> <566c>
+<12a1> <5662>
+<12a2> <5676>
+<12a3> <58c1>
+<12a4> <58be>
+<12a5> <58c7>
+endbfchar
+
+100 beginbfchar
+<12a6> <58c5>
+<12a7> <596e>
+<12a8> <5b1d>
+<12a9> <5b34>
+<12aa> <5b78>
+<12ab> <5bf0>
+<12ac> <5c0e>
+<12ad> <5f4a>
+<12ae> <61b2>
+<12af> <6191>
+<12b0> <61a9>
+<12b1> <618a>
+<12b2> <61cd>
+<12b3> <61b6>
+<12b4> <61be>
+<12b5> <61ca>
+<12b6> <61c8>
+<12b7> <6230>
+<12b8> <64c5>
+<12b9> <64c1>
+<12ba> <64cb>
+<12bd> <64da>
+<12be> <64c4>
+<12bf> <64c7>
+<12c0> <64c2>
+<12c1> <64cd>
+<12c2> <64bf>
+<12c3> <64d2>
+<12c4> <64d4>
+<12c5> <64be>
+<12c6> <6574>
+<12c7> <66c6>
+<12c8> <66c9>
+<12c9> <66b9>
+<12ca> <66c4>
+<12cb> <66c7>
+<12cc> <66b8>
+<12cd> <6a3d>
+<12ce> <6a38>
+<12cf> <6a3a>
+<12d0> <6a59>
+<12d1> <6a6b>
+<12d2> <6a58>
+<12d3> <6a39>
+<12d4> <6a44>
+<12d5> <6a62>
+<12d6> <6a61>
+<12d7> <6a4b>
+<12d8> <6a47>
+<12d9> <6a35>
+<12da> <6a5f>
+<12db> <6a48>
+<12dc> <6b59>
+<12dd> <6b77>
+<12de> <6c05>
+<12df> <6fc2>
+<12e0> <6fb1>
+<12e1> <6fa1>
+<12e2> <6fc3>
+<12e3> <6fa4>
+<12e4> <6fc1>
+<12e5> <6fa7>
+<12e6> <6fb3>
+<12e7> <6fc0>
+<12e8> <6fb9>
+<12e9> <6fb6>
+<12ea> <6fa6>
+<12eb> <6fa0>
+<12ec> <6fb4>
+<12ed> <71be>
+<12ee> <71c9>
+<12ef> <71d0>
+<12f0> <71d2>
+<12f1> <71c8>
+<12f2> <71d5>
+<12f3> <71b9>
+<12f4> <71ce>
+<12f5> <71d9>
+<12f6> <71dc>
+<12f9> <7368>
+<12fa> <749c>
+<12fb> <74a3>
+<12fc> <7498>
+<12fd> <749f>
+<12fe> <749e>
+<12ff> <74e2>
+<1302> <7634>
+<1303> <7638>
+<1304> <763a>
+<1305> <76e7>
+<1306> <76e5>
+<1307> <77a0>
+<130a> <77a5>
+<130b> <78e8>
+<130c> <78da>
+<130d> <78ec>
+<130e> <78e7>
+<130f> <79a6>
+<1312> <7a46>
+<1313> <7a4c>
+endbfchar
+
+100 beginbfchar
+<1314> <7a4b>
+<1315> <7aba>
+<1316> <7bd9>
+<1317> <7c11>
+<1318> <7bc9>
+<1319> <7be4>
+<131a> <7bdb>
+<131b> <7be1>
+<131c> <7be9>
+<131d> <7be6>
+<1320> <7e0a>
+<1321> <7e11>
+<1322> <7e08>
+<1323> <7e1b>
+<1324> <7e23>
+<1325> <7e1e>
+<1326> <7e1d>
+<1327> <7e09>
+<1328> <7e10>
+<1329> <7f79>
+<132a> <7fb2>
+<132d> <7fee>
+<132e> <8028>
+<132f> <81b3>
+<1330> <81a9>
+<1331> <81a8>
+<1332> <81fb>
+<1333> <8208>
+<1336> <854a>
+<1337> <8559>
+<1338> <8548>
+<133b> <8543>
+<133c> <8549>
+<133d> <856d>
+<133e> <856a>
+<133f> <855e>
+<1340> <8783>
+<1341> <879f>
+<1342> <879e>
+<1343> <87a2>
+<1344> <878d>
+<1345> <8861>
+<1346> <892a>
+<1347> <8932>
+<1348> <8925>
+<1349> <892b>
+<134a> <8921>
+<134b> <89aa>
+<134c> <89a6>
+<134d> <8ae6>
+<134e> <8afa>
+<134f> <8aeb>
+<1350> <8af1>
+<1351> <8b00>
+<1352> <8adc>
+<1353> <8ae7>
+<1354> <8aee>
+<1355> <8afe>
+<1358> <8af7>
+<1359> <8aed>
+<135a> <8af3>
+<135b> <8af6>
+<135c> <8afc>
+<135d> <8c6b>
+<135e> <8c6d>
+<135f> <8c93>
+<1360> <8cf4>
+<1361> <8e44>
+<1362> <8e31>
+<1363> <8e34>
+<1364> <8e42>
+<1365> <8e39>
+<1366> <8e35>
+<1367> <8f3b>
+<1368> <8f2f>
+<1369> <8f38>
+<136a> <8f33>
+<136b> <8fa8>
+<136c> <8fa6>
+<136d> <9075>
+<136e> <9074>
+<136f> <9078>
+<1370> <9072>
+<1371> <907c>
+<1372> <907a>
+<1373> <9134>
+<1374> <9192>
+<1375> <9320>
+<1376> <9336>
+<1377> <92f8>
+<1378> <9333>
+<1379> <932f>
+<137a> <9322>
+<137b> <92fc>
+<137c> <932b>
+<137d> <9304>
+<137e> <931a>
+<137f> <9310>
+<1380> <9326>
+<1381> <9321>
+endbfchar
+
+100 beginbfchar
+<1382> <9315>
+<1383> <932e>
+<1384> <9319>
+<1385> <95bb>
+<1388> <96aa>
+<1389> <96d5>
+<138a> <970e>
+<138b> <9711>
+<138c> <9716>
+<138d> <970d>
+<138e> <9713>
+<138f> <970f>
+<1392> <9766>
+<1393> <9798>
+<1394> <9830>
+<1395> <9838>
+<1396> <983b>
+<1397> <9837>
+<1398> <982d>
+<1399> <9839>
+<139a> <9824>
+<139b> <9910>
+<139c> <9928>
+<139d> <991e>
+<139e> <991b>
+<139f> <9921>
+<13a0> <991a>
+<13a1> <99ed>
+<13a2> <99e2>
+<13a3> <99f1>
+<13a4> <9ab8>
+<13a5> <9abc>
+<13a6> <9afb>
+<13a7> <9aed>
+<13a8> <9b28>
+<13a9> <9b91>
+<13aa> <9d15>
+<13ab> <9d23>
+<13ac> <9d26>
+<13ad> <9d28>
+<13ae> <9d12>
+<13af> <9d1b>
+<13b0> <9ed8>
+<13b1> <9ed4>
+<13b2> <9f8d>
+<13b3> <9f9c>
+<13b4> <512a>
+<13b5> <511f>
+<13b6> <5121>
+<13b7> <5132>
+<13b8> <52f5>
+<13b9> <568e>
+<13ba> <5680>
+<13bb> <5690>
+<13bc> <5685>
+<13bd> <5687>
+<13be> <568f>
+<13bf> <58d5>
+<13c0> <58d3>
+<13c1> <58d1>
+<13c2> <58ce>
+<13c3> <5b30>
+<13c4> <5b2a>
+<13c5> <5b24>
+<13c6> <5b7a>
+<13c7> <5c37>
+<13c8> <5c68>
+<13c9> <5dbc>
+<13ca> <5dba>
+<13cb> <5dbd>
+<13cc> <5db8>
+<13cd> <5e6b>
+<13ce> <5f4c>
+<13cf> <5fbd>
+<13d0> <61c9>
+<13d1> <61c2>
+<13d2> <61c7>
+<13d3> <61e6>
+<13d4> <61cb>
+<13d5> <6232>
+<13d6> <6234>
+<13d7> <64ce>
+<13d8> <64ca>
+<13d9> <64d8>
+<13da> <64e0>
+<13db> <64f0>
+<13dc> <64e6>
+<13dd> <64ec>
+<13de> <64f1>
+<13df> <64e2>
+<13e0> <64ed>
+<13e3> <66d9>
+<13e4> <66d6>
+<13e5> <6a80>
+<13e6> <6a94>
+<13e7> <6a84>
+<13e8> <6aa2>
+<13e9> <6a9c>
+<13ea> <6adb>
+<13eb> <6aa3>
+endbfchar
+
+100 beginbfchar
+<13ec> <6a7e>
+<13ed> <6a97>
+<13ee> <6a90>
+<13ef> <6aa0>
+<13f0> <6b5c>
+<13f1> <6bae>
+<13f2> <6bda>
+<13f3> <6c08>
+<13f4> <6fd8>
+<13f5> <6ff1>
+<13f8> <6fdb>
+<13f9> <6fe4>
+<13fa> <6feb>
+<13fb> <6fef>
+<13fc> <6f80>
+<13fd> <6fec>
+<13fe> <6fe1>
+<13ff> <6fe9>
+<1400> <6fd5>
+<1401> <6fee>
+<1402> <6ff0>
+<1403> <71e7>
+<1404> <71df>
+<1405> <71ee>
+<1406> <71e6>
+<1407> <71e5>
+<1408> <71ed>
+<1409> <71ec>
+<140a> <71f4>
+<140b> <71e0>
+<140c> <7235>
+<140d> <7246>
+<140e> <7370>
+<140f> <7372>
+<1410> <74a9>
+<1411> <74b0>
+<1412> <74a6>
+<1413> <74a8>
+<1414> <7646>
+<1415> <7642>
+<1416> <764c>
+<1417> <76ea>
+<1418> <77b3>
+<1419> <77aa>
+<141a> <77b0>
+<141b> <77ac>
+<141c> <77a7>
+<141d> <77ad>
+<141e> <77ef>
+<141f> <78f7>
+<1420> <78fa>
+<1421> <78f4>
+<1422> <78ef>
+<1423> <7901>
+<1424> <79a7>
+<1425> <79aa>
+<1426> <7a57>
+<1427> <7abf>
+<1428> <7c07>
+<1429> <7c0d>
+<142a> <7bfe>
+<142b> <7bf7>
+<142c> <7c0c>
+<142d> <7be0>
+<142e> <7ce0>
+<142f> <7cdc>
+<1430> <7cde>
+<1431> <7ce2>
+<1432> <7cdf>
+<1433> <7cd9>
+<1434> <7cdd>
+<1435> <7e2e>
+<1436> <7e3e>
+<1437> <7e46>
+<1438> <7e37>
+<1439> <7e32>
+<143a> <7e43>
+<143b> <7e2b>
+<143c> <7e3d>
+<143d> <7e31>
+<143e> <7e45>
+<143f> <7e41>
+<1440> <7e34>
+<1441> <7e39>
+<1442> <7e48>
+<1443> <7e35>
+<1444> <7e3f>
+<1445> <7e2f>
+<1446> <7f44>
+<1447> <7ff3>
+<1448> <7ffc>
+<144b> <8070>
+<144c> <806f>
+<144d> <8073>
+<144e> <81c6>
+<144f> <81c3>
+<1450> <81ba>
+<1451> <81c2>
+<1452> <81c0>
+<1453> <81bf>
+endbfchar
+
+100 beginbfchar
+<1454> <81bd>
+<1455> <81c9>
+<1456> <81be>
+<1457> <81e8>
+<1458> <8209>
+<1459> <8271>
+<145a> <85aa>
+<145b> <8584>
+<145c> <857e>
+<145d> <859c>
+<145e> <8591>
+<145f> <8594>
+<1460> <85af>
+<1461> <859b>
+<1462> <8587>
+<1463> <85a8>
+<1464> <858a>
+<1465> <85a6>
+<1466> <8667>
+<1467> <87c0>
+<1468> <87d1>
+<1469> <87b3>
+<146a> <87d2>
+<146b> <87c6>
+<146c> <87ab>
+<146d> <87bb>
+<146e> <87ba>
+<146f> <87c8>
+<1470> <87cb>
+<1471> <893b>
+<1472> <8936>
+<1473> <8944>
+<1474> <8938>
+<1475> <893d>
+<1476> <89ac>
+<1477> <8b0e>
+<1478> <8b17>
+<1479> <8b19>
+<147a> <8b1b>
+<147b> <8b0a>
+<147c> <8b20>
+<147d> <8b1d>
+<147e> <8b04>
+<147f> <8b10>
+<1480> <8c41>
+<1481> <8c3f>
+<1482> <8c73>
+<1483> <8cfa>
+<1484> <8cfd>
+<1485> <8cfc>
+<1486> <8cf8>
+<1487> <8cfb>
+<1488> <8da8>
+<1489> <8e49>
+<148a> <8e4b>
+<148b> <8e48>
+<148c> <8e4a>
+<148d> <8f44>
+<148e> <8f3e>
+<148f> <8f42>
+<1490> <8f45>
+<1491> <8f3f>
+<1492> <907f>
+<1493> <907d>
+<1494> <9084>
+<1497> <9080>
+<1498> <9139>
+<1499> <91a3>
+<149a> <919e>
+<149b> <919c>
+<149c> <934d>
+<149d> <9382>
+<149e> <9328>
+<149f> <9375>
+<14a0> <934a>
+<14a1> <9365>
+<14a2> <934b>
+<14a3> <9318>
+<14a4> <937e>
+<14a5> <936c>
+<14a6> <935b>
+<14a7> <9370>
+<14a8> <935a>
+<14a9> <9354>
+<14ad> <95c8>
+<14ae> <95c6>
+<14af> <96b1>
+<14b0> <96b8>
+<14b1> <96d6>
+<14b2> <971c>
+<14b3> <971e>
+<14b4> <97a0>
+<14b5> <97d3>
+<14b6> <9846>
+<14b7> <98b6>
+<14b8> <9935>
+<14b9> <9a01>
+<14ba> <99ff>
+<14bb> <9bae>
+<14bc> <9bab>
+endbfchar
+
+100 beginbfchar
+<14bd> <9baa>
+<14be> <9bad>
+<14bf> <9d3b>
+<14c0> <9d3f>
+<14c1> <9e8b>
+<14c2> <9ecf>
+<14c3> <9ede>
+<14c6> <9edb>
+<14c7> <9f3e>
+<14c8> <9f4b>
+<14c9> <53e2>
+<14ca> <5695>
+<14cb> <56ae>
+<14cc> <58d9>
+<14cd> <58d8>
+<14ce> <5b38>
+<14cf> <5f5d>
+<14d0> <61e3>
+<14d1> <6233>
+<14d2> <64f4>
+<14d3> <64f2>
+<14d4> <64fe>
+<14d5> <6506>
+<14d8> <64f7>
+<14d9> <65b7>
+<14da> <66dc>
+<14db> <6726>
+<14dc> <6ab3>
+<14dd> <6aac>
+<14de> <6ac3>
+<14df> <6abb>
+<14e0> <6ab8>
+<14e1> <6ac2>
+<14e4> <6b5f>
+<14e5> <6b78>
+<14e6> <6baf>
+<14e7> <7009>
+<14e8> <700b>
+<14e9> <6ffe>
+<14ea> <7006>
+<14eb> <6ffa>
+<14ec> <7011>
+<14ed> <700f>
+<14f0> <71fe>
+<14f1> <71f8>
+<14f2> <7377>
+<14f3> <7375>
+<14f4> <74a7>
+<14f5> <74bf>
+<14f6> <7515>
+<14f7> <7656>
+<14f8> <7658>
+<14f9> <7652>
+<14fa> <77bd>
+<14fb> <77bf>
+<14fe> <790e>
+<14ff> <79ae>
+<1502> <7a60>
+<1505> <7c2b>
+<1506> <7c27>
+<1507> <7c2a>
+<1508> <7c1e>
+<1509> <7c23>
+<150a> <7c21>
+<150b> <7ce7>
+<150e> <7e5e>
+<150f> <7e5a>
+<1510> <7e61>
+<1511> <7e52>
+<1512> <7e59>
+<1513> <7f48>
+<1514> <7ff9>
+<1515> <7ffb>
+<1516> <8077>
+<1517> <8076>
+<1518> <81cd>
+<1519> <81cf>
+<151a> <820a>
+<151b> <85cf>
+<151c> <85a9>
+<151d> <85cd>
+<151e> <85d0>
+<151f> <85c9>
+<1520> <85b0>
+<1521> <85ba>
+<1522> <85b9>
+<1523> <87ef>
+<1524> <87ec>
+<1525> <87f2>
+<1526> <87e0>
+<1527> <8986>
+<1528> <89b2>
+<1529> <89f4>
+<152a> <8b28>
+<152b> <8b39>
+<152c> <8b2c>
+<152d> <8b2b>
+<152e> <8c50>
+<152f> <8d05>
+<1530> <8e59>
+endbfchar
+
+100 beginbfchar
+<1531> <8e63>
+<1532> <8e66>
+<1533> <8e64>
+<1534> <8e5f>
+<1535> <8e55>
+<1536> <8ec0>
+<1537> <8f49>
+<1538> <8f4d>
+<1539> <9087>
+<153a> <9083>
+<153b> <9088>
+<153e> <91d0>
+<153f> <9394>
+<1540> <938a>
+<1541> <9396>
+<1542> <93a2>
+<1543> <93b3>
+<1544> <93ae>
+<1545> <93ac>
+<1546> <93b0>
+<1547> <9398>
+<1548> <939a>
+<1549> <9397>
+<154a> <95d4>
+<154b> <95d6>
+<154c> <95d0>
+<154d> <95d5>
+<154e> <96e2>
+<154f> <96dc>
+<1550> <96d9>
+<1551> <96db>
+<1552> <96de>
+<1553> <9724>
+<1554> <97a3>
+<1555> <97a6>
+<1556> <97ad>
+<1557> <97f9>
+<1558> <984d>
+<1559> <984f>
+<155a> <984c>
+<155b> <984e>
+<155c> <9853>
+<155d> <98ba>
+<1560> <993d>
+<1561> <992e>
+<1562> <99a5>
+<1563> <9a0e>
+<1564> <9ac1>
+<1565> <9b03>
+<1566> <9b06>
+<1567> <9b4f>
+<1568> <9b4e>
+<1569> <9b4d>
+<156a> <9bca>
+<156b> <9bc9>
+<156c> <9bfd>
+<156d> <9bc8>
+<156e> <9bc0>
+<156f> <9d51>
+<1570> <9d5d>
+<1571> <9d60>
+<1572> <9ee0>
+<1573> <9f15>
+<1574> <9f2c>
+<1575> <5133>
+<1576> <56a5>
+<1577> <56a8>
+<157a> <58e2>
+<157b> <5bf5>
+<157c> <9f90>
+<157d> <5eec>
+<157e> <61f2>
+<157f> <61f7>
+<1580> <61f6>
+<1581> <61f5>
+<1582> <6500>
+<1583> <650f>
+<1584> <66e0>
+<1585> <66dd>
+<1586> <6ae5>
+<1587> <6add>
+<1588> <6ada>
+<1589> <6ad3>
+<158a> <701b>
+<158b> <701f>
+<158c> <7028>
+<158d> <701a>
+<158e> <701d>
+<158f> <7015>
+<1590> <7018>
+<1591> <7206>
+<1592> <720d>
+<1593> <7258>
+<1594> <72a2>
+<1595> <7378>
+<1596> <737a>
+<1597> <74bd>
+<1598> <74ca>
+<1599> <74e3>
+<159a> <7587>
+endbfchar
+
+100 beginbfchar
+<159b> <7586>
+<159c> <765f>
+<159d> <7661>
+<159e> <77c7>
+<159f> <7919>
+<15a0> <79b1>
+<15a1> <7a6b>
+<15a2> <7a69>
+<15a5> <7c38>
+<15a6> <7c3d>
+<15a7> <7c37>
+<15a8> <7c40>
+<15a9> <7e6b>
+<15aa> <7e6d>
+<15ab> <7e79>
+<15ae> <7e73>
+<15af> <7f85>
+<15b0> <7fb6>
+<15b1> <7fb9>
+<15b2> <7fb8>
+<15b3> <81d8>
+<15b4> <85e9>
+<15b5> <85dd>
+<15b6> <85ea>
+<15b7> <85d5>
+<15ba> <85f7>
+<15bb> <87fb>
+<15bc> <8805>
+<15bd> <880d>
+<15be> <87f9>
+<15bf> <87fe>
+<15c0> <8960>
+<15c1> <895f>
+<15c2> <8956>
+<15c3> <895e>
+<15c4> <8b41>
+<15c5> <8b5c>
+<15c6> <8b58>
+<15c7> <8b49>
+<15c8> <8b5a>
+<15cb> <8b46>
+<15cc> <8b59>
+<15cd> <8d08>
+<15ce> <8d0a>
+<15cf> <8e7c>
+<15d0> <8e72>
+<15d1> <8e87>
+<15d2> <8e76>
+<15d3> <8e6c>
+<15d4> <8e7a>
+<15d5> <8e74>
+<15d6> <8f54>
+<15d7> <8f4e>
+<15d8> <8fad>
+<15db> <91b1>
+<15dc> <91ae>
+<15dd> <93e1>
+<15de> <93d1>
+<15df> <93df>
+<15e0> <93c3>
+<15e1> <93c8>
+<15e4> <93d6>
+<15e5> <93e2>
+<15e6> <93cd>
+<15e7> <93d8>
+<15e8> <93e4>
+<15e9> <93d7>
+<15ea> <93e8>
+<15eb> <95dc>
+<15ec> <96b4>
+<15ed> <96e3>
+<15ee> <972a>
+<15ef> <9727>
+<15f0> <9761>
+<15f1> <97dc>
+<15f2> <97fb>
+<15f3> <985e>
+<15f4> <9858>
+<15f5> <985b>
+<15f6> <98bc>
+<15f7> <9945>
+<15f8> <9949>
+<15f9> <9a16>
+<15fa> <9a19>
+<15fb> <9b0d>
+<15fc> <9be8>
+<15fd> <9be7>
+<15fe> <9bd6>
+<15ff> <9bdb>
+<1600> <9d89>
+<1601> <9d61>
+<1602> <9d72>
+<1603> <9d6a>
+<1604> <9d6c>
+<1605> <9e92>
+<1606> <9e97>
+<1607> <9e93>
+<1608> <9eb4>
+<1609> <52f8>
+<160a> <56b7>
+endbfchar
+
+100 beginbfchar
+<160b> <56b6>
+<160c> <56b4>
+<160d> <56bc>
+<160e> <58e4>
+<160f> <5b40>
+<1610> <5b43>
+<1611> <5b7d>
+<1612> <5bf6>
+<1613> <5dc9>
+<1614> <61f8>
+<1615> <61fa>
+<1616> <6518>
+<1617> <6514>
+<1618> <6519>
+<1619> <66e6>
+<161a> <6727>
+<161b> <6aec>
+<161c> <703e>
+<161d> <7030>
+<161e> <7032>
+<161f> <7210>
+<1620> <737b>
+<1621> <74cf>
+<1622> <7662>
+<1623> <7665>
+<1624> <7926>
+<1625> <792a>
+<1626> <792c>
+<1627> <792b>
+<1628> <7ac7>
+<1629> <7af6>
+<162a> <7c4c>
+<162b> <7c43>
+<162c> <7c4d>
+<162f> <8fae>
+<1630> <7e7d>
+<1631> <7e7c>
+<1632> <7e82>
+<1633> <7f4c>
+<1634> <8000>
+<1635> <81da>
+<1636> <8266>
+<1637> <85fb>
+<1638> <85f9>
+<1639> <8611>
+<163a> <85fa>
+<163b> <8606>
+<163c> <860b>
+<163d> <8607>
+<163e> <860a>
+<1641> <8964>
+<1642> <89ba>
+<1643> <89f8>
+<1644> <8b70>
+<1645> <8b6c>
+<1646> <8b66>
+<1647> <8b6f>
+<1648> <8b5f>
+<1649> <8b6b>
+<164a> <8d0f>
+<164b> <8d0d>
+<164c> <8e89>
+<164d> <8e81>
+<164e> <8e85>
+<164f> <8e82>
+<1650> <91b4>
+<1651> <91cb>
+<1652> <9418>
+<1653> <9403>
+<1654> <93fd>
+<1655> <95e1>
+<1656> <9730>
+<1657> <98c4>
+<1658> <9952>
+<1659> <9951>
+<165a> <99a8>
+<165b> <9a2b>
+<165c> <9a30>
+<165d> <9a37>
+<165e> <9a35>
+<165f> <9c13>
+<1660> <9c0d>
+<1661> <9e79>
+<1662> <9eb5>
+<1663> <9ee8>
+<1664> <9f2f>
+<1665> <9f5f>
+<1666> <9f63>
+<1667> <9f61>
+<166a> <56c1>
+<166b> <56c0>
+<166c> <56c2>
+<166d> <5914>
+<166e> <5c6c>
+<166f> <5dcd>
+<1670> <61fc>
+<1671> <61fe>
+<1672> <651d>
+<1673> <651c>
+<1674> <6595>
+endbfchar
+
+100 beginbfchar
+<1675> <66e9>
+<1676> <6afb>
+<1677> <6b04>
+<1678> <6afa>
+<1679> <6bb2>
+<167a> <704c>
+<167b> <721b>
+<167c> <72a7>
+<167d> <74d6>
+<167e> <74d4>
+<167f> <7669>
+<1680> <77d3>
+<1681> <7c50>
+<1682> <7e8f>
+<1683> <7e8c>
+<1684> <7fbc>
+<1685> <8617>
+<1686> <862d>
+<1687> <861a>
+<1688> <8823>
+<1689> <8822>
+<168a> <8821>
+<168b> <881f>
+<168c> <896a>
+<168d> <896c>
+<168e> <89bd>
+<168f> <8b74>
+<1690> <8b77>
+<1691> <8b7d>
+<1692> <8d13>
+<1693> <8e8a>
+<1694> <8e8d>
+<1695> <8e8b>
+<1696> <8f5f>
+<1697> <8faf>
+<1698> <91ba>
+<1699> <942e>
+<169a> <9433>
+<169b> <9435>
+<169c> <943a>
+<169d> <9438>
+<169e> <9432>
+<169f> <942b>
+<16a0> <95e2>
+<16a3> <9732>
+<16a4> <97ff>
+<16a5> <9867>
+<16a6> <9865>
+<16a7> <9957>
+<16a8> <9a45>
+<16a9> <9a43>
+<16aa> <9a40>
+<16ab> <9a3e>
+<16ac> <9acf>
+<16ad> <9b54>
+<16ae> <9b51>
+<16af> <9c2d>
+<16b0> <9c25>
+<16b1> <9daf>
+<16b2> <9db4>
+<16b3> <9dc2>
+<16b4> <9db8>
+<16b5> <9e9d>
+<16b6> <9eef>
+<16b7> <9f19>
+<16b8> <9f5c>
+<16bb> <513c>
+<16bc> <513b>
+<16bd> <56c8>
+<16be> <56ca>
+<16bf> <56c9>
+<16c0> <5b7f>
+<16c1> <5dd4>
+<16c2> <5dd2>
+<16c3> <5f4e>
+<16c4> <61ff>
+<16c5> <6524>
+<16c6> <6b0a>
+<16c7> <6b61>
+<16c8> <7051>
+<16c9> <7058>
+<16ca> <7380>
+<16cb> <74e4>
+<16cc> <758a>
+<16cd> <766e>
+<16ce> <766c>
+<16cf> <79b3>
+<16d0> <7c60>
+<16d1> <7c5f>
+<16d2> <807e>
+<16d3> <807d>
+<16d4> <81df>
+<16d5> <8972>
+<16d6> <896f>
+<16d7> <89fc>
+<16d8> <8b80>
+<16db> <8e91>
+<16dc> <8e93>
+<16dd> <8f61>
+<16de> <9148>
+endbfchar
+
+100 beginbfchar
+<16df> <9444>
+<16e4> <97c3>
+<16e5> <97c1>
+<16e6> <986b>
+<16e7> <9955>
+<16e8> <9a55>
+<16e9> <9a4d>
+<16ea> <9ad2>
+<16eb> <9b1a>
+<16ec> <9c49>
+<16ed> <9c31>
+<16ee> <9c3e>
+<16ef> <9c3b>
+<16f0> <9dd3>
+<16f1> <9dd7>
+<16f2> <9f34>
+<16f3> <9f6c>
+<16f4> <9f6a>
+<16f5> <9f94>
+<16f6> <56cc>
+<16f7> <5dd6>
+<16f8> <6200>
+<16f9> <6523>
+<16fa> <652b>
+<16fb> <652a>
+<16fc> <66ec>
+<16fd> <6b10>
+<16fe> <74da>
+<16ff> <7aca>
+<1700> <7c64>
+<1701> <7c63>
+<1702> <7c65>
+<1703> <7e93>
+<1704> <7e96>
+<1705> <7e94>
+<1706> <81e2>
+<1707> <8638>
+<1708> <863f>
+<1709> <8831>
+<170a> <8b8a>
+<170b> <9090>
+<170c> <908f>
+<170d> <9463>
+<170e> <9460>
+<170f> <9464>
+<1710> <9768>
+<1711> <986f>
+<1712> <995c>
+<1715> <9a57>
+<1718> <9ad1>
+<1719> <9c54>
+<171a> <9c57>
+<171b> <9c56>
+<171c> <9de5>
+<171d> <9e9f>
+<171e> <9ef4>
+<171f> <56d1>
+<1720> <58e9>
+<1721> <652c>
+<1722> <705e>
+<1725> <77d7>
+<1726> <7f50>
+<1727> <7f88>
+<1728> <8836>
+<1729> <8839>
+<172a> <8862>
+<172b> <8b93>
+<172c> <8b92>
+<172d> <8b96>
+<172e> <8277>
+<172f> <8d1b>
+<1730> <91c0>
+<1731> <946a>
+<1732> <9742>
+<1733> <9748>
+<1734> <9744>
+<1735> <97c6>
+<1736> <9870>
+<1737> <9a5f>
+<1738> <9b22>
+<1739> <9b58>
+<173a> <9c5f>
+<173f> <9f07>
+<1740> <9f77>
+<1741> <9f72>
+<1742> <5ef3>
+<1743> <6b16>
+<1744> <7063>
+<1745> <7c6c>
+<1746> <7c6e>
+<1747> <883b>
+<1748> <89c0>
+<1749> <8ea1>
+<174a> <91c1>
+<174b> <9472>
+<174c> <9470>
+<174d> <9871>
+<174e> <995e>
+<174f> <9ad6>
+<1750> <9b23>
+endbfchar
+
+100 beginbfchar
+<1751> <9ecc>
+<1752> <7064>
+<1753> <77da>
+<1754> <8b9a>
+<1755> <9477>
+<1756> <97c9>
+<1757> <9a62>
+<1758> <9a65>
+<1759> <7e9c>
+<175a> <8b9c>
+<175b> <8eaa>
+<175c> <91c5>
+<175f> <947c>
+<1762> <9ef7>
+<1763> <8c54>
+<1764> <947f>
+<1765> <9e1a>
+<1766> <7228>
+<1767> <9a6a>
+<1768> <9b31>
+<1769> <9e1b>
+<176a> <9e1e>
+<176b> <7c72>
+<176c> <4e42>
+<176d> <4e5c>
+<176e> <51f5>
+<176f> <531a>
+<1770> <5382>
+<1771> <4e07>
+<1772> <4e0c>
+<1773> <4e47>
+<1774> <4e8d>
+<1775> <56d7>
+<1776> <5c6e>
+<1777> <5f73>
+<1778> <4e0f>
+<1779> <5187>
+<177a> <4e0e>
+<177b> <4e2e>
+<177c> <4e93>
+<177d> <4ec2>
+<177e> <4ec9>
+<177f> <4ec8>
+<1780> <5198>
+<1781> <52fc>
+<1782> <536c>
+<1783> <53b9>
+<1784> <5720>
+<1785> <5903>
+<1786> <592c>
+<1787> <5c10>
+<1788> <5dff>
+<1789> <65e1>
+<178a> <6bb3>
+<178b> <6bcc>
+<178c> <6c14>
+<178d> <723f>
+<178e> <4e31>
+<178f> <4e3c>
+<1790> <4ee8>
+<1791> <4edc>
+<1792> <4ee9>
+<1793> <4ee1>
+<1794> <4edd>
+<1795> <4eda>
+<1796> <520c>
+<1797> <5209>
+<1798> <531c>
+<1799> <534c>
+<179c> <5917>
+<179d> <592f>
+<179e> <5b81>
+<179f> <5b84>
+<17a0> <5c12>
+<17a1> <5c3b>
+<17a2> <5c74>
+<17a3> <5c73>
+<17a4> <5e04>
+<17a5> <5e80>
+<17a6> <5e82>
+<17a7> <5fc9>
+<17a8> <6209>
+<17a9> <6250>
+<17aa> <6c15>
+<17ab> <6c36>
+<17ac> <6c43>
+<17ad> <6c3f>
+<17ae> <6c3b>
+<17af> <72ae>
+<17b0> <72b0>
+<17b1> <738a>
+<17b2> <79b8>
+<17b3> <808a>
+<17b4> <961e>
+<17b5> <4f0e>
+<17b6> <4f18>
+<17b7> <4f2c>
+<17b8> <4ef5>
+<17b9> <4f14>
+<17ba> <4ef1>
+endbfchar
+
+100 beginbfchar
+<17bb> <4f00>
+<17bc> <4ef7>
+<17bd> <4f08>
+<17be> <4f1d>
+<17bf> <4f02>
+<17c0> <4f05>
+<17c1> <4f22>
+<17c2> <4f13>
+<17c3> <4f04>
+<17c4> <4ef4>
+<17c5> <4f12>
+<17c6> <51b1>
+<17c7> <5213>
+<17c8> <5210>
+<17c9> <52a6>
+<17ca> <5322>
+<17cb> <531f>
+<17cc> <534d>
+<17cd> <538a>
+<17ce> <5407>
+<17cf> <56e1>
+<17d0> <56df>
+<17d1> <572e>
+<17d2> <572a>
+<17d3> <5734>
+<17d4> <593c>
+<17d5> <5980>
+<17d6> <597c>
+<17d7> <5985>
+<17d8> <597b>
+<17d9> <597e>
+<17da> <5977>
+<17db> <597f>
+<17dc> <5b56>
+<17dd> <5c15>
+<17de> <5c25>
+<17df> <5c7c>
+<17e2> <5c7e>
+<17e3> <5ddf>
+<17e4> <5e75>
+<17e5> <5e84>
+<17e6> <5f02>
+<17e7> <5f1a>
+<17e8> <5f74>
+<17e9> <5fd5>
+<17ea> <5fd4>
+<17eb> <5fcf>
+<17ec> <625c>
+<17ed> <625e>
+<17ee> <6264>
+<17ef> <6261>
+<17f0> <6266>
+<17f1> <6262>
+<17f2> <6259>
+<17f3> <6260>
+<17f4> <625a>
+<17f5> <6265>
+<17f6> <6537>
+<17f7> <65ef>
+<17f8> <65ee>
+<17f9> <673e>
+<17fa> <6739>
+<17fb> <6738>
+<17fc> <673b>
+<17fd> <673a>
+<17fe> <673f>
+<17ff> <673c>
+<1800> <6733>
+<1801> <6c18>
+<1802> <6c46>
+<1803> <6c52>
+<1804> <6c5c>
+<1805> <6c4f>
+<1806> <6c4a>
+<1807> <6c54>
+<180a> <7071>
+<180b> <725e>
+<180e> <738e>
+<180f> <752a>
+<1810> <767f>
+<1811> <7a75>
+<1812> <7f51>
+<1813> <8278>
+<1814> <827c>
+<1815> <8280>
+<1816> <827d>
+<1817> <827f>
+<1818> <864d>
+<1819> <897e>
+<181a> <9099>
+<181d> <909b>
+<181e> <9094>
+<181f> <9622>
+<1820> <9624>
+<1821> <9620>
+<1822> <9623>
+<1823> <4f56>
+<1824> <4f3b>
+<1825> <4f62>
+<1826> <4f49>
+endbfchar
+
+100 beginbfchar
+<1827> <4f53>
+<1828> <4f64>
+<1829> <4f3e>
+<182a> <4f67>
+<182b> <4f52>
+<182c> <4f5f>
+<182d> <4f41>
+<182e> <4f58>
+<182f> <4f2d>
+<1830> <4f33>
+<1831> <4f3f>
+<1832> <4f61>
+<1833> <518f>
+<1834> <51b9>
+<1835> <521c>
+<1836> <521e>
+<1837> <5221>
+<183a> <5309>
+<183b> <5363>
+<183c> <5372>
+<183f> <5430>
+<1840> <5437>
+<1841> <542a>
+<1842> <5454>
+<1843> <5445>
+<1844> <5419>
+<1845> <541c>
+<1846> <5425>
+<1847> <5418>
+<1848> <543d>
+<1849> <544f>
+<184a> <5441>
+<184b> <5428>
+<184c> <5424>
+<184d> <5447>
+<184e> <56ee>
+<184f> <56e7>
+<1850> <56e5>
+<1851> <5741>
+<1852> <5745>
+<1853> <574c>
+<1854> <5749>
+<1855> <574b>
+<1856> <5752>
+<1857> <5906>
+<1858> <5940>
+<1859> <59a6>
+<185a> <5998>
+<185b> <59a0>
+<185c> <5997>
+<185d> <598e>
+<185e> <59a2>
+<185f> <5990>
+<1860> <598f>
+<1861> <59a7>
+<1862> <59a1>
+<1863> <5b8e>
+<1864> <5b92>
+<1865> <5c28>
+<1866> <5c2a>
+<1867> <5c8d>
+<1868> <5c8f>
+<1869> <5c88>
+<186a> <5c8b>
+<186b> <5c89>
+<186c> <5c92>
+<186d> <5c8a>
+<186e> <5c86>
+<186f> <5c93>
+<1870> <5c95>
+<1871> <5de0>
+<1872> <5e0a>
+<1873> <5e0e>
+<1874> <5e8b>
+<1875> <5e89>
+<1876> <5e8c>
+<1877> <5e88>
+<1878> <5e8d>
+<1879> <5f05>
+<187a> <5f1d>
+<187b> <5f78>
+<187c> <5f76>
+<187d> <5fd2>
+<187e> <5fd1>
+<187f> <5fd0>
+<1880> <5fed>
+<1881> <5fe8>
+<1882> <5fee>
+<1883> <5ff3>
+<1884> <5fe1>
+<1885> <5fe4>
+<1886> <5fe3>
+<1887> <5ffa>
+<1888> <5fef>
+<1889> <5ff7>
+<188a> <5ffb>
+<188b> <6000>
+<188c> <5ff4>
+<188d> <623a>
+<188e> <6283>
+endbfchar
+
+100 beginbfchar
+<188f> <628c>
+<1892> <6294>
+<1893> <6287>
+<1894> <6271>
+<1895> <627b>
+<1896> <627a>
+<1897> <6270>
+<1898> <6281>
+<1899> <6288>
+<189a> <6277>
+<189b> <627d>
+<189c> <6272>
+<189d> <6274>
+<189e> <65f0>
+<189f> <65f4>
+<18a0> <65f3>
+<18a1> <65f2>
+<18a2> <65f5>
+<18a3> <6745>
+<18a4> <6747>
+<18a5> <6759>
+<18a6> <6755>
+<18a7> <674c>
+<18a8> <6748>
+<18a9> <675d>
+<18aa> <674d>
+<18ab> <675a>
+<18ac> <674b>
+<18ad> <6bd0>
+<18b0> <6c78>
+<18b1> <6c67>
+<18b2> <6c6b>
+<18b3> <6c84>
+<18b4> <6c8b>
+<18b5> <6c8f>
+<18b6> <6c71>
+<18b7> <6c6f>
+<18b8> <6c69>
+<18b9> <6c9a>
+<18ba> <6c6d>
+<18bb> <6c87>
+<18bc> <6c95>
+<18bd> <6c9c>
+<18be> <6c66>
+<18bf> <6c73>
+<18c0> <6c65>
+<18c1> <6c7b>
+<18c2> <6c8e>
+<18c3> <7074>
+<18c4> <707a>
+<18c5> <7263>
+<18c6> <72bf>
+<18c7> <72bd>
+<18c8> <72c3>
+<18c9> <72c6>
+<18ca> <72c1>
+<18cb> <72ba>
+<18cc> <72c5>
+<18cd> <7395>
+<18ce> <7397>
+<18d1> <7392>
+<18d2> <753a>
+<18d3> <7539>
+<18d6> <7681>
+<18d7> <793d>
+<18d8> <8034>
+<18d9> <8095>
+<18da> <8099>
+<18db> <8090>
+<18dc> <8092>
+<18dd> <809c>
+<18de> <8290>
+<18df> <828f>
+<18e0> <8285>
+<18e1> <828e>
+<18e2> <8291>
+<18e3> <8293>
+<18e4> <828a>
+<18e7> <8c78>
+<18e8> <8fc9>
+<18e9> <8fbf>
+<18ea> <909f>
+<18eb> <90a1>
+<18ec> <90a5>
+<18ed> <909e>
+<18ee> <90a7>
+<18ef> <90a0>
+<18f0> <9630>
+<18f1> <9628>
+<18f2> <962f>
+<18f3> <962d>
+<18f4> <4e33>
+<18f5> <4f98>
+<18f6> <4f7c>
+<18f7> <4f85>
+<18f8> <4f7d>
+<18f9> <4f80>
+<18fa> <4f87>
+<18fb> <4f76>
+<18fc> <4f74>
+endbfchar
+
+100 beginbfchar
+<18fd> <4f89>
+<18fe> <4f84>
+<18ff> <4f77>
+<1900> <4f4c>
+<1901> <4f97>
+<1902> <4f6a>
+<1903> <4f9a>
+<1904> <4f79>
+<1905> <4f81>
+<1906> <4f78>
+<1907> <4f90>
+<1908> <4f9c>
+<1909> <4f94>
+<190a> <4f9e>
+<190b> <4f92>
+<190c> <4f82>
+<190d> <4f95>
+<190e> <4f6b>
+<190f> <4f6e>
+<1910> <519e>
+<1911> <51bc>
+<1912> <51be>
+<1913> <5235>
+<1916> <5246>
+<1917> <5231>
+<1918> <52bc>
+<191b> <533c>
+<191c> <5392>
+<191d> <5394>
+<191e> <5487>
+<191f> <547f>
+<1920> <5481>
+<1921> <5491>
+<1922> <5482>
+<1923> <5488>
+<1924> <546b>
+<1925> <547a>
+<1926> <547e>
+<1927> <5465>
+<1928> <546c>
+<1929> <5474>
+<192a> <5466>
+<192b> <548d>
+<192c> <546f>
+<192d> <5461>
+<192e> <5460>
+<192f> <5498>
+<1930> <5463>
+<1931> <5467>
+<1932> <5464>
+<1933> <56f7>
+<1934> <56f9>
+<1935> <576f>
+<1936> <5772>
+<1937> <576d>
+<1938> <576b>
+<1939> <5771>
+<193a> <5770>
+<193b> <5776>
+<193c> <5780>
+<193d> <5775>
+<193e> <577b>
+<1941> <5762>
+<1942> <5768>
+<1943> <577d>
+<1944> <590c>
+<1945> <5945>
+<1946> <59b5>
+<1947> <59ba>
+<1948> <59cf>
+<1949> <59ce>
+<194a> <59b2>
+<194b> <59cc>
+<194c> <59c1>
+<194d> <59b6>
+<194e> <59bc>
+<194f> <59c3>
+<1950> <59d6>
+<1951> <59b1>
+<1952> <59bd>
+<1953> <59c0>
+<1954> <59c8>
+<1955> <59b4>
+<1956> <59c7>
+<1957> <5b62>
+<1958> <5b65>
+<1959> <5b93>
+<195a> <5b95>
+<195b> <5c44>
+<195c> <5c47>
+<195d> <5cae>
+<195e> <5ca4>
+<195f> <5ca0>
+<1960> <5cb5>
+<1961> <5caf>
+<1962> <5ca8>
+<1963> <5cac>
+<1964> <5c9f>
+<1965> <5ca3>
+<1966> <5cad>
+endbfchar
+
+100 beginbfchar
+<1967> <5ca2>
+<1968> <5caa>
+<1969> <5ca7>
+<196a> <5c9d>
+<196b> <5ca5>
+<196c> <5cb6>
+<196d> <5cb0>
+<196e> <5ca6>
+<196f> <5e17>
+<1970> <5e14>
+<1971> <5e19>
+<1972> <5f28>
+<1976> <5f54>
+<1977> <5f82>
+<1978> <5f7e>
+<1979> <5f7d>
+<197a> <5fde>
+<197b> <5fe5>
+<197c> <602d>
+<197d> <6026>
+<197e> <6019>
+<197f> <6032>
+<1980> <600b>
+<1981> <6034>
+<1982> <600a>
+<1983> <6017>
+<1984> <6033>
+<1985> <601a>
+<1986> <601e>
+<1987> <602c>
+<1988> <6022>
+<1989> <600d>
+<198a> <6010>
+<198b> <602e>
+<198c> <6013>
+<198d> <6011>
+<198e> <600c>
+<198f> <6009>
+<1990> <601c>
+<1991> <6214>
+<1992> <623d>
+<1993> <62ad>
+<1994> <62b4>
+<1995> <62d1>
+<1996> <62be>
+<1997> <62aa>
+<1998> <62b6>
+<1999> <62ca>
+<199a> <62ae>
+<199b> <62b3>
+<199c> <62af>
+<199d> <62bb>
+<199e> <62a9>
+<199f> <62b0>
+<19a0> <62b8>
+<19a1> <653d>
+<19a2> <65a8>
+<19a3> <65bb>
+<19a4> <6609>
+<19a5> <65fc>
+<19a6> <6604>
+<19a7> <6612>
+<19a8> <6608>
+<19a9> <65fb>
+<19aa> <6603>
+<19ab> <660b>
+<19ac> <660d>
+<19ad> <6605>
+<19ae> <65fd>
+<19af> <6611>
+<19b0> <6610>
+<19b1> <66f6>
+<19b2> <670a>
+<19b3> <6785>
+<19b4> <676c>
+<19b5> <678e>
+<19b6> <6792>
+<19b7> <6776>
+<19b8> <677b>
+<19b9> <6798>
+<19ba> <6786>
+<19bb> <6784>
+<19bc> <6774>
+<19bd> <678d>
+<19be> <678c>
+<19bf> <677a>
+<19c0> <679f>
+<19c1> <6791>
+<19c2> <6799>
+<19c3> <6783>
+<19c4> <677d>
+<19c5> <6781>
+<19c8> <6794>
+<19c9> <6b25>
+<19ca> <6b80>
+<19cb> <6b7e>
+<19cc> <6bde>
+<19cd> <6c1d>
+<19ce> <6c93>
+<19cf> <6cec>
+endbfchar
+
+100 beginbfchar
+<19d0> <6ceb>
+<19d1> <6cee>
+<19d2> <6cd9>
+<19d3> <6cb6>
+<19d4> <6cd4>
+<19d5> <6cad>
+<19d6> <6ce7>
+<19d7> <6cb7>
+<19d8> <6cd0>
+<19d9> <6cc2>
+<19da> <6cba>
+<19db> <6cc3>
+<19dc> <6cc6>
+<19dd> <6ced>
+<19de> <6cf2>
+<19df> <6cd2>
+<19e0> <6cdd>
+<19e1> <6cb4>
+<19e2> <6c8a>
+<19e3> <6c9d>
+<19e4> <6c80>
+<19e5> <6cde>
+<19e6> <6cc0>
+<19e7> <6d30>
+<19e8> <6ccd>
+<19e9> <6cc7>
+<19ea> <6cb0>
+<19eb> <6cf9>
+<19ec> <6ccf>
+<19ed> <6ce9>
+<19ee> <6cd1>
+<19ef> <7094>
+<19f0> <7098>
+<19f1> <7085>
+<19f2> <7093>
+<19f3> <7086>
+<19f4> <7084>
+<19f5> <7091>
+<19f6> <7096>
+<19f7> <7082>
+<19f8> <709a>
+<19f9> <7083>
+<19fa> <726a>
+<19fb> <72d6>
+<19fc> <72cb>
+<19fd> <72d8>
+<19fe> <72c9>
+<19ff> <72dc>
+<1a00> <72d2>
+<1a01> <72d4>
+<1a02> <72da>
+<1a03> <72cc>
+<1a04> <72d1>
+<1a05> <73a4>
+<1a06> <73a1>
+<1a07> <73ad>
+<1a08> <73a6>
+<1a09> <73a2>
+<1a0a> <73a0>
+<1a0b> <73ac>
+<1a0c> <739d>
+<1a0d> <74dd>
+<1a0e> <74e8>
+<1a11> <753e>
+<1a12> <758c>
+<1a13> <7598>
+<1a14> <76af>
+<1a15> <76f3>
+<1a16> <76f1>
+<1a17> <76f0>
+<1a18> <76f5>
+<1a19> <77f8>
+<1a1a> <77fc>
+<1a1b> <77f9>
+<1a1c> <77fb>
+<1a1d> <77fa>
+<1a1e> <77f7>
+<1a1f> <7942>
+<1a20> <793f>
+<1a21> <79c5>
+<1a22> <7a78>
+<1a23> <7a7b>
+<1a24> <7afb>
+<1a25> <7c75>
+<1a26> <7cfd>
+<1a27> <8035>
+<1a28> <808f>
+<1a29> <80ae>
+<1a2a> <80a3>
+<1a2b> <80b8>
+<1a2c> <80b5>
+<1a2d> <80ad>
+<1a2e> <8220>
+<1a2f> <82a0>
+<1a30> <82c0>
+<1a31> <82ab>
+<1a32> <829a>
+<1a33> <8298>
+<1a34> <829b>
+<1a35> <82b5>
+endbfchar
+
+100 beginbfchar
+<1a36> <82a7>
+<1a37> <82ae>
+<1a38> <82bc>
+<1a39> <829e>
+<1a3a> <82ba>
+<1a3b> <82b4>
+<1a3c> <82a8>
+<1a3d> <82a1>
+<1a3e> <82a9>
+<1a3f> <82c2>
+<1a40> <82a4>
+<1a41> <82c3>
+<1a42> <82b6>
+<1a43> <82a2>
+<1a44> <8670>
+<1a45> <866f>
+<1a48> <8c56>
+<1a49> <8fd2>
+<1a4a> <8fcb>
+<1a4b> <8fd3>
+<1a4c> <8fcd>
+<1a4d> <8fd6>
+<1a4e> <8fd5>
+<1a4f> <8fd7>
+<1a50> <90b2>
+<1a51> <90b4>
+<1a52> <90af>
+<1a53> <90b3>
+<1a54> <90b0>
+<1a55> <9639>
+<1a56> <963d>
+<1a57> <963c>
+<1a58> <963a>
+<1a59> <9643>
+<1a5a> <4fcd>
+<1a5b> <4fc5>
+<1a5c> <4fd3>
+<1a5d> <4fb2>
+<1a5e> <4fc9>
+<1a5f> <4fcb>
+<1a60> <4fc1>
+<1a61> <4fd4>
+<1a62> <4fdc>
+<1a63> <4fd9>
+<1a64> <4fbb>
+<1a65> <4fb3>
+<1a66> <4fdb>
+<1a67> <4fc7>
+<1a68> <4fd6>
+<1a69> <4fba>
+<1a6a> <4fc0>
+<1a6b> <4fb9>
+<1a6c> <4fec>
+<1a6d> <5244>
+<1a6e> <5249>
+<1a6f> <52c0>
+<1a70> <52c2>
+<1a71> <533d>
+<1a72> <537c>
+<1a73> <5397>
+<1a74> <5396>
+<1a75> <5399>
+<1a76> <5398>
+<1a77> <54ba>
+<1a78> <54a1>
+<1a79> <54ad>
+<1a7a> <54a5>
+<1a7b> <54cf>
+<1a7c> <54c3>
+<1a7d> <830d>
+<1a7e> <54b7>
+<1a7f> <54ae>
+<1a80> <54d6>
+<1a81> <54b6>
+<1a84> <54a0>
+<1a85> <5470>
+<1a86> <54bc>
+<1a87> <54a2>
+<1a88> <54be>
+<1a89> <5472>
+<1a8a> <54de>
+<1a8b> <54b0>
+<1a8c> <57b5>
+<1a8f> <57a4>
+<1a90> <578c>
+<1a91> <5797>
+<1a92> <579d>
+<1a93> <579b>
+<1a94> <5794>
+<1a95> <5798>
+<1a96> <578f>
+<1a97> <5799>
+<1a98> <57a5>
+<1a99> <579a>
+<1a9a> <5795>
+<1a9b> <58f4>
+<1a9c> <590d>
+<1a9d> <5953>
+<1a9e> <59e1>
+<1a9f> <59de>
+endbfchar
+
+100 beginbfchar
+<1aa0> <59ee>
+<1aa1> <5a00>
+<1aa2> <59f1>
+<1aa3> <59dd>
+<1aa4> <59fa>
+<1aa5> <59fd>
+<1aa6> <59fc>
+<1aa7> <59f6>
+<1aa8> <59e4>
+<1aa9> <59f2>
+<1aaa> <59f7>
+<1aab> <59db>
+<1aac> <59e9>
+<1aad> <59f3>
+<1aae> <59f5>
+<1aaf> <59e0>
+<1ab0> <59fe>
+<1ab1> <59f4>
+<1ab2> <59ed>
+<1ab3> <5ba8>
+<1ab4> <5c4c>
+<1ab5> <5cd0>
+<1ab6> <5cd8>
+<1ab7> <5ccc>
+<1ab8> <5cd7>
+<1ab9> <5ccb>
+<1aba> <5cdb>
+<1abb> <5cde>
+<1abc> <5cda>
+<1abd> <5cc9>
+<1abe> <5cc7>
+<1abf> <5cca>
+<1ac0> <5cd6>
+<1ac3> <5ccf>
+<1ac4> <5cc8>
+<1ac5> <5cc6>
+<1ac6> <5cce>
+<1ac7> <5cdf>
+<1ac8> <5cf8>
+<1ac9> <5df9>
+<1acd> <5e20>
+<1ace> <5e24>
+<1acf> <5eb0>
+<1ad0> <5ea4>
+<1ad1> <5ea2>
+<1ad2> <5e9b>
+<1ad3> <5ea3>
+<1ad4> <5ea5>
+<1ad5> <5f07>
+<1ad6> <5f2e>
+<1ad7> <5f56>
+<1ad8> <5f86>
+<1ad9> <6037>
+<1ada> <6039>
+<1adb> <6054>
+<1adc> <6072>
+<1add> <605e>
+<1ade> <6045>
+<1adf> <6053>
+<1ae0> <6047>
+<1ae1> <6049>
+<1ae2> <605b>
+<1ae3> <604c>
+<1ae4> <6040>
+<1ae5> <6042>
+<1ae6> <605f>
+<1ae7> <6024>
+<1ae8> <6044>
+<1ae9> <6058>
+<1aea> <6066>
+<1aeb> <606e>
+<1aee> <62cf>
+<1aef> <630d>
+<1af0> <630b>
+<1af1> <62f5>
+<1af2> <630e>
+<1af3> <6303>
+<1af4> <62eb>
+<1af5> <62f9>
+<1af6> <630f>
+<1af7> <630c>
+<1af8> <62f8>
+<1af9> <62f6>
+<1afa> <6300>
+<1afd> <62fa>
+<1afe> <6315>
+<1aff> <62fb>
+<1b00> <62f0>
+<1b01> <6541>
+<1b02> <6543>
+<1b03> <65aa>
+<1b04> <65bf>
+<1b05> <6636>
+<1b06> <6621>
+<1b07> <6632>
+<1b08> <6635>
+<1b09> <661c>
+<1b0a> <6626>
+<1b0b> <6622>
+<1b0c> <6633>
+endbfchar
+
+100 beginbfchar
+<1b0d> <662b>
+<1b0e> <663a>
+<1b0f> <661d>
+<1b10> <6634>
+<1b11> <6639>
+<1b12> <662e>
+<1b15> <67c1>
+<1b16> <67f2>
+<1b17> <67c8>
+<1b18> <67ba>
+<1b19> <67dc>
+<1b1a> <67bb>
+<1b1b> <67f8>
+<1b1c> <67d8>
+<1b1d> <67c0>
+<1b1e> <67b7>
+<1b1f> <67c5>
+<1b20> <67eb>
+<1b21> <67e4>
+<1b22> <67df>
+<1b23> <67b5>
+<1b24> <67cd>
+<1b25> <67b3>
+<1b26> <67f7>
+<1b27> <67f6>
+<1b28> <67ee>
+<1b29> <67e3>
+<1b2a> <67c2>
+<1b2b> <67b9>
+<1b2c> <67ce>
+<1b2d> <67e7>
+<1b2e> <67f0>
+<1b2f> <67b2>
+<1b30> <67fc>
+<1b31> <67c6>
+<1b32> <67ed>
+<1b33> <67cc>
+<1b34> <67ae>
+<1b35> <67e6>
+<1b36> <67db>
+<1b37> <67fa>
+<1b3a> <67c3>
+<1b3b> <67ea>
+<1b3c> <67cb>
+<1b3d> <6b28>
+<1b3e> <6b82>
+<1b3f> <6b84>
+<1b40> <6bb6>
+<1b41> <6bd6>
+<1b42> <6bd8>
+<1b43> <6be0>
+<1b46> <6d28>
+<1b47> <6d34>
+<1b48> <6d2d>
+<1b49> <6d1f>
+<1b4a> <6d3c>
+<1b4b> <6d3f>
+<1b4c> <6d12>
+<1b4d> <6d0a>
+<1b4e> <6cda>
+<1b4f> <6d33>
+<1b50> <6d04>
+<1b51> <6d19>
+<1b52> <6d3a>
+<1b53> <6d1a>
+<1b54> <6d11>
+<1b55> <6d00>
+<1b56> <6d1d>
+<1b57> <6d42>
+<1b58> <6d01>
+<1b59> <6d18>
+<1b5a> <6d37>
+<1b5b> <6d03>
+<1b5c> <6d0f>
+<1b5d> <6d40>
+<1b5e> <6d07>
+<1b5f> <6d20>
+<1b60> <6d2c>
+<1b61> <6d08>
+<1b62> <6d22>
+<1b63> <6d09>
+<1b64> <6d10>
+<1b65> <70b7>
+<1b66> <709f>
+<1b67> <70be>
+<1b68> <70b1>
+<1b69> <70b0>
+<1b6a> <70a1>
+<1b6d> <70a9>
+<1b6e> <7241>
+<1b71> <726c>
+<1b72> <7270>
+<1b73> <7273>
+<1b74> <726e>
+<1b75> <72ca>
+<1b76> <72e4>
+<1b77> <72e8>
+<1b78> <72eb>
+<1b79> <72df>
+<1b7a> <72ea>
+endbfchar
+
+100 beginbfchar
+<1b7b> <72e6>
+<1b7c> <72e3>
+<1b7d> <7385>
+<1b7e> <73cc>
+<1b7f> <73c2>
+<1b80> <73c8>
+<1b81> <73c5>
+<1b82> <73b9>
+<1b83> <73b6>
+<1b84> <73b5>
+<1b85> <73b4>
+<1b86> <73eb>
+<1b87> <73bf>
+<1b88> <73c7>
+<1b89> <73be>
+<1b8a> <73c3>
+<1b8b> <73c6>
+<1b8c> <73b8>
+<1b8d> <73cb>
+<1b8e> <74ec>
+<1b8f> <74ee>
+<1b90> <752e>
+<1b93> <75a7>
+<1b94> <75aa>
+<1b95> <7679>
+<1b96> <76c4>
+<1b97> <7708>
+<1b9b> <770a>
+<1b9c> <76f7>
+<1b9d> <76fb>
+<1b9e> <76fa>
+<1ba1> <7806>
+<1ba4> <7805>
+<1ba5> <7810>
+<1ba6> <780f>
+<1ba7> <780e>
+<1ba8> <7809>
+<1ba9> <7803>
+<1baa> <7813>
+<1bab> <794a>
+<1bac> <794c>
+<1bad> <794b>
+<1bae> <7945>
+<1baf> <7944>
+<1bb0> <79d5>
+<1bb1> <79cd>
+<1bb2> <79cf>
+<1bb3> <79d6>
+<1bb4> <79ce>
+<1bb5> <7a80>
+<1bb6> <7a7e>
+<1bb7> <7ad1>
+<1bba> <7c7a>
+<1bc0> <7d03>
+<1bc1> <7d08>
+<1bc2> <7d01>
+<1bc3> <7f58>
+<1bc4> <7f91>
+<1bc5> <7f8d>
+<1bc6> <7fbe>
+<1bc7> <8007>
+<1bca> <8014>
+<1bcb> <8037>
+<1bcc> <80d8>
+<1bcd> <80c7>
+<1bce> <80e0>
+<1bcf> <80d1>
+<1bd0> <80c8>
+<1bd1> <80c2>
+<1bd2> <80d0>
+<1bd3> <80c5>
+<1bd4> <80e3>
+<1bd5> <80d9>
+<1bd6> <80dc>
+<1bd7> <80ca>
+<1bd8> <80d5>
+<1bd9> <80c9>
+<1bda> <80cf>
+<1bdb> <80d7>
+<1bdc> <80e6>
+<1bdd> <80cd>
+<1bde> <81ff>
+<1bdf> <8221>
+<1be0> <8294>
+<1be1> <82d9>
+<1be2> <82fe>
+<1be3> <82f9>
+<1be4> <8307>
+<1be5> <82e8>
+<1be6> <8300>
+<1be7> <82d5>
+<1be8> <833a>
+<1be9> <82eb>
+<1bea> <82d6>
+<1beb> <82f4>
+<1bec> <82ec>
+<1bed> <82e1>
+<1bee> <82f2>
+<1bef> <82f5>
+<1bf0> <830c>
+endbfchar
+
+100 beginbfchar
+<1bf1> <82fb>
+<1bf2> <82f6>
+<1bf3> <82f0>
+<1bf4> <82ea>
+<1bf5> <82e4>
+<1bf6> <82e0>
+<1bf7> <82fa>
+<1bf8> <82f3>
+<1bf9> <82ed>
+<1bfa> <8677>
+<1bfb> <8674>
+<1bfc> <867c>
+<1bfd> <8673>
+<1bfe> <8841>
+<1bff> <884e>
+<1c00> <8867>
+<1c01> <886a>
+<1c02> <8869>
+<1c03> <89d3>
+<1c04> <8a04>
+<1c05> <8a07>
+<1c06> <8d72>
+<1c07> <8fe3>
+<1c08> <8fe1>
+<1c09> <8fee>
+<1c0a> <8fe0>
+<1c0b> <90f1>
+<1c0c> <90bd>
+<1c0d> <90bf>
+<1c0e> <90d5>
+<1c0f> <90c5>
+<1c10> <90be>
+<1c11> <90c7>
+<1c12> <90cb>
+<1c13> <90c8>
+<1c14> <91d4>
+<1c15> <91d3>
+<1c16> <9654>
+<1c17> <964f>
+<1c18> <9651>
+<1c19> <9653>
+<1c1a> <964a>
+<1c1b> <964e>
+<1c1c> <501e>
+<1c1d> <5005>
+<1c1e> <5007>
+<1c1f> <5013>
+<1c20> <5022>
+<1c21> <5030>
+<1c22> <501b>
+<1c23> <4ff5>
+<1c24> <4ff4>
+<1c25> <5033>
+<1c26> <5037>
+<1c27> <502c>
+<1c2a> <5017>
+<1c2b> <501c>
+<1c2c> <5020>
+<1c2d> <5027>
+<1c2e> <5035>
+<1c2f> <502f>
+<1c30> <5031>
+<1c31> <500e>
+<1c32> <515a>
+<1c33> <5194>
+<1c34> <5193>
+<1c35> <51ca>
+<1c38> <51c8>
+<1c39> <51ce>
+<1c3a> <5261>
+<1c3b> <525a>
+<1c3c> <5252>
+<1c3f> <5255>
+<1c40> <5262>
+<1c41> <52cd>
+<1c42> <530e>
+<1c43> <539e>
+<1c44> <5526>
+<1c45> <54e2>
+<1c46> <5517>
+<1c47> <5512>
+<1c48> <54e7>
+<1c49> <54f3>
+<1c4a> <54e4>
+<1c4b> <551a>
+<1c4c> <54ff>
+<1c4d> <5504>
+<1c4e> <5508>
+<1c4f> <54eb>
+<1c50> <5511>
+<1c51> <5505>
+<1c52> <54f1>
+<1c53> <550a>
+<1c54> <54fb>
+<1c57> <54e0>
+<1c58> <550e>
+<1c59> <5503>
+<1c5a> <550b>
+<1c5d> <57cc>
+<1c5e> <5832>
+endbfchar
+
+100 beginbfchar
+<1c5f> <57d5>
+<1c60> <57d2>
+<1c61> <57ba>
+<1c62> <57c6>
+<1c63> <57bd>
+<1c64> <57bc>
+<1c65> <57b8>
+<1c66> <57b6>
+<1c67> <57bf>
+<1c68> <57c7>
+<1c69> <57d0>
+<1c6a> <57b9>
+<1c6b> <57c1>
+<1c6c> <590e>
+<1c6d> <594a>
+<1c6e> <5a19>
+<1c6f> <5a16>
+<1c72> <5a15>
+<1c73> <5a0f>
+<1c74> <5a17>
+<1c75> <5a0a>
+<1c76> <5a1e>
+<1c77> <5a33>
+<1c78> <5b6c>
+<1c79> <5ba7>
+<1c7a> <5bad>
+<1c7b> <5bac>
+<1c7c> <5c03>
+<1c7d> <5c56>
+<1c7e> <5c54>
+<1c7f> <5cec>
+<1c80> <5cff>
+<1c81> <5cee>
+<1c82> <5cf1>
+<1c83> <5cf7>
+<1c84> <5d00>
+<1c85> <5cf9>
+<1c86> <5e29>
+<1c87> <5e28>
+<1c88> <5ea8>
+<1c89> <5eae>
+<1c8a> <5eaa>
+<1c8b> <5eac>
+<1c8c> <5f33>
+<1c8d> <5f30>
+<1c8e> <5f67>
+<1c8f> <605d>
+<1c90> <605a>
+<1c91> <6067>
+<1c92> <6041>
+<1c93> <60a2>
+<1c94> <6088>
+<1c95> <6080>
+<1c96> <6092>
+<1c97> <6081>
+<1c98> <609d>
+<1c99> <6083>
+<1c9a> <6095>
+<1c9b> <609b>
+<1c9c> <6097>
+<1c9d> <6087>
+<1c9e> <609c>
+<1c9f> <608e>
+<1ca0> <6219>
+<1ca1> <6246>
+<1ca2> <62f2>
+<1ca3> <6310>
+<1ca4> <6356>
+<1ca5> <632c>
+<1ca8> <6336>
+<1ca9> <6343>
+<1caa> <63e4>
+<1cab> <6339>
+<1cac> <634b>
+<1cad> <634a>
+<1cae> <633c>
+<1caf> <6329>
+<1cb0> <6341>
+<1cb1> <6334>
+<1cb2> <6358>
+<1cb3> <6354>
+<1cb4> <6359>
+<1cb5> <632d>
+<1cb6> <6347>
+<1cb7> <6333>
+<1cb8> <635a>
+<1cb9> <6351>
+<1cba> <6338>
+<1cbb> <6357>
+<1cbc> <6340>
+<1cbd> <6348>
+<1cbe> <654a>
+<1cbf> <6546>
+<1cc0> <65c6>
+<1cc3> <65c2>
+<1cc4> <664a>
+<1cc5> <665f>
+<1cc6> <6647>
+<1cc7> <6651>
+<1cca> <681f>
+endbfchar
+
+100 beginbfchar
+<1ccb> <681a>
+<1ccc> <6849>
+<1ccf> <683b>
+<1cd0> <684b>
+<1cd1> <684f>
+<1cd2> <6816>
+<1cd3> <6831>
+<1cd4> <681c>
+<1cd5> <6835>
+<1cd6> <682b>
+<1cd7> <682d>
+<1cd8> <682f>
+<1cd9> <684e>
+<1cda> <6844>
+<1cdb> <6834>
+<1cdc> <681d>
+<1cdd> <6812>
+<1cde> <6814>
+<1cdf> <6826>
+<1ce0> <6828>
+<1ce1> <682e>
+<1ce2> <684d>
+<1ce3> <683a>
+<1ce4> <6825>
+<1ce5> <6820>
+<1ce6> <6b2c>
+<1ce7> <6b2f>
+<1ce8> <6b2d>
+<1ce9> <6b31>
+<1cea> <6b34>
+<1ceb> <6b6d>
+<1cec> <8082>
+<1ced> <6b88>
+<1cee> <6be6>
+<1cef> <6be4>
+<1cf0> <6be8>
+<1cf1> <6be3>
+<1cf2> <6be2>
+<1cf3> <6be7>
+<1cf4> <6c25>
+<1cf5> <6d7a>
+<1cf8> <6d76>
+<1cf9> <6d0d>
+<1cfa> <6d61>
+<1cfb> <6d92>
+<1cfc> <6d58>
+<1cfd> <6d62>
+<1cfe> <6d6d>
+<1cff> <6d6f>
+<1d00> <6d91>
+<1d01> <6d8d>
+<1d02> <6def>
+<1d03> <6d7f>
+<1d04> <6d86>
+<1d05> <6d5e>
+<1d06> <6d67>
+<1d07> <6d60>
+<1d08> <6d97>
+<1d09> <6d70>
+<1d0a> <6d7c>
+<1d0b> <6d5f>
+<1d0c> <6d82>
+<1d0d> <6d98>
+<1d0e> <6d2f>
+<1d0f> <6d68>
+<1d10> <6d8b>
+<1d11> <6d7e>
+<1d12> <6d80>
+<1d13> <6d84>
+<1d14> <6d16>
+<1d15> <6d83>
+<1d16> <6d7b>
+<1d17> <6d7d>
+<1d18> <6d75>
+<1d19> <6d90>
+<1d1a> <70dc>
+<1d1b> <70d3>
+<1d1c> <70d1>
+<1d1d> <70dd>
+<1d1e> <70cb>
+<1d1f> <7f39>
+<1d20> <70e2>
+<1d21> <70d7>
+<1d22> <70d2>
+<1d23> <70de>
+<1d24> <70e0>
+<1d25> <70d4>
+<1d26> <70cd>
+<1d2a> <70da>
+<1d2b> <70ce>
+<1d2c> <70e1>
+<1d2d> <7242>
+<1d2e> <7278>
+<1d2f> <7277>
+<1d30> <7276>
+<1d31> <7300>
+<1d32> <72fa>
+<1d33> <72f4>
+<1d34> <72fe>
+<1d35> <72f6>
+endbfchar
+
+100 beginbfchar
+<1d36> <72f3>
+<1d37> <72fb>
+<1d38> <7301>
+<1d39> <73d3>
+<1d3a> <73d9>
+<1d3b> <73e5>
+<1d3c> <73d6>
+<1d3d> <73bc>
+<1d3e> <73e7>
+<1d3f> <73e3>
+<1d40> <73e9>
+<1d41> <73dc>
+<1d42> <73d2>
+<1d43> <73db>
+<1d44> <73d4>
+<1d45> <73dd>
+<1d46> <73da>
+<1d49> <73e8>
+<1d4e> <7521>
+<1d4f> <755b>
+<1d50> <755f>
+<1d51> <75b0>
+<1d52> <75c1>
+<1d53> <75bb>
+<1d54> <75c4>
+<1d55> <75c0>
+<1d56> <75bf>
+<1d57> <75b6>
+<1d58> <75ba>
+<1d59> <768a>
+<1d5a> <76c9>
+<1d5b> <771d>
+<1d5c> <771b>
+<1d5d> <7710>
+<1d5e> <7713>
+<1d5f> <7712>
+<1d60> <7723>
+<1d61> <7711>
+<1d62> <7715>
+<1d65> <7722>
+<1d66> <7727>
+<1d67> <7823>
+<1d68> <782c>
+<1d69> <7822>
+<1d6a> <7835>
+<1d6b> <782f>
+<1d6c> <7828>
+<1d6d> <782e>
+<1d6e> <782b>
+<1d6f> <7821>
+<1d70> <7829>
+<1d71> <7833>
+<1d72> <782a>
+<1d73> <7831>
+<1d74> <7954>
+<1d75> <795b>
+<1d76> <794f>
+<1d77> <795c>
+<1d78> <7953>
+<1d79> <7952>
+<1d7a> <7951>
+<1d7d> <79e0>
+<1d7e> <79ee>
+<1d7f> <79ed>
+<1d80> <79ea>
+<1d81> <79dc>
+<1d82> <79de>
+<1d83> <79dd>
+<1d84> <7a86>
+<1d85> <7a89>
+<1d86> <7a85>
+<1d89> <7a8a>
+<1d8a> <7a87>
+<1d8b> <7ad8>
+<1d8c> <7b10>
+<1d8d> <7b04>
+<1d8e> <7b13>
+<1d8f> <7b05>
+<1d90> <7b0f>
+<1d91> <7b08>
+<1d92> <7b0a>
+<1d93> <7b0e>
+<1d94> <7b09>
+<1d95> <7b12>
+<1d96> <7c84>
+<1d97> <7c91>
+<1d98> <7c8a>
+<1d99> <7c8c>
+<1d9a> <7c88>
+<1d9b> <7c8d>
+<1d9c> <7c85>
+<1d9d> <7d1e>
+<1d9e> <7d1d>
+<1d9f> <7d11>
+<1da0> <7d0e>
+<1da1> <7d18>
+<1da2> <7d16>
+<1da3> <7d13>
+<1da4> <7d1f>
+<1da5> <7d12>
+endbfchar
+
+100 beginbfchar
+<1da6> <7d0f>
+<1da7> <7d0c>
+<1da8> <7f5c>
+<1da9> <7f61>
+<1daa> <7f5e>
+<1dab> <7f60>
+<1dac> <7f5d>
+<1dad> <7f5b>
+<1dae> <7f96>
+<1daf> <7f92>
+<1db0> <7fc3>
+<1db1> <7fc2>
+<1db2> <7fc0>
+<1db3> <8016>
+<1db4> <803e>
+<1db5> <8039>
+<1db6> <80fa>
+<1db7> <80f2>
+<1db8> <80f9>
+<1db9> <80f5>
+<1dba> <8101>
+<1dbb> <80fb>
+<1dbc> <8100>
+<1dbd> <8201>
+<1dbe> <822f>
+<1dbf> <8225>
+<1dc0> <8333>
+<1dc1> <832d>
+<1dc2> <8344>
+<1dc3> <8319>
+<1dc4> <8351>
+<1dc5> <8325>
+<1dc6> <8356>
+<1dc7> <833f>
+<1dc8> <8341>
+<1dc9> <8326>
+<1dca> <831c>
+<1dcb> <8322>
+<1dcc> <8342>
+<1dcd> <834e>
+<1dce> <831b>
+<1dcf> <832a>
+<1dd0> <8308>
+<1dd1> <833c>
+<1dd2> <834d>
+<1dd3> <8316>
+<1dd4> <8324>
+<1dd5> <8320>
+<1dd6> <8337>
+<1dd7> <832f>
+<1dd8> <8329>
+<1dd9> <8347>
+<1dda> <8345>
+<1ddb> <834c>
+<1ddc> <8353>
+<1ddd> <831e>
+<1dde> <832c>
+<1ddf> <834b>
+<1de0> <8327>
+<1de1> <8348>
+<1de2> <8653>
+<1de3> <8652>
+<1de4> <86a2>
+<1de5> <86a8>
+<1de6> <8696>
+<1de7> <868d>
+<1de8> <8691>
+<1de9> <869e>
+<1dea> <8687>
+<1deb> <8697>
+<1dec> <8686>
+<1ded> <868b>
+<1dee> <869a>
+<1def> <8685>
+<1df0> <86a5>
+<1df1> <8699>
+<1df2> <86a1>
+<1df3> <86a7>
+<1df4> <8695>
+<1df5> <8698>
+<1df6> <868e>
+<1df7> <869d>
+<1df8> <8690>
+<1df9> <8694>
+<1dfc> <886d>
+<1dff> <8872>
+<1e00> <8880>
+<1e01> <8871>
+<1e02> <887f>
+<1e03> <886f>
+<1e04> <8883>
+<1e05> <887e>
+<1e06> <8874>
+<1e07> <887c>
+<1e08> <8a12>
+<1e09> <8c47>
+<1e0a> <8c57>
+<1e0b> <8c7b>
+<1e0c> <8ca4>
+<1e0d> <8ca3>
+endbfchar
+
+100 beginbfchar
+<1e0e> <8d76>
+<1e0f> <8d78>
+<1e10> <8db5>
+<1e11> <8db7>
+<1e12> <8db6>
+<1e13> <8ed1>
+<1e14> <8ed3>
+<1e15> <8ffe>
+<1e16> <8ff5>
+<1e17> <9002>
+<1e18> <8fff>
+<1e19> <8ffb>
+<1e1a> <9004>
+<1e1b> <8ffc>
+<1e1c> <8ff6>
+<1e1d> <90d6>
+<1e1e> <90e0>
+<1e21> <90e3>
+<1e22> <90df>
+<1e23> <90e5>
+<1e24> <90d8>
+<1e25> <90db>
+<1e26> <90d7>
+<1e27> <90dc>
+<1e28> <90e4>
+<1e29> <9150>
+<1e2c> <91d5>
+<1e2d> <91e2>
+<1e2e> <91da>
+<1e2f> <965c>
+<1e30> <965f>
+<1e31> <96bc>
+<1e32> <98e3>
+<1e33> <9adf>
+<1e34> <9b2f>
+<1e35> <4e7f>
+<1e36> <5070>
+<1e37> <506a>
+<1e38> <5061>
+<1e39> <505e>
+<1e3a> <5060>
+<1e3b> <5053>
+<1e3c> <504b>
+<1e3d> <505d>
+<1e3e> <5072>
+<1e3f> <5048>
+<1e40> <504d>
+<1e41> <5041>
+<1e42> <505b>
+<1e43> <504a>
+<1e44> <5062>
+<1e45> <5015>
+<1e46> <5045>
+<1e47> <505f>
+<1e48> <5069>
+<1e49> <506b>
+<1e4c> <5046>
+<1e4d> <5040>
+<1e4e> <506e>
+<1e4f> <5073>
+<1e50> <5057>
+<1e51> <5051>
+<1e52> <51d0>
+<1e53> <526b>
+<1e54> <526d>
+<1e55> <526c>
+<1e56> <526e>
+<1e57> <52d6>
+<1e58> <52d3>
+<1e59> <532d>
+<1e5a> <539c>
+<1e5d> <553c>
+<1e5e> <554d>
+<1e5f> <5550>
+<1e60> <5534>
+<1e61> <552a>
+<1e62> <5551>
+<1e63> <5562>
+<1e64> <5536>
+<1e65> <5535>
+<1e66> <5530>
+<1e67> <5552>
+<1e68> <5545>
+<1e69> <550c>
+<1e6a> <5532>
+<1e6b> <5565>
+<1e6c> <554e>
+<1e6d> <5539>
+<1e6e> <5548>
+<1e6f> <552d>
+<1e70> <553b>
+<1e71> <5540>
+<1e72> <554b>
+<1e73> <570a>
+<1e74> <5707>
+<1e75> <57fb>
+<1e76> <5814>
+<1e77> <57e2>
+<1e78> <57f6>
+<1e79> <57dc>
+endbfchar
+
+100 beginbfchar
+<1e7a> <57f4>
+<1e7b> <5800>
+<1e7c> <57ed>
+<1e7d> <57fd>
+<1e7e> <5808>
+<1e7f> <57f8>
+<1e80> <580b>
+<1e81> <57f3>
+<1e82> <57cf>
+<1e83> <5807>
+<1e84> <57ee>
+<1e85> <57e3>
+<1e86> <57f2>
+<1e87> <57e5>
+<1e88> <57ec>
+<1e89> <57e1>
+<1e8a> <580e>
+<1e8b> <57fc>
+<1e8c> <5810>
+<1e8d> <57e7>
+<1e8e> <5801>
+<1e8f> <580c>
+<1e90> <57f1>
+<1e91> <57e9>
+<1e92> <57f0>
+<1e93> <580d>
+<1e94> <5804>
+<1e95> <595c>
+<1e96> <5a60>
+<1e97> <5a58>
+<1e98> <5a55>
+<1e99> <5a67>
+<1e9a> <5a5e>
+<1e9b> <5a38>
+<1e9c> <5a35>
+<1e9d> <5a6d>
+<1e9e> <5a50>
+<1e9f> <5a5f>
+<1ea0> <5a65>
+<1ea1> <5a6c>
+<1ea2> <5a53>
+<1ea3> <5a64>
+<1ea4> <5a57>
+<1ea5> <5a43>
+<1ea6> <5a5d>
+<1ea7> <5a52>
+<1ea8> <5a44>
+<1ea9> <5a5b>
+<1eaa> <5a48>
+<1eab> <5a8e>
+<1eac> <5a3e>
+<1ead> <5a4d>
+<1eae> <5a39>
+<1eaf> <5a4c>
+<1eb0> <5a70>
+<1eb1> <5a69>
+<1eb2> <5a47>
+<1eb3> <5a51>
+<1eb4> <5a56>
+<1eb5> <5a42>
+<1eb6> <5a5c>
+<1eb7> <5b72>
+<1eb8> <5b6e>
+<1eb9> <5bc1>
+<1eba> <5bc0>
+<1ebb> <5c59>
+<1ebc> <5d1e>
+<1ebd> <5d0b>
+<1ebe> <5d1d>
+<1ebf> <5d1a>
+<1ec0> <5d20>
+<1ec1> <5d0c>
+<1ec2> <5d28>
+<1ec3> <5d0d>
+<1ec4> <5d26>
+<1ec5> <5d25>
+<1ec6> <5d0f>
+<1ec7> <5d30>
+<1ec8> <5d12>
+<1ec9> <5d23>
+<1eca> <5d1f>
+<1ecb> <5d2e>
+<1ecc> <5e3e>
+<1ecd> <5e34>
+<1ece> <5eb1>
+<1ecf> <5eb4>
+<1ed0> <5eb9>
+<1ed3> <5f36>
+<1ed4> <5f38>
+<1ed5> <5f9b>
+<1ed6> <5f96>
+<1ed7> <5f9f>
+<1ed8> <608a>
+<1ed9> <6090>
+<1eda> <6086>
+<1edb> <60be>
+<1edc> <60b0>
+<1edd> <60ba>
+<1ee0> <60cf>
+<1ee1> <60e4>
+endbfchar
+
+100 beginbfchar
+<1ee2> <60d9>
+<1ee3> <60dd>
+<1ee4> <60c8>
+<1ee5> <60b1>
+<1ee6> <60db>
+<1ee7> <60b7>
+<1ee8> <60ca>
+<1ee9> <60bf>
+<1eea> <60c3>
+<1eeb> <60cd>
+<1eec> <60c0>
+<1eed> <6332>
+<1eee> <6365>
+<1eef> <638a>
+<1ef0> <6382>
+<1ef1> <637d>
+<1ef2> <63bd>
+<1ef3> <639e>
+<1ef4> <63ad>
+<1ef5> <639d>
+<1ef6> <6397>
+<1ef7> <63ab>
+<1ef8> <638e>
+<1ef9> <636f>
+<1efa> <6387>
+<1efb> <6390>
+<1efc> <636e>
+<1efd> <63af>
+<1efe> <6375>
+<1eff> <639c>
+<1f00> <636d>
+<1f01> <63ae>
+<1f02> <637c>
+<1f03> <63a4>
+<1f04> <633b>
+<1f05> <639f>
+<1f06> <6378>
+<1f07> <6385>
+<1f08> <6381>
+<1f09> <6391>
+<1f0a> <638d>
+<1f0b> <6370>
+<1f0c> <6553>
+<1f0d> <65cd>
+<1f0e> <6665>
+<1f0f> <6661>
+<1f10> <665b>
+<1f11> <6659>
+<1f12> <665c>
+<1f13> <6662>
+<1f14> <6718>
+<1f15> <6879>
+<1f16> <6887>
+<1f17> <6890>
+<1f18> <689c>
+<1f1b> <68ae>
+<1f1c> <68ab>
+<1f1d> <6956>
+<1f1e> <686f>
+<1f1f> <68a3>
+<1f20> <68ac>
+<1f21> <68a9>
+<1f22> <6875>
+<1f23> <6874>
+<1f24> <68b2>
+<1f25> <688f>
+<1f26> <6877>
+<1f27> <6892>
+<1f28> <687c>
+<1f29> <686b>
+<1f2a> <6872>
+<1f2b> <68aa>
+<1f2c> <6880>
+<1f2d> <6871>
+<1f2e> <687e>
+<1f2f> <689b>
+<1f30> <6896>
+<1f31> <688b>
+<1f32> <68a0>
+<1f33> <6889>
+<1f34> <68a4>
+<1f35> <6878>
+<1f36> <687b>
+<1f37> <6891>
+<1f38> <688c>
+<1f39> <688a>
+<1f3a> <687d>
+<1f3b> <6b36>
+<1f3c> <6b33>
+<1f3f> <6b91>
+<1f40> <6b8f>
+<1f43> <6b8c>
+<1f44> <6c2a>
+<1f45> <6dc0>
+<1f46> <6dab>
+<1f47> <6db4>
+<1f48> <6db3>
+<1f49> <6e74>
+<1f4a> <6dac>
+<1f4b> <6de9>
+endbfchar
+
+100 beginbfchar
+<1f4c> <6de2>
+<1f4d> <6db7>
+<1f4e> <6df6>
+<1f4f> <6dd4>
+<1f50> <6e00>
+<1f51> <6dc8>
+<1f52> <6de0>
+<1f53> <6ddf>
+<1f54> <6dd6>
+<1f55> <6dbe>
+<1f56> <6de5>
+<1f59> <6ddb>
+<1f5a> <6df4>
+<1f5b> <6dca>
+<1f5c> <6dbd>
+<1f5d> <6ded>
+<1f5e> <6df0>
+<1f5f> <6dba>
+<1f60> <6dd5>
+<1f61> <6dc2>
+<1f62> <6dcf>
+<1f63> <6dc9>
+<1f64> <6dd0>
+<1f65> <6df2>
+<1f66> <6dd3>
+<1f67> <6dfd>
+<1f68> <6dd7>
+<1f69> <6dcd>
+<1f6a> <6de3>
+<1f6b> <6dbb>
+<1f6c> <70fa>
+<1f6d> <710d>
+<1f6e> <70f7>
+<1f6f> <7117>
+<1f70> <70f4>
+<1f71> <710c>
+<1f72> <70f0>
+<1f73> <7104>
+<1f74> <70f3>
+<1f75> <7110>
+<1f76> <70fc>
+<1f77> <70ff>
+<1f78> <7106>
+<1f79> <7113>
+<1f7a> <7100>
+<1f7b> <70f8>
+<1f7c> <70f6>
+<1f7d> <710b>
+<1f7e> <7102>
+<1f7f> <710e>
+<1f80> <727e>
+<1f83> <727f>
+<1f84> <731d>
+<1f85> <7317>
+<1f86> <7307>
+<1f87> <7311>
+<1f88> <7318>
+<1f89> <730a>
+<1f8a> <7308>
+<1f8b> <72ff>
+<1f8c> <730f>
+<1f8d> <731e>
+<1f8e> <7388>
+<1f8f> <73f6>
+<1f90> <73f8>
+<1f91> <73f5>
+<1f92> <7404>
+<1f93> <7401>
+<1f94> <73fd>
+<1f95> <7407>
+<1f96> <7400>
+<1f97> <73fa>
+<1f98> <73fc>
+<1f99> <73ff>
+<1f9a> <740c>
+<1f9b> <740b>
+<1f9c> <73f4>
+<1f9d> <7408>
+<1f9e> <7564>
+<1f9f> <7563>
+<1fa0> <75ce>
+<1fa1> <75d2>
+<1fa2> <75cf>
+<1fa5> <75d1>
+<1fa6> <75d0>
+<1fa7> <768f>
+<1fa8> <7689>
+<1fa9> <76d3>
+<1faa> <7739>
+<1fab> <772f>
+<1fac> <772d>
+<1faf> <7734>
+<1fb0> <7733>
+<1fb1> <773d>
+<1fb2> <7725>
+<1fb3> <773b>
+<1fb4> <7735>
+<1fb5> <7848>
+<1fb6> <7852>
+<1fb7> <7849>
+endbfchar
+
+100 beginbfchar
+<1fb8> <784d>
+<1fb9> <784a>
+<1fba> <784c>
+<1fbb> <7826>
+<1fbc> <7845>
+<1fbd> <7850>
+<1fbe> <7964>
+<1fbf> <7967>
+<1fc2> <7963>
+<1fc3> <796b>
+<1fc4> <7961>
+<1fc5> <79bb>
+<1fc6> <79fa>
+<1fc7> <79f8>
+<1fca> <7a8f>
+<1fcb> <7a94>
+<1fcc> <7a90>
+<1fcd> <7b35>
+<1fce> <7b3b>
+<1fcf> <7b34>
+<1fd0> <7b25>
+<1fd1> <7b30>
+<1fd2> <7b22>
+<1fd3> <7b24>
+<1fd4> <7b33>
+<1fd5> <7b18>
+<1fd6> <7b2a>
+<1fd7> <7b1d>
+<1fd8> <7b31>
+<1fd9> <7b2b>
+<1fda> <7b2d>
+<1fdb> <7b2f>
+<1fdc> <7b32>
+<1fdd> <7b38>
+<1fde> <7b1a>
+<1fdf> <7b23>
+<1fe0> <7c94>
+<1fe1> <7c98>
+<1fe2> <7c96>
+<1fe3> <7ca3>
+<1fe4> <7d35>
+<1fe5> <7d3d>
+<1fe6> <7d38>
+<1fe7> <7d36>
+<1fe8> <7d3a>
+<1fe9> <7d45>
+<1fea> <7d2c>
+<1feb> <7d29>
+<1fec> <7d41>
+<1fed> <7d47>
+<1ff0> <7d4a>
+<1ff1> <7d3b>
+<1ff2> <7d28>
+<1ff3> <7f63>
+<1ff4> <7f95>
+<1ff7> <7f9b>
+<1ffa> <7fcd>
+<1ffd> <7fc7>
+<1ffe> <7fcf>
+<1fff> <7fc9>
+<2000> <801f>
+<2001> <801e>
+<2002> <801b>
+<2003> <8047>
+<2004> <8043>
+<2005> <8048>
+<2006> <8118>
+<2007> <8125>
+<2008> <8119>
+<2009> <811b>
+<200a> <812d>
+<200b> <811f>
+<200c> <812c>
+<200d> <811e>
+<200e> <8121>
+<200f> <8115>
+<2010> <8127>
+<2011> <811d>
+<2012> <8122>
+<2013> <8211>
+<2014> <8238>
+<2015> <8233>
+<2016> <823a>
+<2017> <8234>
+<2018> <8232>
+<2019> <8274>
+<201a> <8390>
+<201b> <83a3>
+<201c> <83a8>
+<201d> <838d>
+<201e> <837a>
+<201f> <8373>
+<2020> <83a4>
+<2021> <8374>
+<2022> <838f>
+<2023> <8381>
+<2024> <8395>
+<2025> <8399>
+<2026> <8375>
+<2027> <8394>
+endbfchar
+
+100 beginbfchar
+<2028> <83a9>
+<2029> <837d>
+<202a> <8383>
+<202b> <838c>
+<202c> <839d>
+<202d> <839b>
+<202e> <83aa>
+<202f> <838b>
+<2030> <837e>
+<2031> <83a5>
+<2032> <83af>
+<2033> <8388>
+<2034> <8397>
+<2035> <83b0>
+<2036> <837f>
+<2037> <83a6>
+<2038> <8387>
+<2039> <83ae>
+<203a> <8376>
+<203b> <8659>
+<203c> <8656>
+<203d> <86bf>
+<203e> <86b7>
+<203f> <86c2>
+<2040> <86c1>
+<2041> <86c5>
+<2042> <86ba>
+<2043> <86b0>
+<2044> <86c8>
+<2045> <86b9>
+<2046> <86b3>
+<2047> <86b8>
+<2048> <86cc>
+<2049> <86b4>
+<204c> <86c3>
+<204f> <8852>
+<2050> <8889>
+<2051> <8895>
+<2052> <88a8>
+<2053> <88a2>
+<2054> <88aa>
+<2055> <889a>
+<2056> <8891>
+<2057> <88a1>
+<2058> <889f>
+<2059> <8898>
+<205a> <88a7>
+<205b> <8899>
+<205c> <889b>
+<205d> <8897>
+<205e> <88a4>
+<205f> <88ac>
+<2060> <888c>
+<2061> <8893>
+<2062> <888e>
+<2063> <8982>
+<2064> <89d6>
+<2065> <89d9>
+<2066> <89d5>
+<2067> <8a30>
+<2068> <8a27>
+<2069> <8a2c>
+<206a> <8a1e>
+<206b> <8c39>
+<206c> <8c3b>
+<206f> <8c7d>
+<2070> <8ca5>
+<2071> <8d7d>
+<2072> <8d7b>
+<2073> <8d79>
+<2074> <8dbc>
+<2075> <8dc2>
+<2076> <8db9>
+<2077> <8dbf>
+<2078> <8dc1>
+<2079> <8ed8>
+<207a> <8ede>
+<207b> <8edd>
+<207c> <8edc>
+<207d> <8ed7>
+<2080> <9024>
+<2081> <900b>
+<2082> <9011>
+<2083> <901c>
+<2084> <900c>
+<2085> <9021>
+<2086> <90ef>
+<2087> <90ea>
+<2088> <90f0>
+<2089> <90f4>
+<208c> <90d4>
+<208f> <90e9>
+<2090> <9156>
+<2091> <9158>
+<2092> <915a>
+<2093> <9153>
+<2094> <9155>
+<2095> <91ec>
+<2096> <91f4>
+<2097> <91f1>
+endbfchar
+
+100 beginbfchar
+<2098> <91f3>
+<2099> <91f8>
+<209a> <91e4>
+<209b> <91f9>
+<209e> <91f7>
+<209f> <91e8>
+<20a0> <91ee>
+<20a1> <957a>
+<20a2> <9586>
+<20a3> <9588>
+<20a4> <967c>
+<20a5> <966d>
+<20a6> <966b>
+<20a7> <9671>
+<20a8> <966f>
+<20a9> <96bf>
+<20aa> <976a>
+<20ab> <9804>
+<20ac> <98e5>
+<20ad> <9997>
+<20ae> <509b>
+<20af> <5095>
+<20b0> <5094>
+<20b1> <509e>
+<20b2> <508b>
+<20b3> <50a3>
+<20b4> <5083>
+<20b5> <508c>
+<20b6> <508e>
+<20b7> <509d>
+<20b8> <5068>
+<20b9> <509c>
+<20ba> <5092>
+<20bb> <5082>
+<20bc> <5087>
+<20bd> <515f>
+<20be> <51d4>
+<20bf> <5312>
+<20c0> <5311>
+<20c1> <53a4>
+<20c2> <53a7>
+<20c3> <5591>
+<20c4> <55a8>
+<20c5> <55a5>
+<20c6> <55ad>
+<20c7> <5577>
+<20c8> <5645>
+<20c9> <55a2>
+<20ca> <5593>
+<20cb> <5588>
+<20cc> <558f>
+<20cd> <55b5>
+<20ce> <5581>
+<20cf> <55a3>
+<20d0> <5592>
+<20d1> <55a4>
+<20d2> <557d>
+<20d3> <558c>
+<20d4> <55a6>
+<20d5> <557f>
+<20d6> <5595>
+<20d7> <55a1>
+<20d8> <558e>
+<20d9> <570c>
+<20da> <5829>
+<20db> <5837>
+<20dc> <5819>
+<20dd> <581e>
+<20de> <5827>
+<20df> <5823>
+<20e0> <5828>
+<20e1> <57f5>
+<20e2> <5848>
+<20e3> <5825>
+<20e4> <581c>
+<20e5> <581b>
+<20e6> <5833>
+<20e7> <583f>
+<20e8> <5836>
+<20e9> <582e>
+<20ea> <5839>
+<20eb> <5838>
+<20ec> <582d>
+<20ed> <582c>
+<20ee> <583b>
+<20ef> <5961>
+<20f0> <5aaf>
+<20f1> <5a94>
+<20f2> <5a9f>
+<20f3> <5a7a>
+<20f4> <5aa2>
+<20f5> <5a9e>
+<20f6> <5a78>
+<20f7> <5aa6>
+<20f8> <5a7c>
+<20f9> <5aa5>
+<20fa> <5aac>
+<20fb> <5a95>
+<20fc> <5aae>
+<20fd> <5a37>
+endbfchar
+
+100 beginbfchar
+<20fe> <5a84>
+<20ff> <5a8a>
+<2100> <5a97>
+<2101> <5a83>
+<2102> <5a8b>
+<2103> <5aa9>
+<2104> <5a7b>
+<2105> <5a7d>
+<2106> <5a8c>
+<2107> <5a9c>
+<2108> <5a8f>
+<2109> <5a93>
+<210a> <5a9d>
+<210b> <5bea>
+<210c> <5bcd>
+<210d> <5bcb>
+<210e> <5bd4>
+<210f> <5bd1>
+<2110> <5bca>
+<2111> <5bce>
+<2112> <5c0c>
+<2113> <5c30>
+<2114> <5d37>
+<2115> <5d43>
+<2116> <5d6b>
+<2117> <5d41>
+<2118> <5d4b>
+<2119> <5d3f>
+<211a> <5d35>
+<211b> <5d51>
+<211c> <5d4e>
+<211d> <5d55>
+<211e> <5d33>
+<211f> <5d3a>
+<2120> <5d52>
+<2121> <5d3d>
+<2122> <5d31>
+<2123> <5d59>
+<2124> <5d42>
+<2125> <5d39>
+<2126> <5d49>
+<2127> <5d38>
+<2128> <5d3c>
+<2129> <5d32>
+<212a> <5d36>
+<212b> <5d40>
+<212c> <5d45>
+<212d> <5e44>
+<212e> <5e41>
+<212f> <5f58>
+<2130> <5fa6>
+<2131> <5fa5>
+<2132> <5fab>
+<2133> <60c9>
+<2134> <60b9>
+<2135> <60cc>
+<2136> <60e2>
+<2137> <60ce>
+<2138> <60c4>
+<2139> <6114>
+<213a> <60f2>
+<213b> <610a>
+<213c> <6116>
+<213d> <6105>
+<213e> <60f5>
+<213f> <6113>
+<2140> <60f8>
+<2141> <60fc>
+<2142> <60fe>
+<2143> <60c1>
+<2144> <6103>
+<2145> <6118>
+<2146> <611d>
+<2147> <6110>
+<2148> <60ff>
+<2149> <6104>
+<214a> <610b>
+<214b> <624a>
+<214c> <6394>
+<214d> <63b1>
+<214e> <63b0>
+<214f> <63ce>
+<2150> <63e5>
+<2151> <63e8>
+<2152> <63ef>
+<2153> <63c3>
+<2154> <649d>
+<2155> <63f3>
+<2156> <63ca>
+<2157> <63e0>
+<2158> <63f6>
+<2159> <63d5>
+<215a> <63f2>
+<215b> <63f5>
+<215c> <6461>
+<215d> <63df>
+<215e> <63be>
+<215f> <63dd>
+<2160> <63dc>
+<2161> <63c4>
+endbfchar
+
+100 beginbfchar
+<2162> <63d8>
+<2163> <63d3>
+<2164> <63c2>
+<2165> <63c7>
+<2166> <63cc>
+<2167> <63cb>
+<2168> <63c8>
+<2169> <63f0>
+<216a> <63d7>
+<216b> <63d9>
+<216c> <6532>
+<216d> <6567>
+<216e> <656a>
+<216f> <6564>
+<2170> <655c>
+<2171> <6568>
+<2172> <6565>
+<2173> <658c>
+<2176> <65ae>
+<2177> <65d0>
+<2178> <65d2>
+<2179> <667c>
+<217a> <666c>
+<217b> <667b>
+<217c> <6680>
+<217d> <6671>
+<217e> <6679>
+<217f> <666a>
+<2180> <6672>
+<2181> <6701>
+<2182> <690c>
+<2183> <68d3>
+<2184> <6904>
+<2185> <68dc>
+<2186> <692a>
+<2187> <68ec>
+<2188> <68ea>
+<2189> <68f1>
+<218a> <690f>
+<218b> <68d6>
+<218c> <68f7>
+<218d> <68eb>
+<218e> <68e4>
+<218f> <68f6>
+<2190> <6913>
+<2191> <6910>
+<2192> <68f3>
+<2193> <68e1>
+<2194> <6907>
+<2195> <68cc>
+<2196> <6908>
+<2197> <6970>
+<2198> <68b4>
+<2199> <6911>
+<219a> <68ef>
+<219b> <68c6>
+<219c> <6914>
+<219d> <68f8>
+<219e> <68d0>
+<219f> <68fd>
+<21a0> <68fc>
+<21a1> <68e8>
+<21a2> <690b>
+<21a3> <690a>
+<21a4> <6917>
+<21a5> <68ce>
+<21a6> <68c8>
+<21a9> <68e6>
+<21aa> <68f4>
+<21ab> <68d1>
+<21ac> <6906>
+<21ad> <68d4>
+<21ae> <68e9>
+<21af> <6915>
+<21b0> <6925>
+<21b1> <68c7>
+<21b2> <6b39>
+<21b3> <6b3b>
+<21b4> <6b3f>
+<21b5> <6b3c>
+<21b6> <6b94>
+<21b7> <6b97>
+<21b8> <6b99>
+<21b9> <6b95>
+<21ba> <6bbd>
+<21bb> <6bf0>
+<21be> <6c30>
+<21bf> <6dfc>
+<21c2> <6e1f>
+<21c3> <6e49>
+<21c4> <6e88>
+<21c7> <6e45>
+<21c8> <6e62>
+<21c9> <6e2b>
+<21ca> <6e3f>
+<21cb> <6e41>
+<21cc> <6e5d>
+<21cd> <6e73>
+<21ce> <6e1c>
+<21cf> <6e33>
+endbfchar
+
+100 beginbfchar
+<21d0> <6e4b>
+<21d1> <6e40>
+<21d2> <6e51>
+<21d3> <6e3b>
+<21d4> <6e03>
+<21d5> <6e2e>
+<21d6> <6e5e>
+<21d7> <6e68>
+<21d8> <6e5c>
+<21d9> <6e61>
+<21da> <6e31>
+<21db> <6e28>
+<21dc> <6e60>
+<21dd> <6e71>
+<21de> <6e6b>
+<21df> <6e39>
+<21e0> <6e22>
+<21e1> <6e30>
+<21e2> <6e53>
+<21e3> <6e65>
+<21e4> <6e27>
+<21e5> <6e78>
+<21e6> <6e64>
+<21e7> <6e77>
+<21e8> <6e55>
+<21e9> <6e79>
+<21ea> <6e52>
+<21eb> <6e66>
+<21ee> <6e5a>
+<21ef> <7120>
+<21f0> <711e>
+<21f1> <712f>
+<21f2> <70fb>
+<21f3> <712e>
+<21f4> <7131>
+<21f5> <7123>
+<21f6> <7125>
+<21f7> <7122>
+<21f8> <7132>
+<21f9> <711f>
+<21fa> <7128>
+<21fb> <713a>
+<21fc> <711b>
+<21fd> <724b>
+<21fe> <725a>
+<21ff> <7288>
+<2200> <7289>
+<2201> <7286>
+<2202> <7285>
+<2203> <728b>
+<2204> <7312>
+<2205> <730b>
+<2206> <7330>
+<2207> <7322>
+<2208> <7331>
+<2209> <7333>
+<220a> <7327>
+<220b> <7332>
+<220c> <732d>
+<220d> <7326>
+<220e> <7323>
+<220f> <7335>
+<2210> <730c>
+<2211> <742e>
+<2212> <742c>
+<2213> <7430>
+<2214> <742b>
+<2215> <7416>
+<2216> <741a>
+<2217> <7421>
+<2218> <742d>
+<2219> <7431>
+<221a> <7424>
+<221b> <7423>
+<221c> <741d>
+<221d> <7429>
+<221e> <7420>
+<221f> <7432>
+<2220> <74fb>
+<2221> <752f>
+<2222> <756f>
+<2223> <756c>
+<2224> <75e7>
+<2225> <75da>
+<2226> <75e1>
+<2227> <75e6>
+<2228> <75dd>
+<2229> <75df>
+<222a> <75e4>
+<222b> <75d7>
+<222c> <7695>
+<222d> <7692>
+<222e> <76da>
+<2231> <7744>
+<2232> <774d>
+<2233> <7745>
+<2234> <774a>
+<2235> <774e>
+<2238> <77de>
+<2239> <77ec>
+endbfchar
+
+100 beginbfchar
+<223a> <7860>
+<223d> <785c>
+<223e> <786d>
+<223f> <7871>
+<2240> <786a>
+<2241> <786e>
+<2242> <7870>
+<2243> <7869>
+<2244> <7868>
+<2245> <785e>
+<2246> <7862>
+<2247> <7974>
+<2248> <7973>
+<2249> <7972>
+<224a> <7970>
+<224b> <7a02>
+<224c> <7a0a>
+<224d> <7a03>
+<224e> <7a0c>
+<224f> <7a04>
+<2250> <7a99>
+<2251> <7ae6>
+<2252> <7ae4>
+<2253> <7b4a>
+<2254> <7b47>
+<2255> <7b44>
+<2256> <7b48>
+<2257> <7b4c>
+<2258> <7b4e>
+<2259> <7b40>
+<225a> <7b58>
+<225b> <7b45>
+<225c> <7ca2>
+<225d> <7c9e>
+<225e> <7ca8>
+<225f> <7ca1>
+<2260> <7d58>
+<2261> <7d6f>
+<2262> <7d63>
+<2263> <7d53>
+<2264> <7d56>
+<2265> <7d67>
+<2266> <7d6a>
+<2267> <7d4f>
+<2268> <7d6d>
+<2269> <7d5c>
+<226a> <7d6b>
+<226b> <7d52>
+<226c> <7d54>
+<226d> <7d69>
+<226e> <7d51>
+<226f> <7d5f>
+<2270> <7d4e>
+<2275> <7fa2>
+<2278> <7fd7>
+<2279> <8051>
+<227c> <80fe>
+<227d> <80d4>
+<227e> <8143>
+<227f> <814a>
+<2280> <8152>
+<2281> <814f>
+<2282> <8147>
+<2283> <813d>
+<2284> <814d>
+<2285> <813a>
+<2286> <81e6>
+<2287> <81ee>
+<228b> <8204>
+<228e> <823f>
+<228f> <8275>
+<2290> <833b>
+<2291> <83cf>
+<2292> <83f9>
+<2293> <8423>
+<2294> <83c0>
+<2295> <83e8>
+<2296> <8412>
+<2297> <83e7>
+<2298> <83e4>
+<2299> <83fc>
+<229a> <83f6>
+<229b> <8410>
+<229c> <83c6>
+<229d> <83c8>
+<229e> <83eb>
+<229f> <83e3>
+<22a0> <83bf>
+<22a1> <8401>
+<22a2> <83dd>
+<22a3> <83e5>
+<22a4> <83d8>
+<22a5> <83ff>
+<22a6> <83e1>
+<22a7> <83cb>
+<22a8> <83ce>
+<22a9> <83d6>
+<22aa> <83f5>
+<22ab> <83c9>
+<22ac> <8409>
+endbfchar
+
+100 beginbfchar
+<22ad> <840f>
+<22ae> <83de>
+<22af> <8411>
+<22b0> <8406>
+<22b1> <83c2>
+<22b2> <83f3>
+<22b3> <83d5>
+<22b4> <83fa>
+<22b5> <83c7>
+<22b6> <83d1>
+<22b7> <83ea>
+<22b8> <8413>
+<22b9> <839a>
+<22ba> <83c3>
+<22bb> <83ec>
+<22bc> <83ee>
+<22bd> <83c4>
+<22be> <83fb>
+<22bf> <83d7>
+<22c0> <83e2>
+<22c1> <841b>
+<22c2> <83db>
+<22c3> <83fe>
+<22c4> <86d8>
+<22c5> <86e2>
+<22c6> <86e6>
+<22c7> <86d3>
+<22c8> <86e3>
+<22c9> <86da>
+<22ca> <86ea>
+<22cb> <86dd>
+<22cc> <86eb>
+<22cd> <86dc>
+<22ce> <86ec>
+<22cf> <86e9>
+<22d0> <86d7>
+<22d1> <86e8>
+<22d2> <86d1>
+<22d3> <8848>
+<22d4> <8856>
+<22d5> <8855>
+<22d6> <88ba>
+<22d7> <88d7>
+<22d8> <88b9>
+<22d9> <88b8>
+<22da> <88c0>
+<22db> <88be>
+<22dc> <88b6>
+<22dd> <88bc>
+<22de> <88b7>
+<22df> <88bd>
+<22e0> <88b2>
+<22e1> <8901>
+<22e2> <88c9>
+<22e3> <8995>
+<22e4> <8998>
+<22e5> <8997>
+<22e6> <89dd>
+<22e9> <8a4e>
+<22ea> <8a4d>
+<22eb> <8a39>
+<22ec> <8a59>
+<22ed> <8a40>
+<22f2> <8a52>
+<22f3> <8a48>
+<22f4> <8a51>
+<22f5> <8a4a>
+<22f6> <8a4c>
+<22f7> <8a4f>
+<22f8> <8c5f>
+<22f9> <8c81>
+<22fa> <8c80>
+<22fb> <8cba>
+<22fc> <8cbe>
+<22fd> <8cb0>
+<22fe> <8cb9>
+<22ff> <8cb5>
+<2300> <8d84>
+<2301> <8d80>
+<2302> <8d89>
+<2303> <8dd8>
+<2304> <8dd3>
+<2305> <8dcd>
+<2306> <8dc7>
+<2307> <8dd6>
+<2308> <8ddc>
+<2309> <8dcf>
+<230a> <8dd5>
+<230b> <8dd9>
+<230c> <8dc8>
+<230d> <8dd7>
+<230e> <8dc5>
+<230f> <8eef>
+<2310> <8ef7>
+<2311> <8efa>
+<2312> <8ef9>
+<2313> <8ee6>
+<2314> <8eee>
+<2315> <8ee5>
+<2316> <8ef5>
+endbfchar
+
+100 beginbfchar
+<2319> <8ef6>
+<231a> <8eeb>
+<231b> <8ef1>
+<231c> <8eec>
+<231d> <8ef4>
+<231e> <8ee9>
+<231f> <902d>
+<2320> <9034>
+<2321> <902f>
+<2322> <9106>
+<2323> <912c>
+<2324> <9104>
+<2325> <90ff>
+<2326> <90fc>
+<2327> <9108>
+<2328> <90f9>
+<2329> <90fb>
+<232a> <9101>
+<232b> <9100>
+<232c> <9107>
+<232d> <9105>
+<232e> <9103>
+<232f> <9161>
+<2330> <9164>
+<2331> <915f>
+<2332> <9162>
+<2333> <9160>
+<2334> <9201>
+<2335> <920a>
+<2336> <9225>
+<2337> <9203>
+<2338> <921a>
+<2339> <9226>
+<233a> <920f>
+<233b> <920c>
+<233c> <9200>
+<233d> <9212>
+<233e> <91ff>
+<233f> <91fd>
+<2340> <9206>
+<2341> <9204>
+<2342> <9227>
+<2343> <9202>
+<2344> <921c>
+<2345> <9224>
+<2346> <9219>
+<2347> <9217>
+<2348> <9205>
+<2349> <9216>
+<234a> <957b>
+<234b> <958d>
+<234c> <958c>
+<234d> <9590>
+<234e> <9687>
+<234f> <967e>
+<2352> <9683>
+<2353> <9680>
+<2354> <96c2>
+<2355> <96c8>
+<2356> <96c3>
+<2357> <96f1>
+<2358> <96f0>
+<2359> <976c>
+<235a> <9770>
+<235b> <976e>
+<235c> <9807>
+<235d> <98a9>
+<235e> <98eb>
+<235f> <9ce6>
+<2360> <9ef9>
+<2363> <4eb6>
+<2364> <50bd>
+<2365> <50bf>
+<2366> <50c6>
+<2367> <50ae>
+<2368> <50c4>
+<2369> <50ca>
+<236a> <50b4>
+<236b> <50c8>
+<236c> <50c2>
+<236d> <50b0>
+<236e> <50c1>
+<236f> <50ba>
+<2370> <50b1>
+<2371> <50cb>
+<2372> <50c9>
+<2373> <50b6>
+<2374> <50b8>
+<2375> <51d7>
+<2376> <527a>
+<2377> <5278>
+<237a> <55c3>
+<237b> <55db>
+<237c> <55cc>
+<237d> <55d0>
+<237e> <55cb>
+<237f> <55ca>
+<2380> <55dd>
+<2381> <55c0>
+<2382> <55d4>
+endbfchar
+
+100 beginbfchar
+<2383> <55c4>
+<2384> <55e9>
+<2385> <55bf>
+<2386> <55d2>
+<2387> <558d>
+<2388> <55cf>
+<2389> <55d5>
+<238a> <55e2>
+<238b> <55d6>
+<238c> <55c8>
+<238d> <55f2>
+<238e> <55cd>
+<238f> <55d9>
+<2390> <55c2>
+<2391> <5714>
+<2392> <5853>
+<2393> <5868>
+<2394> <5864>
+<2395> <584f>
+<2396> <584d>
+<2397> <5849>
+<2398> <586f>
+<2399> <5855>
+<239a> <584e>
+<239b> <585d>
+<239c> <5859>
+<239d> <5865>
+<239e> <585b>
+<239f> <583d>
+<23a0> <5863>
+<23a1> <5871>
+<23a2> <58fc>
+<23a3> <5ac7>
+<23a4> <5ac4>
+<23a5> <5acb>
+<23a6> <5aba>
+<23a7> <5ab8>
+<23a8> <5ab1>
+<23a9> <5ab5>
+<23aa> <5ab0>
+<23ab> <5abf>
+<23ac> <5ac8>
+<23ad> <5abb>
+<23ae> <5ac6>
+<23af> <5ab7>
+<23b0> <5ac0>
+<23b1> <5aca>
+<23b2> <5ab4>
+<23b3> <5ab6>
+<23b4> <5acd>
+<23b5> <5ab9>
+<23b6> <5a90>
+<23b7> <5bd6>
+<23ba> <5c1f>
+<23bb> <5c33>
+<23bc> <5d71>
+<23bd> <5d63>
+<23be> <5d4a>
+<23bf> <5d65>
+<23c0> <5d72>
+<23c1> <5d6c>
+<23c2> <5d5e>
+<23c3> <5d68>
+<23c4> <5d67>
+<23c5> <5d62>
+<23c6> <5df0>
+<23c7> <5e4f>
+<23c8> <5e4e>
+<23c9> <5e4a>
+<23ca> <5e4d>
+<23cb> <5e4b>
+<23cc> <5ec5>
+<23cd> <5ecc>
+<23ce> <5ec6>
+<23cf> <5ecb>
+<23d0> <5ec7>
+<23d1> <5f40>
+<23d2> <5faf>
+<23d3> <5fad>
+<23d4> <60f7>
+<23d7> <612b>
+<23d8> <6145>
+<23d9> <6136>
+<23da> <6132>
+<23db> <612e>
+<23dc> <6146>
+<23dd> <612f>
+<23de> <614f>
+<23df> <6129>
+<23e0> <6140>
+<23e1> <6220>
+<23e2> <9168>
+<23e3> <6223>
+<23e4> <6225>
+<23e5> <6224>
+<23e6> <63c5>
+<23e7> <63f1>
+<23e8> <63eb>
+<23e9> <6410>
+<23ea> <6412>
+endbfchar
+
+100 beginbfchar
+<23eb> <6409>
+<23ec> <6420>
+<23ed> <6424>
+<23ee> <6433>
+<23ef> <6443>
+<23f0> <641f>
+<23f1> <6415>
+<23f2> <6418>
+<23f3> <6439>
+<23f4> <6437>
+<23f7> <640c>
+<23f8> <6426>
+<23f9> <6430>
+<23fa> <6428>
+<23fb> <6441>
+<23fc> <6435>
+<23fd> <642f>
+<23fe> <640a>
+<23ff> <641a>
+<2400> <6440>
+<2401> <6425>
+<2402> <6427>
+<2403> <640b>
+<2404> <63e7>
+<2405> <641b>
+<2406> <642e>
+<2407> <6421>
+<2408> <640e>
+<2409> <656f>
+<240a> <6592>
+<240b> <65d3>
+<240c> <6686>
+<240d> <668c>
+<240e> <6695>
+<240f> <6690>
+<2410> <668b>
+<2411> <668a>
+<2412> <6699>
+<2413> <6694>
+<2414> <6678>
+<2415> <6720>
+<2416> <6966>
+<2417> <695f>
+<2418> <6938>
+<2419> <694e>
+<241a> <6962>
+<241b> <6971>
+<241c> <693f>
+<241d> <6945>
+<241e> <696a>
+<241f> <6939>
+<2420> <6942>
+<2421> <6957>
+<2422> <6959>
+<2423> <697a>
+<2426> <6935>
+<2427> <696c>
+<2428> <6933>
+<2429> <693d>
+<242a> <6965>
+<242b> <68f0>
+<242c> <6978>
+<242d> <6934>
+<242e> <6969>
+<242f> <6940>
+<2430> <696f>
+<2431> <6944>
+<2432> <6976>
+<2433> <6958>
+<2434> <6941>
+<2435> <6974>
+<2436> <694c>
+<2437> <693b>
+<2438> <694b>
+<2439> <6937>
+<243a> <695c>
+<243b> <694f>
+<243c> <6951>
+<243d> <6932>
+<243e> <6952>
+<243f> <692f>
+<2440> <697b>
+<2441> <693c>
+<2442> <6b46>
+<2443> <6b45>
+<2444> <6b43>
+<2445> <6b42>
+<2446> <6b48>
+<2447> <6b41>
+<2448> <6b9b>
+<244b> <6bf9>
+<244e> <6e9b>
+<244f> <6ed6>
+<2450> <6ec8>
+<2451> <6e8f>
+<2452> <6ec0>
+<2453> <6e9f>
+<2456> <6ea0>
+<2457> <6eb1>
+<2458> <6eb9>
+endbfchar
+
+100 beginbfchar
+<2459> <6ec6>
+<245a> <6ed2>
+<245b> <6ebd>
+<245c> <6ec1>
+<245d> <6e9e>
+<245e> <6ec9>
+<245f> <6eb7>
+<2460> <6eb0>
+<2461> <6ecd>
+<2462> <6ea6>
+<2463> <6ecf>
+<2464> <6eb2>
+<2465> <6ebe>
+<2466> <6ec3>
+<2467> <6edc>
+<2468> <6ed8>
+<2469> <6e99>
+<246a> <6e92>
+<246b> <6e8e>
+<246c> <6e8d>
+<246d> <6ea4>
+<246e> <6ea1>
+<246f> <6ebf>
+<2470> <6eb3>
+<2471> <6ed0>
+<2472> <6eca>
+<2473> <6e97>
+<2474> <6eae>
+<2475> <6ea3>
+<2476> <7147>
+<2477> <7154>
+<2478> <7152>
+<2479> <7163>
+<247a> <7160>
+<247b> <7141>
+<247c> <715d>
+<247d> <7162>
+<247e> <7172>
+<247f> <7178>
+<2480> <716a>
+<2481> <7161>
+<2482> <7142>
+<2483> <7158>
+<2484> <7143>
+<2485> <714b>
+<2486> <7170>
+<2487> <715f>
+<2488> <7150>
+<2489> <7153>
+<248a> <7144>
+<248b> <714d>
+<248c> <715a>
+<248d> <724f>
+<248e> <728d>
+<248f> <728c>
+<2490> <7291>
+<2491> <7290>
+<2492> <728e>
+<2493> <733c>
+<2494> <7342>
+<2495> <733b>
+<2496> <733a>
+<2497> <7340>
+<2498> <734a>
+<2499> <7349>
+<249a> <7444>
+<249d> <7452>
+<249e> <7451>
+<249f> <7457>
+<24a0> <7440>
+<24a3> <744e>
+<24a4> <7442>
+<24a5> <7446>
+<24a6> <744d>
+<24a7> <7454>
+<24a8> <74e1>
+<24a9> <74ff>
+<24aa> <74fe>
+<24ab> <74fd>
+<24ac> <751d>
+<24ad> <7579>
+<24ae> <7577>
+<24af> <6983>
+<24b0> <75ef>
+<24b1> <760f>
+<24b2> <7603>
+<24b3> <75f7>
+<24b4> <75fe>
+<24b5> <75fc>
+<24b6> <75f9>
+<24b7> <75f8>
+<24b8> <7610>
+<24b9> <75fb>
+<24ba> <75f6>
+<24bb> <75ed>
+<24bc> <75f5>
+<24bd> <75fd>
+<24be> <7699>
+<24bf> <76b5>
+<24c0> <76dd>
+endbfchar
+
+100 beginbfchar
+<24c1> <7755>
+<24c4> <7752>
+<24c5> <7756>
+<24c6> <775a>
+<24c7> <7769>
+<24c8> <7767>
+<24c9> <7754>
+<24ca> <7759>
+<24cb> <776d>
+<24cc> <77e0>
+<24cd> <7887>
+<24ce> <789a>
+<24cf> <7894>
+<24d0> <788f>
+<24d1> <7884>
+<24d2> <7895>
+<24d5> <78a1>
+<24d6> <7883>
+<24d7> <7879>
+<24d8> <7899>
+<24d9> <7880>
+<24da> <7896>
+<24db> <787b>
+<24dc> <797c>
+<24dd> <7982>
+<24de> <797d>
+<24df> <7979>
+<24e0> <7a11>
+<24e3> <7a12>
+<24e4> <7a17>
+<24e5> <7a15>
+<24e6> <7a22>
+<24e7> <7a13>
+<24e8> <7a1b>
+<24e9> <7a10>
+<24ea> <7aa3>
+<24eb> <7aa2>
+<24ec> <7a9e>
+<24ed> <7aeb>
+<24ee> <7b66>
+<24ef> <7b64>
+<24f0> <7b6d>
+<24f1> <7b74>
+<24f2> <7b69>
+<24f3> <7b72>
+<24f4> <7b65>
+<24f5> <7b73>
+<24f6> <7b71>
+<24f7> <7b70>
+<24f8> <7b61>
+<24f9> <7b78>
+<24fa> <7b76>
+<24fb> <7b63>
+<24fc> <7cb2>
+<24fd> <7cb4>
+<24fe> <7caf>
+<24ff> <7d88>
+<2500> <7d86>
+<2501> <7d80>
+<2502> <7d8d>
+<2503> <7d7f>
+<2504> <7d85>
+<2505> <7d7a>
+<2506> <7d8e>
+<2507> <7d7b>
+<2508> <7d83>
+<2509> <7d7c>
+<250a> <7d8c>
+<250b> <7d94>
+<250c> <7d84>
+<250d> <7d7d>
+<250e> <7d92>
+<250f> <7f6d>
+<2510> <7f6b>
+<2513> <7f6c>
+<2514> <7fa6>
+<2515> <7fa5>
+<2516> <7fa7>
+<2519> <8021>
+<251a> <8164>
+<251b> <8160>
+<251c> <8177>
+<251d> <815c>
+<251e> <8169>
+<251f> <815b>
+<2520> <8162>
+<2521> <8172>
+<2522> <6721>
+<2523> <815e>
+<2524> <8176>
+<2525> <8167>
+<2526> <816f>
+<2527> <8144>
+<2528> <8161>
+<2529> <821d>
+<252a> <8249>
+<252b> <8244>
+<252c> <8240>
+<252d> <8242>
+<252e> <8245>
+endbfchar
+
+100 beginbfchar
+<252f> <84f1>
+<2530> <843f>
+<2531> <8456>
+<2532> <8476>
+<2533> <8479>
+<2534> <848f>
+<2535> <848d>
+<2536> <8465>
+<2537> <8451>
+<2538> <8440>
+<2539> <8486>
+<253a> <8467>
+<253b> <8430>
+<253c> <844d>
+<253d> <847d>
+<253e> <845a>
+<253f> <8459>
+<2540> <8474>
+<2541> <8473>
+<2542> <845d>
+<2543> <8507>
+<2544> <845e>
+<2545> <8437>
+<2546> <843a>
+<2547> <8434>
+<2548> <847a>
+<2549> <8443>
+<254a> <8478>
+<254b> <8432>
+<254c> <8445>
+<254d> <8429>
+<254e> <83d9>
+<254f> <844b>
+<2550> <842f>
+<2551> <8442>
+<2552> <842d>
+<2553> <845f>
+<2554> <8470>
+<2555> <8439>
+<2556> <844e>
+<2557> <844c>
+<2558> <8452>
+<2559> <846f>
+<255a> <84c5>
+<255b> <848e>
+<255c> <843b>
+<255d> <8447>
+<255e> <8436>
+<255f> <8433>
+<2560> <8468>
+<2561> <847e>
+<2562> <8444>
+<2563> <842b>
+<2564> <8460>
+<2565> <8454>
+<2566> <846e>
+<2567> <8450>
+<2568> <870b>
+<2569> <8704>
+<256a> <86f7>
+<256b> <870c>
+<256c> <86fa>
+<256d> <86d6>
+<256e> <86f5>
+<256f> <874d>
+<2570> <86f8>
+<2571> <870e>
+<2572> <8709>
+<2573> <8701>
+<2574> <86f6>
+<2575> <870d>
+<2576> <8705>
+<2577> <88d6>
+<2578> <88cb>
+<257b> <88de>
+<257c> <88db>
+<257d> <88da>
+<257e> <88cc>
+<257f> <88d0>
+<2580> <8985>
+<2581> <899b>
+<2582> <89df>
+<2583> <89e5>
+<2584> <89e4>
+<2585> <89e1>
+<2586> <89e0>
+<2587> <89e2>
+<2588> <89dc>
+<2589> <89e6>
+<258a> <8a76>
+<258b> <8a86>
+<258c> <8a7f>
+<258d> <8a61>
+<258e> <8a3f>
+<258f> <8a77>
+<2590> <8a82>
+<2591> <8a84>
+<2592> <8a75>
+<2593> <8a83>
+<2594> <8a81>
+endbfchar
+
+100 beginbfchar
+<2595> <8a74>
+<2596> <8a7a>
+<2597> <8c3c>
+<2598> <8c4b>
+<2599> <8c4a>
+<259a> <8c65>
+<259b> <8c64>
+<259c> <8c66>
+<259d> <8c86>
+<25a0> <8ccc>
+<25a3> <8d91>
+<25a4> <8d8c>
+<25a7> <8d8d>
+<25aa> <8d90>
+<25ab> <8d92>
+<25ac> <8df0>
+<25ad> <8de0>
+<25ae> <8dec>
+<25af> <8df1>
+<25b0> <8dee>
+<25b1> <8dd0>
+<25b2> <8de9>
+<25b3> <8de3>
+<25b4> <8de2>
+<25b5> <8de7>
+<25b6> <8df2>
+<25b7> <8deb>
+<25b8> <8df4>
+<25b9> <8f06>
+<25ba> <8eff>
+<25bb> <8f01>
+<25bc> <8f00>
+<25bd> <8f05>
+<25c0> <8f02>
+<25c1> <8f0b>
+<25c2> <9052>
+<25c3> <903f>
+<25c4> <9044>
+<25c5> <9049>
+<25c6> <903d>
+<25c7> <9110>
+<25c8> <910d>
+<25c9> <910f>
+<25ca> <9111>
+<25cb> <9116>
+<25cc> <9114>
+<25cd> <910b>
+<25ce> <910e>
+<25d1> <9248>
+<25d2> <9252>
+<25d3> <9230>
+<25d4> <923a>
+<25d5> <9266>
+<25d6> <9233>
+<25d7> <9265>
+<25d8> <925e>
+<25d9> <9283>
+<25da> <922e>
+<25db> <924a>
+<25dc> <9246>
+<25dd> <926d>
+<25de> <926c>
+<25df> <924f>
+<25e0> <9260>
+<25e1> <9267>
+<25e2> <926f>
+<25e3> <9236>
+<25e4> <9261>
+<25e5> <9270>
+<25e6> <9231>
+<25e7> <9254>
+<25e8> <9263>
+<25e9> <9250>
+<25ea> <9272>
+<25eb> <924e>
+<25ec> <9253>
+<25ed> <924c>
+<25ee> <9256>
+<25ef> <9232>
+<25f0> <959f>
+<25f1> <959c>
+<25f2> <959e>
+<25f3> <959b>
+<25f6> <9691>
+<25f7> <9697>
+<25f8> <96ce>
+<25f9> <96fa>
+<25fa> <96fd>
+<25fb> <96f8>
+<25fc> <96f5>
+<25fd> <9773>
+<2600> <9772>
+<2601> <980f>
+<2604> <98ac>
+<2605> <98f6>
+<2606> <98f9>
+<2607> <99af>
+<2608> <99b2>
+<2609> <99b0>
+<260a> <99b5>
+endbfchar
+
+100 beginbfchar
+<260b> <9aad>
+<260c> <9aab>
+<260d> <9b5b>
+<260e> <9cea>
+<260f> <9ced>
+<2610> <9ce7>
+<2611> <9e80>
+<2612> <9efd>
+<2613> <50e6>
+<2614> <50d4>
+<2615> <50d7>
+<2616> <50e8>
+<2617> <50f3>
+<2618> <50db>
+<2619> <50ea>
+<261a> <50dd>
+<261b> <50e4>
+<261c> <50d3>
+<261d> <50ec>
+<261e> <50f0>
+<261f> <50ef>
+<2620> <50e3>
+<2621> <50e0>
+<2622> <51d8>
+<2625> <52e9>
+<2626> <52eb>
+<2627> <5330>
+<2628> <53ac>
+<2629> <5627>
+<262a> <5615>
+<262b> <560c>
+<262c> <5612>
+<262d> <55fc>
+<262e> <560f>
+<262f> <561c>
+<2630> <5601>
+<2631> <5613>
+<2632> <5602>
+<2633> <55fa>
+<2634> <561d>
+<2635> <5604>
+<2636> <55ff>
+<2637> <55f9>
+<2638> <5889>
+<2639> <587c>
+<263a> <5890>
+<263b> <5898>
+<263c> <5886>
+<263d> <5881>
+<263e> <587f>
+<263f> <5874>
+<2640> <588b>
+<2641> <587a>
+<2642> <5887>
+<2643> <5891>
+<2644> <588e>
+<2645> <5876>
+<2646> <5882>
+<2647> <5888>
+<2648> <587b>
+<2649> <5894>
+<264a> <588f>
+<264b> <58fe>
+<264c> <596b>
+<264d> <5adc>
+<264e> <5aee>
+<264f> <5ae5>
+<2650> <5ad5>
+<2651> <5aea>
+<2652> <5ada>
+<2653> <5aed>
+<2654> <5aeb>
+<2655> <5af3>
+<2656> <5ae2>
+<2657> <5ae0>
+<2658> <5adb>
+<2659> <5aec>
+<265a> <5ade>
+<265b> <5add>
+<265c> <5ad9>
+<265d> <5ae8>
+<265e> <5adf>
+<265f> <5b77>
+<2660> <5be0>
+<2661> <5be3>
+<2662> <5c63>
+<2663> <5d82>
+<2664> <5d80>
+<2665> <5d7d>
+<2666> <5d86>
+<2667> <5d7a>
+<2668> <5d81>
+<2669> <5d77>
+<266a> <5d8a>
+<266b> <5d89>
+<266c> <5d88>
+<266d> <5d7e>
+<266e> <5d7c>
+<266f> <5d8d>
+<2670> <5d79>
+endbfchar
+
+100 beginbfchar
+<2671> <5d7f>
+<2674> <5e53>
+<2675> <5ed8>
+<2676> <5ed1>
+<2677> <5ed7>
+<2678> <5ece>
+<2679> <5edc>
+<267a> <5ed5>
+<267b> <5ed9>
+<267c> <5ed2>
+<267d> <5ed4>
+<267e> <5f44>
+<267f> <5f43>
+<2680> <5f6f>
+<2681> <5fb6>
+<2682> <612c>
+<2683> <6128>
+<2684> <6141>
+<2685> <615e>
+<2686> <6171>
+<2687> <6173>
+<268a> <6172>
+<268b> <616c>
+<268c> <6180>
+<268d> <6174>
+<268e> <6154>
+<268f> <617a>
+<2690> <615b>
+<2691> <6165>
+<2692> <613b>
+<2693> <616a>
+<2694> <6161>
+<2695> <6156>
+<2696> <6229>
+<2697> <6227>
+<2698> <622b>
+<2699> <642b>
+<269a> <644d>
+<269b> <645b>
+<269c> <645d>
+<269d> <6474>
+<269e> <6476>
+<26a1> <647d>
+<26a2> <6475>
+<26a3> <6466>
+<26a4> <64a6>
+<26a5> <644e>
+<26a6> <6482>
+<26a7> <645e>
+<26a8> <645c>
+<26a9> <644b>
+<26aa> <6453>
+<26ab> <6460>
+<26ac> <6450>
+<26ad> <647f>
+<26ae> <643f>
+<26af> <646c>
+<26b0> <646b>
+<26b1> <6459>
+<26b2> <6465>
+<26b3> <6477>
+<26b4> <6573>
+<26b5> <65a0>
+<26b6> <66a1>
+<26b7> <66a0>
+<26b8> <669f>
+<26b9> <6705>
+<26ba> <6704>
+<26bb> <6722>
+<26bc> <69b1>
+<26bd> <69b6>
+<26be> <69c9>
+<26bf> <69a0>
+<26c0> <69ce>
+<26c1> <6996>
+<26c2> <69b0>
+<26c3> <69ac>
+<26c4> <69bc>
+<26c5> <6991>
+<26c6> <6999>
+<26c7> <698e>
+<26c8> <69a7>
+<26c9> <698d>
+<26ca> <69a9>
+<26cb> <69be>
+<26cc> <69af>
+<26cd> <69bf>
+<26ce> <69c4>
+<26cf> <69bd>
+<26d0> <69a4>
+<26d1> <69d4>
+<26d2> <69b9>
+<26d3> <69ca>
+<26d4> <699a>
+<26d5> <69cf>
+<26d6> <69b3>
+<26d7> <6993>
+<26d8> <69aa>
+<26d9> <69a1>
+<26da> <699e>
+endbfchar
+
+100 beginbfchar
+<26db> <69d9>
+<26dc> <6997>
+<26dd> <6990>
+<26de> <69c2>
+<26df> <69b5>
+<26e0> <69a5>
+<26e1> <69c6>
+<26e2> <6b4a>
+<26e3> <6b4d>
+<26e4> <6b4b>
+<26ea> <6bfe>
+<26eb> <6ece>
+<26ec> <6ef5>
+<26ed> <6ef1>
+<26ee> <6f03>
+<26ef> <6f25>
+<26f0> <6ef8>
+<26f1> <6f37>
+<26f2> <6efb>
+<26f3> <6f2e>
+<26f4> <6f09>
+<26f5> <6f4e>
+<26f8> <6f27>
+<26f9> <6f18>
+<26fa> <6f3b>
+<26fb> <6f12>
+<26fc> <6eed>
+<26fd> <6f0a>
+<26fe> <6f36>
+<26ff> <6f73>
+<2700> <6ef9>
+<2701> <6eee>
+<2702> <6f2d>
+<2703> <6f40>
+<2704> <6f30>
+<2705> <6f3c>
+<2706> <6f35>
+<2707> <6eeb>
+<2708> <6f07>
+<2709> <6f0e>
+<270a> <6f43>
+<270b> <6f05>
+<270c> <6efd>
+<270d> <6ef6>
+<270e> <6f39>
+<270f> <6f1c>
+<2710> <6efc>
+<2711> <6f3a>
+<2712> <6f1f>
+<2713> <6f0d>
+<2714> <6f1e>
+<2715> <6f08>
+<2716> <6f21>
+<2717> <7187>
+<2718> <7190>
+<2719> <7189>
+<271a> <7180>
+<271b> <7185>
+<271c> <7182>
+<271d> <718f>
+<271e> <717b>
+<271f> <7186>
+<2720> <7181>
+<2721> <7197>
+<2722> <7244>
+<2723> <7253>
+<2724> <7297>
+<2725> <7295>
+<2726> <7293>
+<2727> <7343>
+<2728> <734d>
+<2729> <7351>
+<272a> <734c>
+<272b> <7462>
+<272c> <7473>
+<272d> <7471>
+<272e> <7475>
+<272f> <7472>
+<2730> <7467>
+<2731> <746e>
+<2732> <7500>
+<2735> <757d>
+<2736> <7590>
+<2737> <7616>
+<2738> <7608>
+<2739> <760c>
+<273a> <7615>
+<273b> <7611>
+<273c> <760a>
+<273d> <7614>
+<273e> <76b8>
+<273f> <7781>
+<2740> <777c>
+<2741> <7785>
+<2742> <7782>
+<2743> <776e>
+<2744> <7780>
+<2745> <776f>
+<2746> <777e>
+<2747> <7783>
+endbfchar
+
+100 beginbfchar
+<2748> <78b2>
+<2749> <78aa>
+<274a> <78b4>
+<274b> <78ad>
+<274c> <78a8>
+<274d> <787e>
+<274e> <78ab>
+<274f> <789e>
+<2750> <78a5>
+<2751> <78a0>
+<2752> <78ac>
+<2753> <78a2>
+<2754> <78a4>
+<2755> <7998>
+<2758> <7996>
+<2759> <7995>
+<275a> <7994>
+<275b> <7993>
+<275c> <7997>
+<275d> <7988>
+<275e> <7992>
+<275f> <7990>
+<2760> <7a2b>
+<2761> <7a4a>
+<2762> <7a30>
+<2763> <7a2f>
+<2764> <7a28>
+<2765> <7a26>
+<2766> <7aa8>
+<2769> <7aee>
+<276a> <7b88>
+<276b> <7b9c>
+<276c> <7b8a>
+<276d> <7b91>
+<276e> <7b90>
+<276f> <7b96>
+<2770> <7b8d>
+<2771> <7b8c>
+<2772> <7b9b>
+<2773> <7b8e>
+<2774> <7b85>
+<2775> <7b98>
+<2776> <5284>
+<2777> <7b99>
+<2778> <7ba4>
+<2779> <7b82>
+<277a> <7cbb>
+<277b> <7cbf>
+<277c> <7cbc>
+<277d> <7cba>
+<277e> <7da7>
+<277f> <7db7>
+<2780> <7dc2>
+<2781> <7da3>
+<2782> <7daa>
+<2783> <7dc1>
+<2784> <7dc0>
+<2785> <7dc5>
+<2786> <7d9d>
+<2787> <7dce>
+<2788> <7dc4>
+<2789> <7dc6>
+<278c> <7daf>
+<278d> <7db9>
+<278e> <7d96>
+<278f> <7dbc>
+<2790> <7d9f>
+<2791> <7da6>
+<2792> <7dae>
+<2793> <7da9>
+<2794> <7da1>
+<2795> <7dc9>
+<2796> <7f73>
+<2799> <7fe5>
+<279a> <7fde>
+<279b> <8024>
+<279c> <805d>
+<279d> <805c>
+<279e> <8189>
+<279f> <8186>
+<27a0> <8183>
+<27a1> <8187>
+<27a2> <818d>
+<27a3> <818c>
+<27a4> <818b>
+<27a5> <8215>
+<27a6> <8497>
+<27a7> <84a4>
+<27a8> <84a1>
+<27a9> <849f>
+<27aa> <84ba>
+<27ab> <84ce>
+<27ac> <84c2>
+<27ad> <84ac>
+<27ae> <84ae>
+<27af> <84ab>
+<27b0> <84b9>
+<27b1> <84b4>
+<27b2> <84c1>
+<27b3> <84cd>
+endbfchar
+
+100 beginbfchar
+<27b4> <84aa>
+<27b5> <849a>
+<27b6> <84b1>
+<27b7> <84d0>
+<27b8> <849d>
+<27b9> <84a7>
+<27ba> <84bb>
+<27bb> <84a2>
+<27bc> <8494>
+<27bd> <84c7>
+<27be> <84cc>
+<27bf> <849b>
+<27c0> <84a9>
+<27c1> <84af>
+<27c2> <84a8>
+<27c3> <84d6>
+<27c4> <8498>
+<27c5> <84b6>
+<27c6> <84cf>
+<27c7> <84a0>
+<27c8> <84d7>
+<27c9> <84d4>
+<27ca> <84d2>
+<27cb> <84db>
+<27cc> <84b0>
+<27cd> <8491>
+<27ce> <8661>
+<27cf> <8733>
+<27d0> <8723>
+<27d1> <8728>
+<27d2> <876b>
+<27d3> <8740>
+<27d4> <872e>
+<27d5> <871e>
+<27d6> <8721>
+<27d7> <8719>
+<27d8> <871b>
+<27d9> <8743>
+<27da> <872c>
+<27db> <8741>
+<27dc> <873e>
+<27dd> <8746>
+<27de> <8720>
+<27df> <8732>
+<27e0> <872a>
+<27e1> <872d>
+<27e2> <873c>
+<27e3> <8712>
+<27e4> <873a>
+<27e5> <8731>
+<27e6> <8735>
+<27e7> <8742>
+<27ea> <8738>
+<27eb> <8724>
+<27ec> <871a>
+<27ed> <8730>
+<27ee> <8711>
+<27ef> <88f7>
+<27f0> <88e7>
+<27f3> <88fa>
+<27f4> <88fe>
+<27f5> <88ee>
+<27f6> <88fc>
+<27f7> <88f6>
+<27f8> <88fb>
+<27f9> <88f0>
+<27fa> <88ec>
+<27fb> <88eb>
+<27fc> <899d>
+<27fd> <89a1>
+<27fe> <899f>
+<27ff> <899e>
+<2800> <89e9>
+<2801> <89eb>
+<2802> <89e8>
+<2803> <8aab>
+<2804> <8a99>
+<2805> <8a8b>
+<2806> <8a92>
+<2807> <8a8f>
+<2808> <8a96>
+<2809> <8c3d>
+<280c> <8cd5>
+<280d> <8ccf>
+<280e> <8cd7>
+<280f> <8d96>
+<2810> <8e09>
+<2811> <8e02>
+<2812> <8dff>
+<2813> <8e0d>
+<2814> <8dfd>
+<2815> <8e0a>
+<2816> <8e03>
+<2817> <8e07>
+<2818> <8e06>
+<2819> <8e05>
+<281a> <8dfe>
+<281b> <8e00>
+<281c> <8e04>
+<281f> <8f0e>
+endbfchar
+
+100 beginbfchar
+<2820> <8f0d>
+<2821> <9123>
+<2822> <911c>
+<2823> <9120>
+<2824> <9122>
+<2825> <911f>
+<2826> <911d>
+<2827> <911a>
+<2828> <9124>
+<2829> <9121>
+<282a> <911b>
+<282b> <917a>
+<282c> <9172>
+<282d> <9179>
+<282e> <9173>
+<282f> <92a5>
+<2830> <92a4>
+<2831> <9276>
+<2832> <929b>
+<2833> <927a>
+<2834> <92a0>
+<2835> <9294>
+<2836> <92aa>
+<2837> <928d>
+<2838> <92a6>
+<2839> <929a>
+<283a> <92ab>
+<283b> <9279>
+<283c> <9297>
+<283d> <927f>
+<283e> <92a3>
+<283f> <92ee>
+<2840> <928e>
+<2841> <9282>
+<2842> <9295>
+<2843> <92a2>
+<2844> <927d>
+<2845> <9288>
+<2846> <92a1>
+<2847> <928a>
+<2848> <9286>
+<2849> <928c>
+<284a> <9299>
+<284b> <92a7>
+<284c> <927e>
+<284d> <9287>
+<284e> <92a9>
+<284f> <929d>
+<2850> <928b>
+<2851> <922d>
+<2852> <969e>
+<2853> <96a1>
+<2854> <96ff>
+<2855> <9758>
+<2856> <977d>
+<2857> <977a>
+<2858> <977e>
+<2859> <9783>
+<285a> <9780>
+<285b> <9782>
+<285c> <977b>
+<285d> <9784>
+<285e> <9781>
+<285f> <977f>
+<2860> <97ce>
+<2861> <97cd>
+<2862> <9816>
+<2865> <9902>
+<2866> <9900>
+<2867> <9907>
+<2868> <999d>
+<2869> <999c>
+<286a> <99c3>
+<286b> <99b9>
+<286c> <99bb>
+<286d> <99ba>
+<286e> <99c2>
+<286f> <99bd>
+<2870> <99c7>
+<2871> <9ab1>
+<2872> <9ae3>
+<2873> <9ae7>
+<2878> <9b5f>
+<287b> <9cf5>
+<287c> <9ea7>
+<287d> <50ff>
+<287e> <5103>
+<287f> <5130>
+<2880> <50f8>
+<2883> <50f6>
+<2884> <50fe>
+<2887> <50fd>
+<2888> <510a>
+<288b> <52f1>
+<288c> <52ef>
+<288d> <5648>
+<288e> <5642>
+<288f> <564c>
+<2890> <5635>
+<2891> <5641>
+endbfchar
+
+100 beginbfchar
+<2892> <564a>
+<2893> <5649>
+<2894> <5646>
+<2895> <5658>
+<2896> <565a>
+<2897> <5640>
+<2898> <5633>
+<2899> <563d>
+<289a> <562c>
+<289b> <563e>
+<289c> <5638>
+<289d> <562a>
+<289e> <563a>
+<289f> <571a>
+<28a0> <58ab>
+<28a1> <589d>
+<28a2> <58b1>
+<28a3> <58a0>
+<28a4> <58a3>
+<28a5> <58af>
+<28a6> <58ac>
+<28a7> <58a5>
+<28a8> <58a1>
+<28a9> <58ff>
+<28aa> <5aff>
+<28ab> <5af4>
+<28ac> <5afd>
+<28ad> <5af7>
+<28ae> <5af6>
+<28af> <5b03>
+<28b0> <5af8>
+<28b1> <5b02>
+<28b2> <5af9>
+<28b3> <5b01>
+<28b4> <5b07>
+<28b5> <5b05>
+<28b6> <5b0f>
+<28b7> <5c67>
+<28b8> <5d99>
+<28b9> <5d97>
+<28ba> <5d9f>
+<28bb> <5d92>
+<28bc> <5da2>
+<28bd> <5d93>
+<28be> <5d95>
+<28bf> <5da0>
+<28c0> <5d9c>
+<28c1> <5da1>
+<28c2> <5d9a>
+<28c3> <5d9e>
+<28c4> <5e69>
+<28c5> <5e5d>
+<28c6> <5e60>
+<28c7> <5e5c>
+<28c8> <7df3>
+<28c9> <5edb>
+<28ca> <5ede>
+<28cb> <5ee1>
+<28cc> <5f49>
+<28cd> <5fb2>
+<28ce> <618b>
+<28cf> <6183>
+<28d0> <6179>
+<28d1> <61b1>
+<28d2> <61b0>
+<28d3> <61a2>
+<28d4> <6189>
+<28d5> <619b>
+<28d6> <6193>
+<28d7> <61af>
+<28d8> <61ad>
+<28d9> <619f>
+<28da> <6192>
+<28db> <61aa>
+<28dc> <61a1>
+<28dd> <618d>
+<28de> <6166>
+<28df> <61b3>
+<28e0> <622d>
+<28e1> <646e>
+<28e2> <6470>
+<28e3> <6496>
+<28e4> <64a0>
+<28e5> <6485>
+<28e6> <6497>
+<28e7> <649c>
+<28e8> <648f>
+<28e9> <648b>
+<28ea> <648a>
+<28eb> <648c>
+<28ec> <64a3>
+<28ed> <649f>
+<28ee> <6468>
+<28ef> <64b1>
+<28f0> <6498>
+<28f1> <6576>
+<28f2> <657a>
+<28f3> <6579>
+<28f4> <657b>
+<28f7> <66b5>
+endbfchar
+
+100 beginbfchar
+<28f8> <66b0>
+<28f9> <66a9>
+<28fa> <66b2>
+<28fb> <66b7>
+<28fc> <66aa>
+<28fd> <66af>
+<28fe> <6a00>
+<28ff> <6a06>
+<2900> <6a17>
+<2901> <69e5>
+<2902> <69f8>
+<2903> <6a15>
+<2904> <69f1>
+<2905> <69e4>
+<2906> <6a20>
+<2907> <69ff>
+<2908> <69ec>
+<2909> <69e2>
+<290a> <6a1b>
+<290b> <6a1d>
+<290c> <69fe>
+<290d> <6a27>
+<290e> <69f2>
+<290f> <69ee>
+<2910> <6a14>
+<2911> <69f7>
+<2912> <69e7>
+<2913> <6a40>
+<2914> <6a08>
+<2915> <69e6>
+<2916> <69fb>
+<2917> <6a0d>
+<2918> <69fc>
+<2919> <69eb>
+<291a> <6a09>
+<291b> <6a04>
+<291c> <6a18>
+<291d> <6a25>
+<291e> <6a0f>
+<291f> <69f6>
+<2920> <6a26>
+<2921> <6a07>
+<2922> <69f4>
+<2923> <6a16>
+<2924> <6b51>
+<2925> <6ba5>
+<2926> <6ba3>
+<2927> <6ba2>
+<2928> <6ba6>
+<2929> <6c01>
+<292a> <6c00>
+<292b> <6bff>
+<292c> <6c02>
+<292d> <6f41>
+<292e> <6f26>
+<292f> <6f7e>
+<2930> <6f87>
+<2931> <6fc6>
+<2932> <6f92>
+<2933> <6f8d>
+<2934> <6f89>
+<2935> <6f8c>
+<2936> <6f62>
+<2937> <6f4f>
+<2938> <6f85>
+<2939> <6f5a>
+<293a> <6f96>
+<293b> <6f76>
+<293c> <6f6c>
+<293d> <6f82>
+<293e> <6f55>
+<293f> <6f72>
+<2940> <6f52>
+<2941> <6f50>
+<2942> <6f57>
+<2943> <6f94>
+<2944> <6f93>
+<2945> <6f5d>
+<2946> <6f00>
+<2947> <6f61>
+<2948> <6f6b>
+<2949> <6f7d>
+<294a> <6f67>
+<294b> <6f90>
+<294c> <6f53>
+<294d> <6f8b>
+<294e> <6f69>
+<294f> <6f7f>
+<2950> <6f95>
+<2951> <6f63>
+<2952> <6f77>
+<2953> <6f6a>
+<2954> <6f7b>
+<2955> <71b2>
+<2956> <71af>
+<2957> <719b>
+<2958> <71b0>
+<2959> <71a0>
+<295a> <719a>
+<295b> <71a9>
+endbfchar
+
+100 beginbfchar
+<295c> <71b5>
+<295d> <719d>
+<295e> <71a5>
+<295f> <719e>
+<2960> <71a4>
+<2961> <71a1>
+<2962> <71aa>
+<2963> <719c>
+<2964> <71a7>
+<2965> <71b3>
+<2966> <7298>
+<2967> <729a>
+<2968> <7358>
+<2969> <7352>
+<296d> <735d>
+<296e> <735b>
+<296f> <7361>
+<2970> <735a>
+<2971> <7359>
+<2972> <7362>
+<2973> <7487>
+<2976> <7486>
+<2977> <7481>
+<2978> <747d>
+<2979> <7485>
+<297a> <7488>
+<297b> <747c>
+<297c> <7479>
+<297d> <7508>
+<297e> <7507>
+<297f> <757e>
+<2980> <7625>
+<2981> <761e>
+<2982> <7619>
+<2983> <761d>
+<2984> <761c>
+<2985> <7623>
+<2986> <761a>
+<2987> <7628>
+<2988> <761b>
+<298c> <769b>
+<298d> <778d>
+<298e> <778f>
+<298f> <7789>
+<2990> <7788>
+<2991> <78cd>
+<2992> <78bb>
+<2993> <78cf>
+<2994> <78cc>
+<2995> <78d1>
+<2996> <78ce>
+<2997> <78d4>
+<2998> <78c8>
+<299b> <78c9>
+<299c> <799a>
+<299d> <79a1>
+<299e> <79a0>
+<299f> <799c>
+<29a0> <79a2>
+<29a1> <799b>
+<29a2> <6b76>
+<29a3> <7a39>
+<29a4> <7ab2>
+<29a5> <7ab4>
+<29a6> <7ab3>
+<29a7> <7bb7>
+<29a8> <7bcb>
+<29a9> <7bbe>
+<29aa> <7bac>
+<29ab> <7bce>
+<29ac> <7baf>
+<29ad> <7bb9>
+<29ae> <7bca>
+<29af> <7bb5>
+<29b0> <7cc5>
+<29b1> <7cc8>
+<29b2> <7ccc>
+<29b3> <7ccb>
+<29b4> <7df7>
+<29b5> <7ddb>
+<29b6> <7dea>
+<29b7> <7de7>
+<29b8> <7dd7>
+<29b9> <7de1>
+<29ba> <7e03>
+<29bb> <7dfa>
+<29bc> <7de6>
+<29bd> <7df6>
+<29be> <7df1>
+<29bf> <7df0>
+<29c0> <7dee>
+<29c1> <7ddf>
+<29c2> <7f76>
+<29c3> <7fac>
+<29c4> <7fb0>
+<29c5> <7fad>
+<29c6> <7fed>
+<29c7> <7feb>
+<29c8> <7fea>
+<29c9> <7fec>
+endbfchar
+
+100 beginbfchar
+<29ca> <7fe6>
+<29cb> <7fe8>
+<29cc> <8064>
+<29cd> <8067>
+<29ce> <81a3>
+<29cf> <819f>
+<29d0> <819e>
+<29d1> <8195>
+<29d2> <81a2>
+<29d3> <8199>
+<29d4> <8197>
+<29d5> <8216>
+<29d6> <824f>
+<29d7> <8253>
+<29d8> <8252>
+<29d9> <8250>
+<29da> <824e>
+<29db> <8251>
+<29dc> <8524>
+<29dd> <853b>
+<29de> <850f>
+<29df> <8500>
+<29e0> <8529>
+<29e1> <850e>
+<29e2> <8509>
+<29e3> <850d>
+<29e4> <851f>
+<29e5> <850a>
+<29e6> <8527>
+<29e7> <851c>
+<29e8> <84fb>
+<29e9> <852b>
+<29ea> <84fa>
+<29eb> <8508>
+<29ec> <850c>
+<29ed> <84f4>
+<29ee> <852a>
+<29ef> <84f2>
+<29f0> <8515>
+<29f1> <84f7>
+<29f2> <84eb>
+<29f3> <84f3>
+<29f4> <84fc>
+<29f5> <8512>
+<29f6> <84ea>
+<29f7> <84e9>
+<29f8> <8516>
+<29f9> <84fe>
+<29fa> <8528>
+<29fb> <851d>
+<29fc> <852e>
+<29fd> <8502>
+<29fe> <84fd>
+<29ff> <851e>
+<2a00> <84f6>
+<2a01> <8531>
+<2a02> <8526>
+<2a05> <84f0>
+<2a06> <84ef>
+<2a07> <84f9>
+<2a08> <8518>
+<2a09> <8520>
+<2a0a> <8530>
+<2a0b> <850b>
+<2a0c> <8519>
+<2a0d> <852f>
+<2a0e> <8662>
+<2a0f> <8756>
+<2a12> <8777>
+<2a13> <87e1>
+<2a14> <8773>
+<2a15> <8758>
+<2a16> <8754>
+<2a17> <875b>
+<2a18> <8752>
+<2a19> <8761>
+<2a1a> <875a>
+<2a1b> <8751>
+<2a1c> <875e>
+<2a1d> <876d>
+<2a1e> <876a>
+<2a1f> <8750>
+<2a20> <874e>
+<2a21> <875f>
+<2a22> <875d>
+<2a23> <876f>
+<2a24> <876c>
+<2a25> <877a>
+<2a26> <876e>
+<2a27> <875c>
+<2a28> <8765>
+<2a29> <874f>
+<2a2a> <877b>
+<2a2b> <8775>
+<2a2c> <8762>
+<2a2d> <8767>
+<2a2e> <8769>
+<2a2f> <885a>
+<2a30> <8905>
+<2a31> <890c>
+endbfchar
+
+100 beginbfchar
+<2a32> <8914>
+<2a33> <890b>
+<2a37> <8906>
+<2a38> <8916>
+<2a39> <8911>
+<2a3a> <890e>
+<2a3b> <8909>
+<2a3c> <89a2>
+<2a3d> <89a4>
+<2a3e> <89a3>
+<2a3f> <89ed>
+<2a40> <89f0>
+<2a41> <89ec>
+<2a42> <8acf>
+<2a43> <8ac6>
+<2a44> <8ab8>
+<2a45> <8ad3>
+<2a46> <8ad1>
+<2a49> <8abb>
+<2a4a> <8ad7>
+<2a4b> <8abe>
+<2a4c> <8ac0>
+<2a4d> <8ac5>
+<2a4e> <8ad8>
+<2a4f> <8ac3>
+<2a50> <8aba>
+<2a51> <8abd>
+<2a52> <8ad9>
+<2a53> <8c3e>
+<2a54> <8c4d>
+<2a55> <8c8f>
+<2a56> <8ce5>
+<2a57> <8cdf>
+<2a58> <8cd9>
+<2a59> <8ce8>
+<2a5a> <8cda>
+<2a5b> <8cdd>
+<2a5c> <8ce7>
+<2a5d> <8da0>
+<2a5e> <8d9c>
+<2a5f> <8da1>
+<2a60> <8d9b>
+<2a61> <8e20>
+<2a62> <8e23>
+<2a63> <8e25>
+<2a64> <8e24>
+<2a65> <8e2e>
+<2a66> <8e15>
+<2a67> <8e1b>
+<2a68> <8e16>
+<2a69> <8e11>
+<2a6a> <8e19>
+<2a6d> <8e14>
+<2a6e> <8e12>
+<2a6f> <8e18>
+<2a70> <8e13>
+<2a71> <8e1c>
+<2a72> <8e17>
+<2a73> <8e1a>
+<2a74> <8f2c>
+<2a75> <8f24>
+<2a76> <8f18>
+<2a77> <8f1a>
+<2a78> <8f20>
+<2a79> <8f23>
+<2a7c> <9073>
+<2a7d> <9070>
+<2a7e> <906f>
+<2a7f> <9067>
+<2a80> <906b>
+<2a81> <912f>
+<2a82> <912b>
+<2a85> <9132>
+<2a86> <9126>
+<2a87> <912e>
+<2a8a> <918a>
+<2a8d> <9184>
+<2a8e> <9180>
+<2a8f> <92d0>
+<2a92> <92c0>
+<2a93> <92d9>
+<2a94> <92b6>
+<2a95> <92cf>
+<2a96> <92f1>
+<2a97> <92df>
+<2a98> <92d8>
+<2a99> <92e9>
+<2a9a> <92d7>
+<2a9b> <92dd>
+<2a9c> <92cc>
+<2a9d> <92ef>
+<2a9e> <92c2>
+<2a9f> <92e8>
+<2aa0> <92ca>
+<2aa1> <92c8>
+<2aa2> <92ce>
+<2aa3> <92e6>
+<2aa4> <92cd>
+<2aa5> <92d5>
+<2aa6> <92c9>
+endbfchar
+
+100 beginbfchar
+<2aa7> <92e0>
+<2aa8> <92de>
+<2aa9> <92e7>
+<2aaa> <92d1>
+<2aab> <92d3>
+<2aac> <92b5>
+<2aad> <92e1>
+<2aae> <9325>
+<2aaf> <92c6>
+<2ab0> <92b4>
+<2ab1> <957c>
+<2ab2> <95ac>
+<2ab3> <95ab>
+<2ab4> <95ae>
+<2ab5> <95b0>
+<2ab6> <96a4>
+<2ab7> <96a2>
+<2ab8> <96d3>
+<2ab9> <9705>
+<2aba> <9708>
+<2abb> <9702>
+<2abc> <975a>
+<2abd> <978a>
+<2abe> <978e>
+<2abf> <9788>
+<2ac0> <97d0>
+<2ac1> <97cf>
+<2ac2> <981e>
+<2ac3> <981d>
+<2ac4> <9826>
+<2ac5> <9829>
+<2ac6> <9828>
+<2ac7> <9820>
+<2ac8> <981b>
+<2ac9> <9827>
+<2aca> <98b2>
+<2acb> <9908>
+<2acc> <98fa>
+<2acd> <9911>
+<2ace> <9914>
+<2ad1> <9915>
+<2ad2> <99dc>
+<2ad3> <99cd>
+<2ad4> <99cf>
+<2ad7> <99ce>
+<2ad8> <99c9>
+<2ad9> <99d6>
+<2ada> <99d8>
+<2adb> <99cb>
+<2adc> <99d7>
+<2add> <99cc>
+<2ade> <9ab3>
+<2adf> <9aec>
+<2ae0> <9aeb>
+<2ae1> <9af3>
+<2ae2> <9af2>
+<2ae3> <9af1>
+<2ae4> <9b46>
+<2ae5> <9b43>
+<2ae6> <9b67>
+<2ae7> <9b74>
+<2ae8> <9b71>
+<2ae9> <9b66>
+<2aea> <9b76>
+<2aeb> <9b75>
+<2aec> <9b70>
+<2aed> <9b68>
+<2aee> <9b64>
+<2aef> <9b6c>
+<2af0> <9cfc>
+<2af1> <9cfa>
+<2af2> <9cfd>
+<2af3> <9cff>
+<2af4> <9cf7>
+<2af5> <9d07>
+<2af6> <9d00>
+<2af7> <9cf9>
+<2af8> <9cfb>
+<2af9> <9d08>
+<2afa> <9d05>
+<2afb> <9d04>
+<2afc> <9e83>
+<2afd> <9ed3>
+<2b00> <511c>
+<2b01> <5113>
+<2b02> <5117>
+<2b03> <511a>
+<2b04> <5111>
+<2b05> <51de>
+<2b06> <5334>
+<2b07> <53e1>
+<2b08> <5670>
+<2b09> <5660>
+<2b0a> <566e>
+<2b0b> <5673>
+<2b0c> <5666>
+<2b0d> <5663>
+<2b0e> <566d>
+<2b0f> <5672>
+<2b10> <565e>
+endbfchar
+
+100 beginbfchar
+<2b11> <5677>
+<2b12> <571c>
+<2b13> <571b>
+<2b14> <58c8>
+<2b15> <58bd>
+<2b16> <58c9>
+<2b17> <58bf>
+<2b18> <58ba>
+<2b19> <58c2>
+<2b1a> <58bc>
+<2b1b> <58c6>
+<2b1c> <5b17>
+<2b1d> <5b19>
+<2b1e> <5b1b>
+<2b1f> <5b21>
+<2b20> <5b14>
+<2b21> <5b13>
+<2b22> <5b10>
+<2b23> <5b16>
+<2b24> <5b28>
+<2b25> <5b1a>
+<2b26> <5b20>
+<2b27> <5b1e>
+<2b28> <5bef>
+<2b29> <5dac>
+<2b2a> <5db1>
+<2b2b> <5da9>
+<2b2c> <5da7>
+<2b2d> <5db5>
+<2b2e> <5db0>
+<2b2f> <5dae>
+<2b30> <5daa>
+<2b31> <5da8>
+<2b32> <5db2>
+<2b33> <5dad>
+<2b34> <5daf>
+<2b35> <5db4>
+<2b38> <5e66>
+<2b39> <5e6f>
+<2b3a> <5ee9>
+<2b3b> <5ee7>
+<2b3c> <5ee6>
+<2b3d> <5ee8>
+<2b3e> <5ee5>
+<2b3f> <5f4b>
+<2b40> <5fbc>
+<2b41> <5fbb>
+<2b42> <619d>
+<2b43> <61a8>
+<2b44> <6196>
+<2b45> <61c5>
+<2b46> <61b4>
+<2b47> <61c6>
+<2b48> <61c1>
+<2b49> <61cc>
+<2b4a> <61ba>
+<2b4b> <61bf>
+<2b4c> <61b8>
+<2b4d> <618c>
+<2b4e> <64d7>
+<2b4f> <64d6>
+<2b50> <64d0>
+<2b51> <64cf>
+<2b52> <64c9>
+<2b53> <64bd>
+<2b54> <6489>
+<2b55> <64c3>
+<2b56> <64db>
+<2b57> <64f3>
+<2b58> <64d9>
+<2b59> <6533>
+<2b5a> <657f>
+<2b5b> <657c>
+<2b5c> <65a2>
+<2b5d> <66c8>
+<2b5e> <66be>
+<2b5f> <66c0>
+<2b62> <66cf>
+<2b63> <66bd>
+<2b64> <66bb>
+<2b65> <66ba>
+<2b66> <66cc>
+<2b67> <6723>
+<2b68> <6a34>
+<2b69> <6a66>
+<2b6a> <6a49>
+<2b6b> <6a67>
+<2b6c> <6a32>
+<2b6d> <6a68>
+<2b6e> <6a3e>
+<2b6f> <6a5d>
+<2b70> <6a6d>
+<2b71> <6a76>
+<2b72> <6a5b>
+<2b73> <6a51>
+<2b74> <6a28>
+<2b75> <6a5a>
+<2b76> <6a3b>
+<2b77> <6a3f>
+<2b78> <6a41>
+endbfchar
+
+100 beginbfchar
+<2b79> <6a6a>
+<2b7a> <6a64>
+<2b7b> <6a50>
+<2b7c> <6a4f>
+<2b7d> <6a54>
+<2b7e> <6a6f>
+<2b7f> <6a69>
+<2b80> <6a60>
+<2b81> <6a3c>
+<2b82> <6a5e>
+<2b83> <6a56>
+<2b84> <6a55>
+<2b87> <6a46>
+<2b88> <6b55>
+<2b89> <6b54>
+<2b8a> <6b56>
+<2b8b> <6ba7>
+<2b8e> <6bc8>
+<2b8f> <6bc7>
+<2b90> <6c04>
+<2b91> <6c03>
+<2b92> <6c06>
+<2b93> <6fad>
+<2b94> <6fcb>
+<2b95> <6fa3>
+<2b96> <6fc7>
+<2b97> <6fbc>
+<2b98> <6fce>
+<2b99> <6fc8>
+<2b9a> <6f5e>
+<2b9b> <6fc4>
+<2b9c> <6fbd>
+<2b9d> <6f9e>
+<2b9e> <6fca>
+<2b9f> <6fa8>
+<2ba0> <7004>
+<2ba1> <6fa5>
+<2ba2> <6fae>
+<2ba3> <6fba>
+<2ba4> <6fac>
+<2ba5> <6faa>
+<2ba6> <6fcf>
+<2ba7> <6fbf>
+<2ba8> <6fb8>
+<2ba9> <6fa2>
+<2baa> <6fc9>
+<2bab> <6fab>
+<2bac> <6fcd>
+<2bad> <6faf>
+<2bae> <6fb2>
+<2baf> <6fb0>
+<2bb0> <71c5>
+<2bb1> <71c2>
+<2bb2> <71bf>
+<2bb3> <71b8>
+<2bb4> <71d6>
+<2bb7> <71cb>
+<2bb8> <71d4>
+<2bb9> <71ca>
+<2bba> <71c7>
+<2bbb> <71cf>
+<2bbc> <71bd>
+<2bbd> <71d8>
+<2bbe> <71bc>
+<2bbf> <71c6>
+<2bc4> <7369>
+<2bc7> <736c>
+<2bc8> <7365>
+<2bc9> <736b>
+<2bca> <736a>
+<2bcb> <747f>
+<2bcc> <749a>
+<2bcd> <74a0>
+<2bce> <7494>
+<2bcf> <7492>
+<2bd0> <7495>
+<2bd1> <74a1>
+<2bd2> <750b>
+<2bd3> <7580>
+<2bd4> <762f>
+<2bd5> <762d>
+<2bd6> <7631>
+<2bd7> <763d>
+<2bd8> <7633>
+<2bd9> <763c>
+<2bda> <7635>
+<2bdb> <7632>
+<2bdc> <7630>
+<2bdd> <76bb>
+<2bde> <76e6>
+<2bdf> <779a>
+<2be0> <779d>
+<2be1> <77a1>
+<2be2> <779c>
+<2be3> <779b>
+<2be6> <7795>
+<2be7> <7799>
+<2be8> <7797>
+<2be9> <78dd>
+<2bea> <78e9>
+endbfchar
+
+100 beginbfchar
+<2beb> <78e5>
+<2bec> <78ea>
+<2bed> <78de>
+<2bee> <78e3>
+<2bef> <78db>
+<2bf2> <78ed>
+<2bf5> <79a4>
+<2bf6> <7a44>
+<2bf7> <7a48>
+<2bf8> <7a47>
+<2bf9> <7ab6>
+<2bfa> <7ab8>
+<2bfb> <7ab5>
+<2bfc> <7ab1>
+<2bfd> <7ab7>
+<2bfe> <7bde>
+<2bff> <7be3>
+<2c00> <7be7>
+<2c01> <7bdd>
+<2c02> <7bd5>
+<2c03> <7be5>
+<2c04> <7bda>
+<2c05> <7be8>
+<2c06> <7bf9>
+<2c07> <7bd4>
+<2c08> <7bea>
+<2c09> <7be2>
+<2c0a> <7bdc>
+<2c0b> <7beb>
+<2c0c> <7bd8>
+<2c0d> <7bdf>
+<2c0e> <7cd2>
+<2c0f> <7cd4>
+<2c10> <7cd7>
+<2c13> <7e12>
+<2c14> <7e21>
+<2c15> <7e17>
+<2c16> <7e0c>
+<2c19> <7e13>
+<2c1a> <7e0e>
+<2c1b> <7e1c>
+<2c1c> <7e15>
+<2c1d> <7e1a>
+<2c1e> <7e22>
+<2c1f> <7e0b>
+<2c20> <7e0f>
+<2c21> <7e16>
+<2c22> <7e0d>
+<2c23> <7e14>
+<2c24> <7e25>
+<2c25> <7e24>
+<2c26> <7f43>
+<2c29> <7f7a>
+<2c2a> <7fb1>
+<2c2b> <7fef>
+<2c2c> <802a>
+<2c2d> <8029>
+<2c2e> <806c>
+<2c2f> <81b1>
+<2c30> <81a6>
+<2c31> <81ae>
+<2c32> <81b9>
+<2c33> <81b5>
+<2c34> <81ab>
+<2c35> <81b0>
+<2c36> <81ac>
+<2c37> <81b4>
+<2c38> <81b2>
+<2c39> <81b7>
+<2c3a> <81a7>
+<2c3b> <81f2>
+<2c3f> <8556>
+<2c40> <8545>
+<2c41> <856b>
+<2c42> <854d>
+<2c43> <8553>
+<2c44> <8561>
+<2c45> <8558>
+<2c46> <8540>
+<2c47> <8546>
+<2c48> <8564>
+<2c49> <8541>
+<2c4a> <8562>
+<2c4b> <8544>
+<2c4c> <8551>
+<2c4d> <8547>
+<2c4e> <8563>
+<2c4f> <853e>
+<2c50> <855b>
+<2c51> <8571>
+<2c52> <854e>
+<2c53> <856e>
+<2c54> <8575>
+<2c55> <8555>
+<2c56> <8567>
+<2c57> <8560>
+<2c58> <858c>
+<2c59> <8566>
+<2c5a> <855d>
+<2c5b> <8554>
+endbfchar
+
+100 beginbfchar
+<2c5c> <8565>
+<2c5d> <856c>
+<2c5e> <8663>
+<2c5f> <8665>
+<2c60> <8664>
+<2c61> <87a4>
+<2c62> <879b>
+<2c63> <878f>
+<2c64> <8797>
+<2c65> <8793>
+<2c66> <8792>
+<2c67> <8788>
+<2c68> <8781>
+<2c69> <8796>
+<2c6a> <8798>
+<2c6b> <8779>
+<2c6c> <8787>
+<2c6d> <87a3>
+<2c6e> <8785>
+<2c71> <879d>
+<2c72> <8784>
+<2c73> <8794>
+<2c74> <879c>
+<2c75> <879a>
+<2c76> <8789>
+<2c77> <891e>
+<2c78> <8926>
+<2c79> <8930>
+<2c7c> <8927>
+<2c7d> <8931>
+<2c7e> <8922>
+<2c7f> <8929>
+<2c80> <8923>
+<2c81> <892f>
+<2c82> <892c>
+<2c83> <891f>
+<2c84> <89f1>
+<2c85> <8ae0>
+<2c86> <8ae2>
+<2c87> <8af2>
+<2c8a> <8add>
+<2c8b> <8b14>
+<2c8c> <8ae4>
+<2c8d> <8adf>
+<2c8e> <8af0>
+<2c8f> <8ac8>
+<2c90> <8ade>
+<2c91> <8ae1>
+<2c92> <8ae8>
+<2c93> <8aff>
+<2c94> <8aef>
+<2c95> <8afb>
+<2c98> <8c90>
+<2c99> <8cf5>
+<2c9a> <8cee>
+<2c9b> <8cf1>
+<2c9c> <8cf0>
+<2c9d> <8cf3>
+<2c9e> <8d6c>
+<2c9f> <8d6e>
+<2ca0> <8da5>
+<2ca1> <8da7>
+<2ca2> <8e33>
+<2ca3> <8e3e>
+<2ca4> <8e38>
+<2ca5> <8e40>
+<2ca6> <8e45>
+<2ca7> <8e36>
+<2caa> <8e41>
+<2cab> <8e30>
+<2cac> <8e3f>
+<2cad> <8ebd>
+<2cae> <8f36>
+<2caf> <8f2e>
+<2cb0> <8f35>
+<2cb1> <8f32>
+<2cb2> <8f39>
+<2cb3> <8f37>
+<2cb4> <8f34>
+<2cb5> <9076>
+<2cb6> <9079>
+<2cb7> <907b>
+<2cb8> <9086>
+<2cb9> <90fa>
+<2cba> <9133>
+<2cbd> <9193>
+<2cc0> <918d>
+<2cc1> <918f>
+<2cc2> <9327>
+<2cc3> <931e>
+<2cc4> <9308>
+<2cc5> <931f>
+<2cc6> <9306>
+<2cc7> <930f>
+<2cc8> <937a>
+<2cc9> <9338>
+<2cca> <933c>
+<2ccb> <931b>
+<2ccc> <9323>
+<2ccd> <9312>
+endbfchar
+
+100 beginbfchar
+<2cce> <9301>
+<2ccf> <9346>
+<2cd0> <932d>
+<2cd1> <930e>
+<2cd2> <930d>
+<2cd3> <92cb>
+<2cd4> <931d>
+<2cd5> <92fa>
+<2cd6> <9313>
+<2cd7> <92f9>
+<2cd8> <92f7>
+<2cd9> <9334>
+<2cda> <9302>
+<2cdb> <9324>
+<2cdc> <92ff>
+<2cdd> <9329>
+<2cde> <9339>
+<2cdf> <9335>
+<2ce0> <932a>
+<2ce1> <9314>
+<2ce2> <930c>
+<2ce3> <930b>
+<2ce4> <92fe>
+<2ce5> <9309>
+<2ce6> <9300>
+<2ce7> <92fb>
+<2ce8> <9316>
+<2ce9> <95bc>
+<2cea> <95cd>
+<2ceb> <95be>
+<2cee> <95b6>
+<2cef> <95bf>
+<2cf0> <95b5>
+<2cf1> <95bd>
+<2cf2> <96a9>
+<2cf3> <96d4>
+<2cf4> <970b>
+<2cf5> <9712>
+<2cf6> <9710>
+<2cf7> <9799>
+<2cf8> <9797>
+<2cf9> <9794>
+<2cfa> <97f0>
+<2cfb> <97f8>
+<2cfc> <9835>
+<2cfd> <982f>
+<2cfe> <9832>
+<2cff> <9924>
+<2d00> <991f>
+<2d01> <9927>
+<2d02> <9929>
+<2d03> <999e>
+<2d04> <99ee>
+<2d05> <99ec>
+<2d06> <99e5>
+<2d07> <99e4>
+<2d08> <99f0>
+<2d09> <99e3>
+<2d0a> <99ea>
+<2d0b> <99e9>
+<2d0c> <99e7>
+<2d0d> <9ab9>
+<2d0e> <9abf>
+<2d0f> <9ab4>
+<2d10> <9abb>
+<2d11> <9af6>
+<2d12> <9afa>
+<2d13> <9af9>
+<2d14> <9af7>
+<2d15> <9b33>
+<2d16> <9b80>
+<2d17> <9b85>
+<2d18> <9b87>
+<2d19> <9b7c>
+<2d1a> <9b7e>
+<2d1b> <9b7b>
+<2d1c> <9b82>
+<2d1d> <9b93>
+<2d1e> <9b92>
+<2d1f> <9b90>
+<2d20> <9b7a>
+<2d21> <9b95>
+<2d22> <9b7d>
+<2d23> <9b88>
+<2d24> <9d25>
+<2d25> <9d17>
+<2d26> <9d20>
+<2d27> <9d1e>
+<2d28> <9d14>
+<2d29> <9d29>
+<2d2a> <9d1d>
+<2d2b> <9d18>
+<2d2c> <9d22>
+<2d2d> <9d10>
+<2d2e> <9d19>
+<2d2f> <9d1f>
+<2d30> <9e88>
+<2d33> <9eae>
+<2d34> <9ead>
+<2d37> <9efa>
+endbfchar
+
+100 beginbfchar
+<2d38> <9f12>
+<2d39> <9f3d>
+<2d3a> <5126>
+<2d3b> <5125>
+<2d3c> <5122>
+<2d3d> <5124>
+<2d3e> <5120>
+<2d3f> <5129>
+<2d40> <52f4>
+<2d41> <5693>
+<2d44> <5686>
+<2d45> <5684>
+<2d46> <5683>
+<2d47> <567e>
+<2d48> <5682>
+<2d49> <567f>
+<2d4a> <5681>
+<2d4b> <58d6>
+<2d4c> <58d4>
+<2d4d> <58cf>
+<2d4e> <58d2>
+<2d4f> <5b2d>
+<2d50> <5b25>
+<2d51> <5b32>
+<2d52> <5b23>
+<2d53> <5b2c>
+<2d54> <5b27>
+<2d55> <5b26>
+<2d56> <5b2f>
+<2d57> <5b2e>
+<2d58> <5b7b>
+<2d5b> <5db7>
+<2d5c> <5e6c>
+<2d5d> <5e6a>
+<2d5e> <5fbe>
+<2d5f> <61c3>
+<2d60> <61b5>
+<2d61> <61bc>
+<2d62> <61e7>
+<2d63> <61e0>
+<2d64> <61e5>
+<2d65> <61e4>
+<2d66> <61e8>
+<2d67> <61de>
+<2d68> <64ef>
+<2d69> <64e9>
+<2d6a> <64e3>
+<2d6b> <64eb>
+<2d6c> <64e4>
+<2d6d> <64e8>
+<2d6e> <6581>
+<2d6f> <6580>
+<2d70> <65b6>
+<2d71> <65da>
+<2d72> <66d2>
+<2d73> <6a8d>
+<2d74> <6a96>
+<2d75> <6a81>
+<2d76> <6aa5>
+<2d77> <6a89>
+<2d78> <6a9f>
+<2d79> <6a9b>
+<2d7a> <6aa1>
+<2d7b> <6a9e>
+<2d7c> <6a87>
+<2d7d> <6a93>
+<2d7e> <6a8e>
+<2d7f> <6a95>
+<2d80> <6a83>
+<2d81> <6aa8>
+<2d82> <6aa4>
+<2d83> <6a91>
+<2d84> <6a7f>
+<2d85> <6aa6>
+<2d86> <6a9a>
+<2d87> <6a85>
+<2d88> <6a8c>
+<2d89> <6a92>
+<2d8a> <6b5b>
+<2d8b> <6bad>
+<2d8c> <6c09>
+<2d8d> <6fcc>
+<2d8e> <6fa9>
+<2d8f> <6ff4>
+<2d90> <6fd4>
+<2d91> <6fe3>
+<2d92> <6fdc>
+<2d93> <6fed>
+<2d94> <6fe7>
+<2d95> <6fe6>
+<2d96> <6fde>
+<2d97> <6ff2>
+<2d98> <6fdd>
+<2d99> <6fe2>
+<2d9a> <6fe8>
+<2d9b> <71e1>
+<2d9c> <71f1>
+<2d9d> <71e8>
+<2d9e> <71f2>
+<2d9f> <71e4>
+endbfchar
+
+100 beginbfchar
+<2da0> <71f0>
+<2da1> <71e2>
+<2da2> <7373>
+<2da5> <7497>
+<2da6> <74b2>
+<2da7> <74ab>
+<2da8> <7490>
+<2da9> <74aa>
+<2daa> <74ad>
+<2dab> <74b1>
+<2dac> <74a5>
+<2dad> <74af>
+<2db1> <750f>
+<2db2> <7584>
+<2db3> <7643>
+<2db6> <7647>
+<2db7> <76a4>
+<2db8> <76e9>
+<2db9> <77b5>
+<2dba> <77ab>
+<2dbb> <77b2>
+<2dbc> <77b7>
+<2dbd> <77b6>
+<2dbe> <77b4>
+<2dbf> <77b1>
+<2dc0> <77a8>
+<2dc1> <77f0>
+<2dc2> <78f3>
+<2dc3> <78fd>
+<2dc4> <7902>
+<2dc7> <78ff>
+<2dc8> <78f2>
+<2dc9> <7905>
+<2dca> <78f9>
+<2dcb> <78fe>
+<2dcc> <7904>
+<2dcd> <79ab>
+<2dce> <79a8>
+<2dcf> <7a5c>
+<2dd0> <7a5b>
+<2dd1> <7a56>
+<2dd2> <7a58>
+<2dd3> <7a54>
+<2dd4> <7a5a>
+<2dd5> <7abe>
+<2dd8> <7c05>
+<2dd9> <7c0f>
+<2dda> <7bf2>
+<2ddb> <7c00>
+<2ddc> <7bff>
+<2ddd> <7bfb>
+<2dde> <7c0e>
+<2ddf> <7bf4>
+<2de0> <7c0b>
+<2de1> <7bf3>
+<2de2> <7c02>
+<2de3> <7c09>
+<2de4> <7c03>
+<2de5> <7c01>
+<2de6> <7bf8>
+<2de7> <7bfd>
+<2de8> <7c06>
+<2deb> <7c10>
+<2dec> <7c0a>
+<2ded> <7ce8>
+<2dee> <7e2d>
+<2def> <7e3c>
+<2df0> <7e42>
+<2df1> <7e33>
+<2df2> <9848>
+<2df3> <7e38>
+<2df4> <7e2a>
+<2df5> <7e49>
+<2df6> <7e40>
+<2df7> <7e47>
+<2df8> <7e29>
+<2df9> <7e4c>
+<2dfa> <7e30>
+<2dfb> <7e3b>
+<2dfc> <7e36>
+<2dfd> <7e44>
+<2dfe> <7e3a>
+<2dff> <7f45>
+<2e00> <7f7f>
+<2e01> <7f7e>
+<2e02> <7f7d>
+<2e03> <7ff4>
+<2e04> <7ff2>
+<2e05> <802c>
+<2e06> <81bb>
+<2e07> <81c4>
+<2e08> <81cc>
+<2e09> <81ca>
+<2e0a> <81c5>
+<2e0b> <81c7>
+<2e0c> <81bc>
+<2e0d> <81e9>
+<2e0e> <825b>
+<2e0f> <825a>
+<2e10> <825c>
+endbfchar
+
+100 beginbfchar
+<2e11> <8583>
+<2e12> <8580>
+<2e13> <858f>
+<2e14> <85a7>
+<2e15> <8595>
+<2e16> <85a0>
+<2e17> <858b>
+<2e18> <85a3>
+<2e19> <857b>
+<2e1a> <85a4>
+<2e1b> <859a>
+<2e1c> <859e>
+<2e1d> <8577>
+<2e1e> <857c>
+<2e1f> <8589>
+<2e20> <85a1>
+<2e21> <857a>
+<2e22> <8578>
+<2e23> <8557>
+<2e24> <858e>
+<2e25> <8596>
+<2e26> <8586>
+<2e27> <858d>
+<2e28> <8599>
+<2e29> <859d>
+<2e2a> <8581>
+<2e2b> <85a2>
+<2e2c> <8582>
+<2e2d> <8588>
+<2e2e> <8585>
+<2e2f> <8579>
+<2e30> <8576>
+<2e31> <8598>
+<2e32> <8590>
+<2e33> <859f>
+<2e34> <8668>
+<2e35> <87be>
+<2e36> <87aa>
+<2e37> <87ad>
+<2e38> <87c5>
+<2e39> <87b0>
+<2e3a> <87ac>
+<2e3b> <87b9>
+<2e3c> <87b5>
+<2e3d> <87bc>
+<2e3e> <87ae>
+<2e3f> <87c9>
+<2e40> <87c3>
+<2e41> <87c2>
+<2e42> <87cc>
+<2e43> <87b7>
+<2e44> <87af>
+<2e45> <87c4>
+<2e46> <87ca>
+<2e47> <87b4>
+<2e48> <87b6>
+<2e49> <87bf>
+<2e4a> <87b8>
+<2e4b> <87bd>
+<2e4c> <87de>
+<2e4d> <87b2>
+<2e4e> <8935>
+<2e4f> <8933>
+<2e50> <893c>
+<2e51> <893e>
+<2e52> <8941>
+<2e53> <8952>
+<2e54> <8937>
+<2e55> <8942>
+<2e56> <89ad>
+<2e57> <89af>
+<2e58> <89ae>
+<2e5b> <8b1e>
+<2e5c> <8b18>
+<2e5d> <8b16>
+<2e5e> <8b11>
+<2e5f> <8b05>
+<2e60> <8b0b>
+<2e61> <8b22>
+<2e62> <8b0f>
+<2e63> <8b12>
+<2e64> <8b15>
+<2e65> <8b07>
+<2e66> <8b0d>
+<2e67> <8b08>
+<2e68> <8b06>
+<2e69> <8b1c>
+<2e6a> <8b13>
+<2e6b> <8b1a>
+<2e6c> <8c4f>
+<2e6d> <8c70>
+<2e6e> <8c72>
+<2e6f> <8c71>
+<2e70> <8c6f>
+<2e71> <8c95>
+<2e72> <8c94>
+<2e73> <8cf9>
+<2e74> <8d6f>
+<2e75> <8e4e>
+<2e76> <8e4d>
+endbfchar
+
+100 beginbfchar
+<2e77> <8e53>
+<2e78> <8e50>
+<2e79> <8e4c>
+<2e7a> <8e47>
+<2e7b> <8f43>
+<2e7c> <8f40>
+<2e7d> <9085>
+<2e7e> <907e>
+<2e7f> <9138>
+<2e80> <919a>
+<2e81> <91a2>
+<2e82> <919b>
+<2e83> <9199>
+<2e84> <919f>
+<2e85> <91a1>
+<2e86> <919d>
+<2e87> <91a0>
+<2e88> <93a1>
+<2e89> <9383>
+<2e8a> <93af>
+<2e8b> <9364>
+<2e8c> <9356>
+<2e8d> <9347>
+<2e8e> <937c>
+<2e8f> <9358>
+<2e90> <935c>
+<2e91> <9376>
+<2e92> <9349>
+<2e95> <9360>
+<2e96> <936d>
+<2e97> <938f>
+<2e98> <934c>
+<2e99> <936a>
+<2e9a> <9379>
+<2e9b> <9357>
+<2e9c> <9355>
+<2e9d> <9352>
+<2e9e> <934f>
+<2e9f> <9371>
+<2ea0> <9377>
+<2ea1> <937b>
+<2ea2> <9361>
+<2ea3> <935e>
+<2ea4> <9363>
+<2ea5> <9367>
+<2ea6> <934e>
+<2ea7> <9359>
+<2ea8> <95c7>
+<2ea9> <95c0>
+<2eaa> <95c9>
+<2eab> <95c3>
+<2eac> <95c5>
+<2ead> <95b7>
+<2eae> <96ae>
+<2eaf> <96b0>
+<2eb0> <96ac>
+<2eb1> <9720>
+<2eb2> <971f>
+<2eb3> <9718>
+<2eb4> <971d>
+<2eb5> <9719>
+<2eb6> <979a>
+<2eb7> <97a1>
+<2eb8> <979c>
+<2eb9> <979e>
+<2eba> <979d>
+<2ebb> <97d5>
+<2ebc> <97d4>
+<2ebd> <97f1>
+<2ebe> <9841>
+<2ebf> <9844>
+<2ec0> <984a>
+<2ec1> <9849>
+<2ec2> <9845>
+<2ec3> <9843>
+<2ec4> <9925>
+<2ec7> <992a>
+<2ec8> <9933>
+<2ec9> <9932>
+<2eca> <992f>
+<2ecb> <992d>
+<2ecc> <9931>
+<2ecd> <9930>
+<2ece> <9998>
+<2ecf> <99a3>
+<2ed0> <99a1>
+<2ed1> <9a02>
+<2ed2> <99fa>
+<2ed3> <99f4>
+<2ed4> <99f7>
+<2ed5> <99f9>
+<2ed6> <99f8>
+<2ed7> <99f6>
+<2ed8> <99fb>
+<2edb> <99fc>
+<2edc> <9a03>
+<2edd> <9abe>
+<2ede> <9afe>
+<2edf> <9afd>
+<2ee0> <9b01>
+endbfchar
+
+100 beginbfchar
+<2ee1> <9afc>
+<2ee2> <9b48>
+<2ee3> <9b9a>
+<2ee4> <9ba8>
+<2ee5> <9b9e>
+<2ee6> <9b9b>
+<2ee7> <9ba6>
+<2ee8> <9ba1>
+<2ee9> <9ba5>
+<2eea> <9ba4>
+<2eeb> <9b86>
+<2eec> <9ba2>
+<2eed> <9ba0>
+<2eee> <9baf>
+<2eef> <9d33>
+<2ef0> <9d41>
+<2ef1> <9d67>
+<2ef2> <9d36>
+<2ef5> <9d31>
+<2ef6> <9d38>
+<2ef7> <9d30>
+<2ef8> <9d45>
+<2efb> <9d3e>
+<2efc> <9d37>
+<2efd> <9d40>
+<2efe> <9d3d>
+<2eff> <7ff5>
+<2f00> <9d2d>
+<2f01> <9e8a>
+<2f02> <9e89>
+<2f03> <9e8d>
+<2f04> <9eb0>
+<2f05> <9ec8>
+<2f06> <9eda>
+<2f07> <9efb>
+<2f08> <9eff>
+<2f09> <9f24>
+<2f0a> <9f23>
+<2f0b> <9f22>
+<2f0c> <9f54>
+<2f0d> <9fa0>
+<2f0e> <5131>
+<2f11> <5698>
+<2f12> <569c>
+<2f13> <5697>
+<2f14> <569a>
+<2f15> <569d>
+<2f16> <5699>
+<2f17> <5970>
+<2f18> <5b3c>
+<2f1b> <5dc0>
+<2f1e> <61d8>
+<2f1f> <61df>
+<2f22> <61f1>
+<2f23> <61ea>
+<2f24> <61f0>
+<2f25> <61eb>
+<2f26> <61d6>
+<2f27> <61e9>
+<2f28> <64ff>
+<2f29> <6504>
+<2f2a> <64fd>
+<2f2b> <64f8>
+<2f2c> <6501>
+<2f2d> <6503>
+<2f2e> <64fc>
+<2f2f> <6594>
+<2f30> <65db>
+<2f33> <66d8>
+<2f34> <6ac5>
+<2f35> <6ab9>
+<2f36> <6abd>
+<2f37> <6ae1>
+<2f38> <6ac6>
+<2f39> <6aba>
+<2f3c> <6ac7>
+<2f3d> <6ab4>
+<2f3e> <6aad>
+<2f3f> <6b5e>
+<2f40> <6bc9>
+<2f41> <6c0b>
+<2f42> <7007>
+<2f45> <7001>
+<2f46> <7005>
+<2f47> <7014>
+<2f48> <700e>
+<2f4b> <6ffb>
+<2f4c> <7026>
+<2f4d> <6ffc>
+<2f4e> <6ff7>
+<2f4f> <700a>
+<2f50> <7201>
+<2f51> <71ff>
+<2f52> <71f9>
+<2f53> <7203>
+<2f54> <71fd>
+<2f55> <7376>
+<2f56> <74b8>
+<2f57> <74c0>
+<2f58> <74b5>
+endbfchar
+
+100 beginbfchar
+<2f59> <74c1>
+<2f5a> <74be>
+<2f5b> <74b6>
+<2f5c> <74bb>
+<2f5d> <74c2>
+<2f5e> <7514>
+<2f5f> <7513>
+<2f60> <765c>
+<2f61> <7664>
+<2f62> <7659>
+<2f63> <7650>
+<2f64> <7653>
+<2f65> <7657>
+<2f66> <765a>
+<2f67> <76a6>
+<2f68> <76bd>
+<2f69> <76ec>
+<2f6a> <77c2>
+<2f6b> <77ba>
+<2f6c> <790c>
+<2f6f> <7909>
+<2f70> <7910>
+<2f71> <7912>
+<2f72> <7911>
+<2f73> <79ad>
+<2f74> <79ac>
+<2f75> <7a5f>
+<2f76> <7c1c>
+<2f77> <7c29>
+<2f78> <7c19>
+<2f79> <7c20>
+<2f7a> <7c1f>
+<2f7b> <7c2d>
+<2f7c> <7c1d>
+<2f7d> <7c26>
+<2f7e> <7c28>
+<2f7f> <7c22>
+<2f80> <7c25>
+<2f81> <7c30>
+<2f82> <7e5c>
+<2f83> <7e50>
+<2f84> <7e56>
+<2f85> <7e63>
+<2f86> <7e58>
+<2f87> <7e62>
+<2f88> <7e5f>
+<2f89> <7e51>
+<2f8a> <7e60>
+<2f8b> <7e57>
+<2f8c> <7e53>
+<2f8d> <7fb5>
+<2f8e> <7fb3>
+<2f91> <8075>
+<2f94> <81d0>
+<2f95> <825f>
+<2f96> <825e>
+<2f97> <85b4>
+<2f98> <85c6>
+<2f99> <85c0>
+<2f9a> <85c3>
+<2f9b> <85c2>
+<2f9c> <85b3>
+<2f9d> <85b5>
+<2f9e> <85bd>
+<2f9f> <85c7>
+<2fa0> <85c4>
+<2fa1> <85bf>
+<2fa2> <85cb>
+<2fa3> <85ce>
+<2fa4> <85c8>
+<2fa5> <85c5>
+<2fa6> <85b1>
+<2fa7> <85b6>
+<2fa8> <85d2>
+<2fa9> <8624>
+<2faa> <85b8>
+<2fab> <85b7>
+<2fac> <85be>
+<2fad> <8669>
+<2fae> <87e7>
+<2faf> <87e6>
+<2fb0> <87e2>
+<2fb1> <87db>
+<2fb2> <87eb>
+<2fb3> <87ea>
+<2fb4> <87e5>
+<2fb5> <87df>
+<2fb6> <87f3>
+<2fb7> <87e4>
+<2fb8> <87d4>
+<2fb9> <87dc>
+<2fba> <87d3>
+<2fbb> <87ed>
+<2fbc> <87d8>
+<2fbd> <87e3>
+<2fbe> <87d7>
+<2fbf> <87d9>
+<2fc0> <8801>
+<2fc1> <87f4>
+<2fc2> <87e8>
+endbfchar
+
+100 beginbfchar
+<2fc3> <87dd>
+<2fc4> <8953>
+<2fc5> <894b>
+<2fc6> <894f>
+<2fc7> <894c>
+<2fc8> <8946>
+<2fcb> <8949>
+<2fcc> <8b2a>
+<2fcd> <8b27>
+<2fce> <8b23>
+<2fcf> <8b33>
+<2fd0> <8b30>
+<2fd1> <8b35>
+<2fd2> <8b47>
+<2fd3> <8b2f>
+<2fd4> <8b3c>
+<2fd5> <8b3e>
+<2fd6> <8b31>
+<2fd7> <8b25>
+<2fd8> <8b37>
+<2fd9> <8b26>
+<2fda> <8b36>
+<2fdb> <8b2e>
+<2fdc> <8b24>
+<2fdd> <8b3b>
+<2fde> <8b3d>
+<2fdf> <8b3a>
+<2fe0> <8c42>
+<2fe1> <8c75>
+<2fe2> <8c99>
+<2fe3> <8c98>
+<2fe4> <8c97>
+<2fe5> <8cfe>
+<2fe6> <8d04>
+<2fe7> <8d02>
+<2fe8> <8d00>
+<2fe9> <8e5c>
+<2fea> <8e62>
+<2feb> <8e60>
+<2fec> <8e57>
+<2fed> <8e56>
+<2fee> <8e5e>
+<2fef> <8e65>
+<2ff0> <8e67>
+<2ff1> <8e5b>
+<2ff2> <8e5a>
+<2ff3> <8e61>
+<2ff4> <8e5d>
+<2ff5> <8e69>
+<2ff6> <8e54>
+<2ffa> <8f4b>
+<2ffb> <9128>
+<2ffe> <913e>
+<2fff> <91a8>
+<3000> <91a5>
+<3001> <91a7>
+<3002> <91af>
+<3003> <91aa>
+<3004> <93b5>
+<3005> <938c>
+<3006> <9392>
+<3007> <93b7>
+<3008> <939b>
+<3009> <939d>
+<300a> <9389>
+<300b> <93a7>
+<300c> <938e>
+<300d> <93aa>
+<300e> <939e>
+<300f> <93a6>
+<3010> <9395>
+<3011> <9388>
+<3012> <9399>
+<3013> <939f>
+<3014> <9380>
+<3015> <938d>
+<3016> <93b1>
+<3017> <9391>
+<3018> <93b2>
+<3019> <93a4>
+<301a> <93a8>
+<301b> <93b4>
+<301c> <93a3>
+<301f> <95d1>
+<3020> <96b3>
+<3021> <96d7>
+<3022> <96da>
+<3023> <5dc2>
+<3024> <96df>
+<3025> <96d8>
+<3026> <96dd>
+<3027> <9723>
+<3028> <9722>
+<3029> <9725>
+<302a> <97ac>
+<302b> <97ae>
+<302c> <97a8>
+<302d> <97ab>
+<302e> <97a4>
+<302f> <97aa>
+endbfchar
+
+100 beginbfchar
+<3030> <97a2>
+<3031> <97a5>
+<3032> <97d7>
+<3033> <97d9>
+<3034> <97d6>
+<3035> <97d8>
+<3036> <97fa>
+<303a> <98b8>
+<303b> <9941>
+<303c> <993c>
+<303d> <993a>
+<303e> <9a0f>
+<303f> <9a0b>
+<3040> <9a09>
+<3041> <9a0d>
+<3042> <9a04>
+<3043> <9a11>
+<3044> <9a0a>
+<3045> <9a05>
+<3046> <9a07>
+<3047> <9a06>
+<3048> <9ac0>
+<3049> <9adc>
+<304a> <9b08>
+<304d> <9b29>
+<304e> <9b35>
+<304f> <9b4a>
+<3050> <9b4c>
+<3051> <9b4b>
+<3052> <9bc7>
+<3053> <9bc6>
+<3054> <9bc3>
+<3055> <9bbf>
+<3056> <9bc1>
+<3057> <9bb5>
+<3058> <9bb8>
+<3059> <9bd3>
+<305a> <9bb6>
+<305b> <9bc4>
+<305c> <9bb9>
+<305d> <9bbd>
+<305e> <9d5c>
+<305f> <9d53>
+<3060> <9d4f>
+<3061> <9d4a>
+<3062> <9d5b>
+<3063> <9d4b>
+<3064> <9d59>
+<3065> <9d56>
+<3066> <9d4c>
+<3067> <9d57>
+<3068> <9d52>
+<3069> <9d54>
+<306a> <9d5f>
+<306b> <9d58>
+<306c> <9d5a>
+<306d> <9e8e>
+<306e> <9e8c>
+<306f> <9edf>
+<3070> <9f01>
+<3071> <9f00>
+<3072> <9f16>
+<3073> <9f25>
+<3074> <9f2b>
+<3075> <9f2a>
+<3076> <9f29>
+<3077> <9f28>
+<3078> <9f4c>
+<3079> <9f55>
+<307c> <5296>
+<307d> <52f7>
+<307e> <53b4>
+<307f> <56ab>
+<3080> <56ad>
+<3083> <56aa>
+<3084> <56ac>
+<3085> <58da>
+<3086> <58dd>
+<3087> <58db>
+<3088> <5912>
+<308c> <5dc3>
+<308d> <5e70>
+<308e> <5fbf>
+<308f> <61fb>
+<3090> <6507>
+<3091> <6510>
+<3092> <650d>
+<3093> <6509>
+<3094> <650c>
+<3095> <650e>
+<3096> <6584>
+<3097> <65de>
+<3098> <65dd>
+<3099> <66de>
+<309a> <6ae7>
+<309b> <6ae0>
+<309c> <6acc>
+<309d> <6ad1>
+<309e> <6ad9>
+<309f> <6acb>
+endbfchar
+
+100 beginbfchar
+<30a0> <6adf>
+<30a1> <6adc>
+<30a2> <6ad0>
+<30a3> <6aeb>
+<30a4> <6acf>
+<30a5> <6acd>
+<30a6> <6ade>
+<30a7> <6b60>
+<30a8> <6bb0>
+<30a9> <6c0c>
+<30aa> <7019>
+<30ab> <7027>
+<30ac> <7020>
+<30ad> <7016>
+<30ae> <702b>
+<30b2> <7029>
+<30b3> <7017>
+<30b4> <7024>
+<30b5> <701c>
+<30b6> <720c>
+<30b7> <720a>
+<30b8> <7207>
+<30b9> <7202>
+<30ba> <7205>
+<30bd> <72a4>
+<30be> <72a3>
+<30bf> <72a1>
+<30c0> <74cb>
+<30c1> <74c5>
+<30c2> <74b7>
+<30c3> <74c3>
+<30c4> <7516>
+<30c5> <7660>
+<30c8> <77c4>
+<30c9> <77f1>
+<30ca> <791d>
+<30cb> <791b>
+<30cc> <7921>
+<30cd> <791c>
+<30ce> <7917>
+<30cf> <791e>
+<30d0> <79b0>
+<30d3> <7c33>
+<30d4> <7c3c>
+<30d5> <7c39>
+<30d6> <7c2c>
+<30d7> <7c3b>
+<30d8> <7cec>
+<30d9> <7cea>
+<30da> <7e76>
+<30db> <7e75>
+<30dc> <7e78>
+<30dd> <7e70>
+<30de> <7e77>
+<30df> <7e6f>
+<30e0> <7e7a>
+<30e1> <7e72>
+<30e2> <7e74>
+<30e3> <7e68>
+<30e4> <7f4b>
+<30e5> <7f4a>
+<30e6> <7f83>
+<30e7> <7f86>
+<30e8> <7fb7>
+<30eb> <8078>
+<30ec> <81d7>
+<30ed> <81d5>
+<30ee> <820b>
+<30ef> <8264>
+<30f0> <8261>
+<30f1> <8263>
+<30f2> <85eb>
+<30f3> <85f1>
+<30f4> <85ed>
+<30f5> <85d9>
+<30f6> <85e1>
+<30f7> <85e8>
+<30f8> <85da>
+<30f9> <85d7>
+<30fa> <85ec>
+<30fb> <85f2>
+<30fc> <85f8>
+<30fd> <85d8>
+<30fe> <85df>
+<30ff> <85e3>
+<3100> <85dc>
+<3101> <85d1>
+<3102> <85f0>
+<3103> <85e6>
+<3104> <85ef>
+<3105> <85de>
+<3106> <85e2>
+<3107> <8800>
+<3108> <87fa>
+<3109> <8803>
+<310c> <8809>
+<310d> <880c>
+<310e> <880b>
+<310f> <8806>
+<3110> <87fc>
+endbfchar
+
+100 beginbfchar
+<3111> <8808>
+<3112> <87ff>
+<3113> <880a>
+<3114> <8802>
+<3115> <8962>
+<3118> <8957>
+<3119> <8961>
+<311a> <895c>
+<311b> <8958>
+<311c> <895d>
+<311d> <8959>
+<311e> <8988>
+<311f> <89b7>
+<3120> <89b6>
+<3121> <89f6>
+<3122> <8b50>
+<3123> <8b48>
+<3124> <8b4a>
+<3125> <8b40>
+<3126> <8b53>
+<3127> <8b56>
+<3128> <8b54>
+<3129> <8b4b>
+<312a> <8b55>
+<312b> <8b51>
+<312c> <8b42>
+<312d> <8b52>
+<312e> <8b57>
+<312f> <8c43>
+<3130> <8c77>
+<3131> <8c76>
+<3132> <8c9a>
+<3135> <8d09>
+<3136> <8dac>
+<3137> <8daa>
+<3138> <8dad>
+<3139> <8dab>
+<313a> <8e6d>
+<313b> <8e78>
+<313c> <8e73>
+<313d> <8e6a>
+<313e> <8e6f>
+<313f> <8e7b>
+<3140> <8ec2>
+<3141> <8f52>
+<3142> <8f51>
+<3145> <8f53>
+<3146> <8fb4>
+<3147> <9140>
+<3148> <913f>
+<3149> <91b0>
+<314a> <91ad>
+<314b> <93de>
+<314c> <93c7>
+<314d> <93cf>
+<314e> <93c2>
+<314f> <93da>
+<3150> <93d0>
+<3151> <93f9>
+<3152> <93ec>
+<3153> <93cc>
+<3154> <93d9>
+<3155> <93a9>
+<3156> <93e6>
+<3157> <93ca>
+<3158> <93d4>
+<3159> <93ee>
+<315a> <93e3>
+<315b> <93d5>
+<315c> <93c4>
+<315d> <93ce>
+<315e> <93c0>
+<315f> <93d2>
+<3160> <93a5>
+<3161> <93e7>
+<3162> <957d>
+<3165> <96e1>
+<3166> <9729>
+<3169> <9728>
+<316a> <9726>
+<316b> <97b3>
+<316c> <97b7>
+<316d> <97b6>
+<3171> <985c>
+<3172> <9859>
+<3173> <985d>
+<3174> <9857>
+<3175> <98bf>
+<3176> <98bd>
+<3177> <98bb>
+<3178> <98be>
+<3179> <9948>
+<317a> <9947>
+<317b> <9943>
+<317e> <9a1a>
+<317f> <9a15>
+<3180> <9a25>
+<3181> <9a1d>
+<3182> <9a24>
+<3183> <9a1b>
+endbfchar
+
+100 beginbfchar
+<3184> <9a22>
+<3185> <9a20>
+<3186> <9a27>
+<3187> <9a23>
+<3188> <9a1e>
+<3189> <9a1c>
+<318a> <9a14>
+<318b> <9ac2>
+<318c> <9b0b>
+<318d> <9b0a>
+<318e> <9b0e>
+<318f> <9b0c>
+<3190> <9b37>
+<3193> <9be0>
+<3194> <9bde>
+<3195> <9be4>
+<3196> <9be6>
+<3197> <9be2>
+<3198> <9bf0>
+<3199> <9bd4>
+<319a> <9bd7>
+<319b> <9bec>
+<319c> <9bdc>
+<319d> <9bd9>
+<319e> <9be5>
+<319f> <9bd5>
+<31a0> <9be1>
+<31a1> <9bda>
+<31a2> <9d77>
+<31a3> <9d81>
+<31a4> <9d8a>
+<31a5> <9d84>
+<31a6> <9d88>
+<31a7> <9d71>
+<31a8> <9d80>
+<31a9> <9d78>
+<31aa> <9d86>
+<31ad> <9d7d>
+<31ae> <9d6b>
+<31b1> <9d70>
+<31b2> <9d69>
+<31b3> <9d85>
+<31b4> <9d73>
+<31b5> <9d7b>
+<31b6> <9d82>
+<31b7> <9d6f>
+<31b8> <9d79>
+<31b9> <9d7f>
+<31ba> <9d87>
+<31bb> <9d68>
+<31bc> <9e94>
+<31bd> <9e91>
+<31be> <9ec0>
+<31bf> <9efc>
+<31c0> <9f2d>
+<31c3> <9f4d>
+<31c7> <5337>
+<31c8> <56b2>
+<31c9> <56b5>
+<31ca> <56b3>
+<31cb> <58e3>
+<31cc> <5b45>
+<31d3> <61f9>
+<31d4> <6517>
+<31d5> <6516>
+<31d6> <6515>
+<31d7> <6513>
+<31d8> <65df>
+<31d9> <66e8>
+<31dc> <6af3>
+<31dd> <6af0>
+<31de> <6aea>
+<31df> <6ae8>
+<31e0> <6af9>
+<31e1> <6af1>
+<31e4> <703c>
+<31e5> <7035>
+<31e6> <702f>
+<31e7> <7037>
+<31e8> <7034>
+<31e9> <7031>
+<31ea> <7042>
+<31eb> <7038>
+<31ec> <703f>
+<31ed> <703a>
+<31ee> <7039>
+<31ef> <702a>
+<31f0> <7040>
+<31f1> <703b>
+<31f2> <7033>
+<31f3> <7041>
+<31f6> <72a8>
+<31f7> <737d>
+<31f8> <737c>
+<31f9> <74ba>
+<31fa> <76ab>
+<31fb> <76aa>
+<31fc> <76be>
+<31fd> <76ed>
+<31fe> <77cc>
+endbfchar
+
+100 beginbfchar
+<31ff> <77ce>
+<3200> <77cf>
+<3201> <77cd>
+<3202> <77f2>
+<3203> <7925>
+<3204> <7923>
+<3207> <7924>
+<3208> <7929>
+<3209> <79b2>
+<320a> <7a6e>
+<320d> <7af7>
+<320e> <7c49>
+<320f> <7c48>
+<3210> <7c4a>
+<3211> <7c47>
+<3212> <7c45>
+<3213> <7cee>
+<3214> <7e7b>
+<3215> <7e7e>
+<3216> <7e81>
+<3217> <7e80>
+<3218> <7fba>
+<3219> <7fff>
+<321a> <8079>
+<321b> <81db>
+<321c> <81d9>
+<321f> <8622>
+<3220> <85ff>
+<3221> <8601>
+<3222> <85fe>
+<3223> <861b>
+<3224> <8600>
+<3225> <85f6>
+<3226> <8604>
+<3227> <8609>
+<3228> <8605>
+<3229> <860c>
+<322a> <85fd>
+<322b> <8819>
+<322e> <8817>
+<322f> <8813>
+<3230> <8816>
+<3231> <8963>
+<3232> <8966>
+<3233> <89b9>
+<3234> <89f7>
+<3235> <8b60>
+<3236> <8b6a>
+<3237> <8b5d>
+<3238> <8b68>
+<3239> <8b63>
+<323a> <8b65>
+<323b> <8b67>
+<323c> <8b6d>
+<323d> <8dae>
+<323e> <8e86>
+<323f> <8e88>
+<3240> <8e84>
+<3241> <8f59>
+<3244> <8f55>
+<3245> <8f58>
+<3246> <8f5a>
+<3247> <908d>
+<3248> <9143>
+<3249> <9141>
+<324a> <91b7>
+<324b> <91b5>
+<324e> <940b>
+<324f> <9413>
+<3250> <93fb>
+<3251> <9420>
+<3252> <940f>
+<3253> <9414>
+<3254> <93fe>
+<3255> <9415>
+<3256> <9410>
+<3257> <9428>
+<3258> <9419>
+<3259> <940d>
+<325a> <93f5>
+<325b> <9400>
+<325c> <93f7>
+<325d> <9407>
+<325e> <940e>
+<325f> <9416>
+<3260> <9412>
+<3261> <93fa>
+<3262> <9409>
+<3263> <93f8>
+<3264> <943c>
+<3265> <940a>
+<3266> <93ff>
+<3267> <93fc>
+<3268> <940c>
+<3269> <93f6>
+<326a> <9411>
+<326b> <9406>
+<326c> <95de>
+<326d> <95e0>
+<326e> <95df>
+endbfchar
+
+100 beginbfchar
+<3271> <97b9>
+<3272> <97bb>
+<3275> <9860>
+<3278> <985f>
+<327b> <9950>
+<327c> <994e>
+<327d> <9959>
+<327e> <994c>
+<327f> <994b>
+<3280> <9953>
+<3281> <9a32>
+<3282> <9a34>
+<3283> <9a31>
+<3284> <9a2c>
+<3285> <9a2a>
+<3286> <9a36>
+<3287> <9a29>
+<3288> <9a2e>
+<3289> <9a38>
+<328a> <9a2d>
+<328b> <9ac7>
+<328c> <9aca>
+<328d> <9ac6>
+<328e> <9b10>
+<328f> <9b12>
+<3290> <9b11>
+<3291> <9c0b>
+<3292> <9c08>
+<3293> <9bf7>
+<3294> <9c05>
+<3295> <9c12>
+<3296> <9bf8>
+<3297> <9c40>
+<3298> <9c07>
+<3299> <9c0e>
+<329a> <9c06>
+<329b> <9c17>
+<329c> <9c14>
+<329d> <9c09>
+<329e> <9d9f>
+<329f> <9d99>
+<32a0> <9da4>
+<32a1> <9d9d>
+<32a2> <9d92>
+<32a3> <9d98>
+<32a4> <9d90>
+<32a5> <9d9b>
+<32a6> <9da0>
+<32a7> <9d94>
+<32a8> <9d9c>
+<32a9> <9daa>
+<32aa> <9d97>
+<32ab> <9da1>
+<32ac> <9d9a>
+<32ad> <9da2>
+<32ae> <9da8>
+<32af> <9d9e>
+<32b0> <9da3>
+<32b1> <9dbf>
+<32b2> <9da9>
+<32b3> <9d96>
+<32b6> <9e99>
+<32b7> <9e9b>
+<32b8> <9e9a>
+<32b9> <9ee5>
+<32ba> <9ee4>
+<32bb> <9ee7>
+<32bc> <9ee6>
+<32bd> <9f30>
+<32be> <9f2e>
+<32bf> <9f5b>
+<32c0> <9f60>
+<32c1> <9f5e>
+<32c2> <9f5d>
+<32c3> <9f59>
+<32c4> <9f91>
+<32c5> <513a>
+<32c6> <5139>
+<32c7> <5298>
+<32c8> <5297>
+<32c9> <56c3>
+<32cc> <5b48>
+<32cd> <5b47>
+<32ce> <5dcb>
+<32cf> <5dcf>
+<32d0> <5ef1>
+<32d1> <61fd>
+<32d2> <651b>
+<32d3> <6b02>
+<32d4> <6afc>
+<32d5> <6b03>
+<32d6> <6af8>
+<32d7> <6b00>
+<32da> <704a>
+<32df> <721d>
+<32e0> <721a>
+<32e1> <7219>
+<32e2> <737e>
+<32e3> <7517>
+<32e4> <766a>
+endbfchar
+
+100 beginbfchar
+<32e5> <77d0>
+<32e6> <792d>
+<32e7> <7931>
+<32e8> <792f>
+<32e9> <7c54>
+<32ea> <7c53>
+<32eb> <7cf2>
+<32ec> <7e8a>
+<32ef> <7e8b>
+<32f0> <7e86>
+<32f1> <7e8d>
+<32f2> <7f4d>
+<32f3> <7fbb>
+<32f4> <8030>
+<32f5> <81dd>
+<32f6> <8618>
+<32f7> <862a>
+<32f8> <8626>
+<32f9> <861f>
+<32fa> <8623>
+<32fb> <861c>
+<32fc> <8619>
+<32fd> <8627>
+<32fe> <862e>
+<32ff> <8621>
+<3300> <8620>
+<3301> <8629>
+<3302> <861e>
+<3303> <8625>
+<3304> <8829>
+<3305> <881d>
+<3306> <881b>
+<3307> <8820>
+<3308> <8824>
+<3309> <881c>
+<330a> <882b>
+<330b> <884a>
+<330c> <896d>
+<330d> <8969>
+<330e> <896e>
+<330f> <896b>
+<3310> <89fa>
+<3311> <8b79>
+<3312> <8b78>
+<3313> <8b45>
+<3316> <8d10>
+<3317> <8d14>
+<3318> <8daf>
+<3319> <8e8e>
+<331a> <8e8c>
+<331b> <8f5e>
+<331c> <8f5b>
+<331d> <8f5d>
+<331e> <9146>
+<3321> <91b9>
+<3322> <943f>
+<3323> <943b>
+<3324> <9436>
+<3325> <9429>
+<3326> <943d>
+<3327> <9430>
+<3328> <9439>
+<3329> <942a>
+<332a> <9437>
+<332b> <942c>
+<332c> <9440>
+<332d> <9431>
+<332e> <95e5>
+<332f> <95e4>
+<3330> <95e3>
+<3331> <9735>
+<3332> <973a>
+<3333> <97bf>
+<3334> <97e1>
+<3335> <9864>
+<3336> <98c9>
+<3337> <98c6>
+<3338> <98c0>
+<3339> <9958>
+<333a> <9956>
+<333b> <9a39>
+<333c> <9a3d>
+<333d> <9a46>
+<333e> <9a44>
+<333f> <9a42>
+<3340> <9a41>
+<3341> <9a3a>
+<3342> <9a3f>
+<3343> <9acd>
+<3344> <9b15>
+<3347> <9b16>
+<3348> <9b3a>
+<3349> <9b52>
+<334a> <9c2b>
+<334b> <9c1d>
+<334c> <9c1c>
+<334d> <9c2c>
+<334e> <9c23>
+<3351> <9c24>
+<3352> <9c21>
+endbfchar
+
+100 beginbfchar
+<3353> <9db7>
+<3354> <9db6>
+<3355> <9dbc>
+<3356> <9dc1>
+<3357> <9dc7>
+<3358> <9dca>
+<3359> <9dcf>
+<335a> <9dbe>
+<335b> <9dc5>
+<335c> <9dc3>
+<335d> <9dbb>
+<335e> <9db5>
+<335f> <9dce>
+<3362> <9dac>
+<3363> <9dc8>
+<3364> <9db1>
+<3365> <9dad>
+<3366> <9dcc>
+<3367> <9db3>
+<3368> <9dcd>
+<3369> <9db2>
+<336a> <9e7a>
+<336b> <9e9c>
+<336c> <9eeb>
+<336d> <9eee>
+<336e> <9eed>
+<336f> <9f1b>
+<3370> <9f18>
+<3371> <9f1a>
+<3372> <9f31>
+<3373> <9f4e>
+<3374> <9f65>
+<3375> <9f64>
+<3376> <9f92>
+<3377> <4eb9>
+<3378> <56c6>
+<3379> <56c5>
+<337a> <56cb>
+<337b> <5971>
+<337e> <5dd5>
+<337f> <5dd1>
+<3380> <5ef2>
+<3381> <6521>
+<3382> <6520>
+<3383> <6526>
+<3384> <6522>
+<3385> <6b0b>
+<3388> <6c0d>
+<338c> <7052>
+<338f> <72a9>
+<3390> <737f>
+<3391> <74d8>
+<3392> <74d5>
+<3393> <74d9>
+<3394> <74d7>
+<3395> <766d>
+<3396> <76ad>
+<3397> <7935>
+<3398> <79b4>
+<339b> <7c57>
+<339c> <7c5c>
+<339d> <7c59>
+<339e> <7c5b>
+<339f> <7c5a>
+<33a0> <7cf4>
+<33a1> <7cf1>
+<33a2> <7e91>
+<33a3> <7f4f>
+<33a4> <7f87>
+<33a5> <81de>
+<33a6> <826b>
+<33a9> <8633>
+<33aa> <862c>
+<33ab> <8632>
+<33ac> <8636>
+<33ad> <882c>
+<33ae> <8828>
+<33af> <8826>
+<33b0> <882a>
+<33b1> <8825>
+<33b2> <8971>
+<33b3> <89bf>
+<33b4> <89be>
+<33b5> <89fb>
+<33b6> <8b7e>
+<33b7> <8b84>
+<33b8> <8b82>
+<33b9> <8b86>
+<33ba> <8b85>
+<33bb> <8b7f>
+<33bc> <8d15>
+<33bd> <8e95>
+<33be> <8e94>
+<33bf> <8e9a>
+<33c0> <8e92>
+<33c1> <8e90>
+<33c4> <8f60>
+<33c5> <8f62>
+<33c6> <9147>
+<33c7> <944c>
+endbfchar
+
+100 beginbfchar
+<33c8> <9450>
+<33cb> <944f>
+<33cc> <9447>
+<33cd> <9445>
+<33d0> <9446>
+<33d1> <973f>
+<33d2> <97e3>
+<33d3> <986a>
+<33d4> <9869>
+<33d5> <98cb>
+<33d6> <9954>
+<33d7> <995b>
+<33d8> <9a4e>
+<33db> <9a4c>
+<33dc> <9a4f>
+<33dd> <9a48>
+<33de> <9a4a>
+<33df> <9a49>
+<33e0> <9a52>
+<33e1> <9a50>
+<33e2> <9ad0>
+<33e3> <9b19>
+<33e4> <9b2b>
+<33e5> <9b3b>
+<33e6> <9b56>
+<33e7> <9b55>
+<33e8> <9c46>
+<33e9> <9c48>
+<33ea> <9c3f>
+<33eb> <9c44>
+<33ec> <9c39>
+<33ed> <9c33>
+<33ee> <9c41>
+<33ef> <9c3c>
+<33f0> <9c37>
+<33f1> <9c34>
+<33f2> <9c32>
+<33f3> <9c3d>
+<33f4> <9c36>
+<33f5> <9ddb>
+<33f6> <9dd2>
+<33f7> <9dde>
+<33f8> <9dda>
+<33f9> <9dcb>
+<33fa> <9dd0>
+<33fb> <9ddc>
+<33fc> <9dd1>
+<33fd> <9ddf>
+<33fe> <9de9>
+<33ff> <9dd9>
+<3400> <9dd8>
+<3401> <9dd6>
+<3402> <9df5>
+<3403> <9dd5>
+<3404> <9ddd>
+<3405> <9eb6>
+<3406> <9ef0>
+<3407> <9f35>
+<3408> <9f33>
+<3409> <9f32>
+<340a> <9f42>
+<340b> <9f6b>
+<340c> <9f95>
+<340d> <9fa2>
+<340e> <513d>
+<340f> <5299>
+<3410> <58e8>
+<3411> <58e7>
+<3412> <5972>
+<3413> <5b4d>
+<3414> <5dd8>
+<3415> <882f>
+<3416> <5f4f>
+<3417> <6201>
+<341a> <6529>
+<341b> <6525>
+<341c> <6596>
+<341d> <66eb>
+<3420> <6b0f>
+<3421> <6bca>
+<3422> <705b>
+<3423> <705a>
+<3424> <7222>
+<3425> <7382>
+<3426> <7381>
+<3427> <7383>
+<3428> <7670>
+<3429> <77d4>
+<342a> <7c67>
+<342b> <7c66>
+<342c> <7e95>
+<342d> <826c>
+<342e> <863a>
+<342f> <8640>
+<3430> <8639>
+<3431> <863c>
+<3432> <8631>
+<3433> <863b>
+<3434> <863e>
+<3435> <8830>
+endbfchar
+
+100 beginbfchar
+<3436> <8832>
+<3437> <882e>
+<3438> <8833>
+<3439> <8976>
+<343a> <8974>
+<343b> <8973>
+<343c> <89fe>
+<343d> <8b8c>
+<343e> <8b8e>
+<343f> <8b8b>
+<3440> <8b88>
+<3441> <8c45>
+<3442> <8d19>
+<3443> <8e98>
+<3444> <8f64>
+<3445> <8f63>
+<3446> <91bc>
+<3447> <9462>
+<3448> <9455>
+<3449> <945d>
+<344a> <9457>
+<344b> <945e>
+<344e> <9800>
+<344f> <9a56>
+<3450> <9a59>
+<3454> <9c52>
+<3455> <9c58>
+<3456> <9c50>
+<3457> <9c4a>
+<3458> <9c4d>
+<3459> <9c4b>
+<345a> <9c55>
+<345b> <9c59>
+<345c> <9c4c>
+<345d> <9c4e>
+<345e> <9dfb>
+<345f> <9df7>
+<3460> <9def>
+<3461> <9de3>
+<3462> <9deb>
+<3463> <9df8>
+<3464> <9de4>
+<3465> <9df6>
+<3466> <9de1>
+<3467> <9dee>
+<3468> <9de6>
+<3469> <9df2>
+<346a> <9df0>
+<346b> <9de2>
+<346c> <9dec>
+<346d> <9df4>
+<346e> <9df3>
+<346f> <9de8>
+<3470> <9ded>
+<3471> <9ec2>
+<3472> <9ed0>
+<3475> <9f06>
+<3476> <9f1c>
+<3477> <9f38>
+<3478> <9f37>
+<3479> <9f36>
+<347a> <9f43>
+<347b> <9f4f>
+<347c> <9f71>
+<347d> <9f70>
+<3480> <56d3>
+<3481> <56cd>
+<3482> <5b4e>
+<3483> <5c6d>
+<3484> <652d>
+<3487> <6b13>
+<3488> <705f>
+<3489> <7061>
+<348a> <705d>
+<348b> <7060>
+<348c> <7223>
+<348d> <74db>
+<348e> <74e5>
+<348f> <77d5>
+<3490> <7938>
+<3491> <79b7>
+<3492> <79b6>
+<3493> <7c6a>
+<3494> <7e97>
+<3495> <7f89>
+<3496> <826d>
+<3497> <8643>
+<3498> <8838>
+<3499> <8837>
+<349a> <8835>
+<349b> <884b>
+<34a1> <8e9d>
+<34a2> <91be>
+<34a3> <91bd>
+<34a4> <91c2>
+<34a5> <946b>
+<34a8> <96e5>
+<34a9> <9746>
+<34aa> <9743>
+<34ab> <9747>
+endbfchar
+
+100 beginbfchar
+<34ac> <97c7>
+<34ad> <97e5>
+<34ae> <9a5e>
+<34af> <9ad5>
+<34b0> <9b59>
+<34b1> <9c63>
+<34b2> <9c67>
+<34b3> <9c66>
+<34b4> <9c62>
+<34b5> <9c5e>
+<34b6> <9c60>
+<34b7> <9e02>
+<34b8> <9dfe>
+<34b9> <9e07>
+<34ba> <9e03>
+<34bb> <9e06>
+<34bc> <9e05>
+<34bf> <9e09>
+<34c0> <9dff>
+<34c1> <9dfd>
+<34c2> <9e04>
+<34c3> <9ea0>
+<34c4> <9f1e>
+<34c5> <9f46>
+<34c9> <56d4>
+<34ca> <652e>
+<34cb> <65b8>
+<34ce> <6b17>
+<34cf> <6b1a>
+<34d0> <7062>
+<34d1> <7226>
+<34d2> <72aa>
+<34d5> <7939>
+<34d6> <7c69>
+<34d7> <7c6b>
+<34d8> <7cf6>
+<34d9> <7e9a>
+<34da> <7e98>
+<34db> <7e9b>
+<34dc> <7e99>
+<34e4> <897c>
+<34e5> <897b>
+<34e6> <89ff>
+<34e9> <8ea5>
+<34ea> <8ea4>
+<34eb> <8ea3>
+<34ec> <946e>
+<34ed> <946d>
+<34ee> <946f>
+<34ef> <9471>
+<34f0> <9473>
+<34f1> <9749>
+<34f2> <9872>
+<34f3> <995f>
+<34f4> <9c68>
+<34f5> <9c6e>
+<34f6> <9c6d>
+<34f7> <9e0b>
+<34f8> <9e0d>
+<34f9> <9e10>
+<34fa> <9e0f>
+<34fb> <9e12>
+<34fc> <9e11>
+<34fd> <9ea1>
+<34fe> <9ef5>
+<34ff> <9f09>
+<3500> <9f47>
+<3501> <9f78>
+<3502> <9f7b>
+<3503> <9f7a>
+<3504> <9f79>
+<3505> <571e>
+<3506> <7066>
+<3507> <7c6f>
+<3508> <883c>
+<3509> <8db2>
+<350a> <8ea6>
+<350b> <91c3>
+<350c> <9474>
+<350d> <9478>
+<350e> <9476>
+<350f> <9475>
+<3510> <9a60>
+<3511> <9b2e>
+<3512> <9c74>
+<3513> <9c73>
+<3514> <9c71>
+<3515> <9c75>
+<3516> <9e14>
+<3517> <9e13>
+<3518> <9ef6>
+<3519> <9f0a>
+<351a> <9fa4>
+<351b> <7068>
+<351c> <7065>
+<351d> <7cf7>
+<351e> <866a>
+<351f> <883e>
+<3520> <883d>
+<3521> <883f>
+endbfchar
+
+100 beginbfchar
+<3522> <8b9e>
+<3523> <8c9c>
+<3524> <8ea9>
+<3525> <8ec9>
+<3526> <974b>
+<3529> <98cc>
+<352a> <9961>
+<352b> <99ab>
+<352c> <9a64>
+<352f> <9b24>
+<3530> <9e15>
+<3531> <9e17>
+<3532> <9f48>
+<3533> <6207>
+<3534> <6b1e>
+<3535> <7227>
+<3536> <864c>
+<3537> <8ea8>
+<3538> <9482>
+<353b> <9a69>
+<353c> <9a68>
+<353d> <9e19>
+<353e> <864b>
+<353f> <8b9f>
+<3540> <9483>
+<3541> <9c79>
+<3542> <9eb7>
+<3543> <7675>
+<3544> <9a6b>
+<3545> <9c7a>
+<3546> <9e1d>
+<3549> <7229>
+<354a> <9ea4>
+<354b> <9f7e>
+<354c> <9f49>
+<354d> <9f98>
+<354e>
+<354f> <223c>
+<3550> <2002>
+<35af>
+<35b0> <2574>
+<35b1>
+<35b2>
+<35b3> <00a8>
+<35b4>
+<35b9>
+<35bd> <30fc>
+<35be>
+<35bf>
+<35c0> <273d>
+<3670> <0401>
+<3691> <0451>
+<36ac> <21e7>
+<36af> <4e41>
+<36b0>
+<36b1> <4e5a>
+<36b2>
+<36b3> <5202>
+<36b4> <4491>
+<36b5> <9fb0>
+<36b6> <5188>
+<36b7> <9fb1>
+<36b8>
+<36b9>
+<36ba>
+<36bb>
+<36bc>
+<36bd>
+<36be>
+<36bf>
+<36c0>
+<36c1>
+<36c2>
+<36c3>
+<36c4>
+<36c5>
+<36c6>
+<36c7>
+<36c8>
+<36c9>
+<36ca>
+<36cb>
+<36cc>
+<36cd>
+<36ce>
+<36cf>
+<36d0>
+<36d1>
+<36d2>
+<36d3>
+<36d4>
+<36d5>
+<36d6>
+<36d7>
+<36d8>
+<36d9>
+<36da>
+<36db>
+<36dc>
+<36dd>
+endbfchar
+
+100 beginbfchar
+<36de>
+<36df>
+<36e0>
+<36e1>
+<36e2>
+<36e3>
+<36e4>
+<36e5> <3231>
+<36e6> <2116>
+<36e7> <2121>
+<36e8> <7881>
+<36e9> <92b9>
+<36ea> <88cf>
+<36eb> <58bb>
+<36ec> <6052>
+<36ed> <7ca7>
+<36ee> <5afa>
+<36ef> <2554>
+<36f0> <2566>
+<36f1> <2557>
+<36f2> <2560>
+<36f3> <256c>
+<36f4> <2563>
+<36f5> <255a>
+<36f6> <2569>
+<36f7> <255d>
+<36f8> <2552>
+<36f9> <2564>
+<36fa> <2555>
+<36fb> <255e>
+<36fc> <256a>
+<36fd> <2561>
+<36fe> <2558>
+<36ff> <2567>
+<3700> <255b>
+<3701> <2553>
+<3702> <2565>
+<3703> <2556>
+<3704> <255f>
+<3705> <256b>
+<3706> <2562>
+<3707> <2559>
+<3708> <2568>
+<3709> <255c>
+<370a> <2551>
+<370b> <2550>
+<370c>
+<370d>
+<370e>
+<370f>
+<3710> <2593>
+<3711>
+<3712>
+<3716>
+<3717>
+<3718>
+<3719>
+<371a>
+<371b>
+<371c>
+<371d>
+<371e>
+<371f>
+<3720>
+<3721>
+<3722>
+<3723>
+<3724>
+<3725>
+<3726>
+<3727>
+<3728>
+<3729>
+<372a>
+<372b>
+<372c> <57be>
+<372d>
+<372e> <713e>
+<372f>
+<3730> <69a2>
+<3731>
+<3732> <5b74>
+<3733> <7a49>
+<3734>
+<3735>
+<3736> <7a65>
+<3737> <7a7d>
+<3738>
+<3739> <7abb>
+<373a> <7ab0>
+<373d> <71d1>
+<373e>
+<373f> <41ca>
+<3740> <7ada>
+<3741> <7add>
+<3742> <7aea>
+<3743> <41ef>
+<3744> <54b2>
+<3745>
+<3746> <7b0b>
+endbfchar
+
+100 beginbfchar
+<3747> <7b55>
+<3748> <7b29>
+<3749>
+<374a>
+<374b> <7ba2>
+<374c> <7b6f>
+<374d> <839c>
+<374e>
+<374f>
+<3750> <7bd0>
+<3751> <8421>
+<3752> <7b92>
+<3753>
+<3754>
+<3755>
+<3756> <8492>
+<3757> <7bfa>
+<3758>
+<3759> <7c35>
+<375a>
+<375b> <7c44>
+<375c> <7c83>
+<375d>
+<375e> <7ca6>
+<375f>
+<3760> <7cc9>
+<3761> <7cc7>
+<3762> <7ce6>
+<3763>
+<3764> <7cf3>
+<3765> <7cf5>
+<3766> <7e67>
+<3767> <451d>
+<3768>
+<3769> <7d5d>
+<376a>
+<376b> <7d89>
+<376c> <7dab>
+<376d> <7135>
+<376e> <7db3>
+<376f> <7dd6>
+<3770>
+<3771>
+<3772> <7de4>
+<3773> <3d13>
+<3774> <7df5>
+<3775>
+<3776> <7de5>
+<3777>
+<3778>
+<3779>
+<377a>
+<377b> <7e6e>
+<377c>
+<377d> <432b>
+<377e> <946c>
+<377f> <7e27>
+<3782> <7f47>
+<3783> <7936>
+<3784>
+<3785> <99e1>
+<3786> <7f97>
+<3787>
+<3788> <7fa3>
+<3789>
+<378a>
+<378b> <455c>
+<378c>
+<378d>
+<378e> <7ffa>
+<378f>
+<3790>
+<3791> <8008>
+<3792> <801d>
+<3793>
+<3794> <802f>
+<3795>
+<3796>
+<3799> <8061>
+<379a>
+<379b> <4989>
+<379c>
+<379d>
+<379e>
+<379f> <6725>
+<37a0> <80a7>
+<37a1>
+<37a2> <8107>
+<37a3> <811a>
+<37a4> <58b0>
+<37a5>
+<37a6> <6c7f>
+<37a7>