Repository navigation
feat(text): non-English text typed, shaped, read, exported and named across FormPath, and projects open from the desktop (0.63.0) - #18
Merged
Conversation
…sed words show at the caret, and its keys are left to it
…and what cannot be read is never set as replacement characters
…ut method that is composing, and number fields read full-width digits
…s named in any script keep their own id
…wn region, and shaped type falls back instead of drawing an empty box
… outside ASCII come through whole
…charset instead of as replacement characters
…hortcuts, so Backspace and Tab stay with the page
… of the interface language
…re cut by character, never inside one past U+FFFF
…r and the Appearance head is shown as written, not translated
…kes a font that matches the language, and the agent reads the note on characters no font draws
…n set, a pattern or a width profile never end in half a character
… digits, and an emptied option field keeps its value
…counts the rest, and a summary that cannot be read no longer fails the package
…QWERTZ and Dvorak run the command they show
…r with a note naming the family, instead of as a picture or live text
…II print in their own characters instead of question marks
…ds and draws that font, and Find Similar Fonts says when the font is not installed
…so two Chinese inks no longer merge into one
…Chinese, Japanese, Korean or other legacy text instead of replacement characters
…Devanagari, comes from an installed font that has it, and fonts that are not installed are no longer asked for
… outside UTF-8 are read in their own charset, and a long swatch name is never cut inside a character
…t draws and ask for a font that covers them
…DF, converted to CFF, instead of being outlined
…s 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
…s bar have a search field that also finds a font by its names in other languages
… \M+ and %%nnn character codes in DXF and DWG text are decoded
… from the font inside the file
…outlines in that font instead of embedding it, and the export says which font and why
…XF as it shows on the canvas, and copying it from a PDF gives its characters in reading order
…e window, and a second launch on Windows or Linux hands its files to the running window
… and tell the system that .fpth files are formpath projects
…r, so it reads and joins correctly now that right-to-left type is laid out
…d goes on in words, and still skips code and data that begin with a brace
… a sentence that says export or new
…and about a licence that forbids embedding show in every language
…its joins and does not break across lines, and small caps without the font's own small capitals stay small caps in a right-to-left run
…ives whole with its line breaks when the program accepts pasted text, and on one line otherwise, instead of being sent at the first line break
… shaped in a font that has them, so they join and take their right forms instead of being drawn one by one
…hrough right-to-left words, and a path too short for its text keeps the text's beginning and threads the rest
…ument that ends inside an open quote no longer gains a trailing space or the rest of the line
… embedding, so the person can check the licence before passing the package on
…ap embedding is drawn as outlines with the licence note instead of being embedded as a subset
…, its tab stops measured from the right and its indents on the mirrored sides
…nese, Japanese and Korean type with no font in the file is read by its character collection
…placed or outlined and which characters no font draws, after the line that names the file written
…has shows in every language
… scripts are shaped and run turned a quarter down the column in bidirectional order, and the arrow keys move the way they point through them
… an argument with an open quote no longer swallows the rest of the script and the Python commands receive it
…e shaped type is needed, at most once every three seconds
… go on to the next line instead of bouncing inside the line
…first message, the launchers, Package, the licence bits and the shaping work, with what was looked at and left
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(text): non-English text typed, shaped, read, exported and named across FormPath, and projects open from the desktop (0.63.0)
Refs #17. This is FormPath's part of that issue. The reporter's own file is not at hand; the symptom in the issue's picture was reproduced with test PDFs that embed real Chinese fonts, and with public files. The issue is not closed by this pull request.
This branch holds four versions, none pushed on its own: 0.60.0 (the first pass), 0.61.0 (what 0.60.0 found and left), 0.62.0 (the five findings 0.61.0 still listed as open) and 0.63.0 (what 0.62.0 listed as not done).
This pull request stands alone: it changes FormPath only and depends on no other repository. The shared dock folder is byte for byte what
mainhas.Summary of 0.63.0
Adobe-*-UCS2mapping files vendored unchanged underfrontend/src/io/cmaps/(BSD-3-Clause, loaded on demand). The table is not used when the file embeds a font program, since two public files claim a collection their embedded font does not follow.i18n extractkeeps a sentence that begins with a placeholder; a first message with line breaks typed into a running tab arrives whole (bracketed paste);formpath.batandsetup/python.batsurvive an argument with an open quote; Package names fonts whose licence restricts embedding; the PDF exporter honours the no-subsetting and bitmap-onlyfsTypebits.bidi-js.Summary of 0.62.0
engine/text.tslaid type out one character at a time. Runs that need it are now shaped by HarfBuzz (harfbuzzjs1.6.4, WebAssembly, loaded only when a document has such text) and lines are reordered by UAX 9 (bidi-js1.1.0). Carets, hit testing, selection and arrow keys work on cluster edges in visual order; the stored text stays logical. Exports carry the shaped result (PDF live type with ToUnicode, outlines elsewhere). Text that needs neither is laid out to the same numbers as before: 3,608 layouts compared equal.FontFileType 1,FontFile2,FontFile3) get outlines by character code from the engine, which now reads Type 1 programs and resolves codes by the PDF's encoding rules; Type0 fonts under an embedded CMap stream are read by their codespace and CID ranges;/W2is followed;/ActualTextsupplies characters a run lacks. ADifferencesname that names nothing is no longer guessed from the code. Right-to-left runs are stored in reading order (the PDF gives visual order), which the new layout needs.tauri-plugin-single-instance2.5.5 on Windows and Linux) and fromRunEvent::Openedon macOS, and the window opens them through the existing opener. The Linux packages gain a desktop template with%Fand a MIME definition, without which a double click passed nothing.formpath.batchains to Python with%*instead of rebuilding the arguments with%1andshift; an npm.cmdshim is started asnodeand its script, and where that is not possible Chat gives the message on standard input. Both old paths could run a command placed after&in quoted text.fsTypeforbids embedding is outlined in an exported PDF with a note; graphic style names in.ai; the one untranslated sentence of 0.61.0 in 25 languages.New dependencies
All permissive, pinned exactly, with rows in
NOTICE.md; nothing is fetched at run time.harfbuzzjs1.6.4 (MIT) andbidi-js1.1.0 (MIT), frontend.harfbuzz.wasm(444 kB) is bundled and loaded on demand; the always-loaded bundle grows by about 8 kB.tauri-plugin-single-instance=2.5.5 (Apache-2.0 or MIT), shell, Windows and Linux only.Cargo.lockgained 33 crates, all MIT or Apache-2.0.adobe-type-tools/mapping-resources-pdfat commit 2dd5e53 (BSD-3-Clause), copied unchanged; each is its own chunk, fetched from the app's own files only when a PDF names that collection.Summary of 0.60.0 and 0.61.0
<FFFD>. The engine gainsPOST /api/fonts/outlines, which reads the embedded font program with fontTools (already a dependency) and returns glyph outlines;pdf-read.tsasks for them when a run has codes with no Unicode value. Limited to two-byte fonts under Identity-H or Identity-V with aFontFile2orFontFile3program. Other cases are still left out and named.<FFFE>/<FFFF>mappings count as broken, and a font the file names in Chinese, Japanese or Korean finds the installed font.Intl.Segmenter), marks stay on their letter, line-start and line-end rules for Chinese and Japanese punctuation, justified lines without spaces, caret index after CRLF.GET /api/fonts/covernames an installed font that has a character, the font menus can be searched.event.keyon Latin layouts (AZERTY, QWERTZ, Dvorak) and the key position elsewhere. The macOS menu bar no longer takes Backspace, Delete and Tab.\M+and%%nnncodes; zip names, OBJ, PSD layer names.add_textandset_textreport characters no installed font draws.Behaviour changes to know about
Commits
One line per commit, oldest first. Hashes are left out: they change when the commits are signed.
Version
v0.63.0 (release commit is last; the 0.60.0, 0.61.0 and 0.62.0 release commits stay in the series). No file under
src-tauri/srcchanged in 0.63.0. Bumped:frontend/package.json,frontend/package-lock.json(both fields),frontend/src/version.ts,backend/app/__init__.py,src-tauri/Cargo.toml,src-tauri/Cargo.lock,src-tauri/tauri.conf.json, the README badge and size line, and aCHANGELOG.mdsection for each version. Files undersrc-tauri/srcchanged in 0.62.0 (main.rs, newopened.rsandlaunch_args.rs).Checks
Run on Linux (Node 22, Python 3.13, Rust 1.97, headless Chromium, WebKitGTK 2.52 under Xvfb), on the final tree:
./formpath check: typecheck, build, engine compile, engine self-check (reports 0.63.0, 93 MCP tools), harness skill in step with the MCP catalogue, the shared dock folder byte for byte against its manifest. Pass.npm test(vitest): 61 pass, 1 skipped.pytest backend/tests: 196 pass.pytest frontend/tests/window(4x CPU throttle, slow network): 2 pass../formpath counts --checkand./formpath i18n check: pass (25 languages, 4131 of 4131).cargo check --lockedfor Linux on the final tree. Run at 0.62.0 and not again, since no Rust source changed after it:cargo clippyandcargo test(4 pass) for Linux; check and clippy forx86_64-pc-windows-gnu;aarch64-apple-darwintype-checked with its C dependencies stubbed. One clippy warning, in code this branch does not touch.ZapfDingbats.pdf,issue2128r.pdfand a browser-printed Arabic, Hebrew and Latin page (50 rows of single letters before, words and lines now);ArabicCIDTrueType.pdfopens as four lines that each read the whole phrase, where it was twelve word objects;noembed-identity.pdfreads its kana andnoembed-identity-2.pdfits heading, both left out before; two files made here gain the two characters their font-less Japan1 run stands for. No replacement character and no console error in any of the 50.vertical-rl(ink overlap 0.50, 0.42, 0.75, from 0.26, 0.24, 0.37; the rest is how turned runs are centred, as before); Urdu in a font without its letters 0.20 to 0.99; exported PDF text in reading order. Seen again in the final build of the combined tree: the vertical columns draw pixel for pixel as on the author's branch; the right-to-left list with tabs and indents, the type on a path and the mixed lines were opened and looked at; the six typed lines are unchanged./mcproute carries the note; the notes show translated in German and Japanese; bracketed paste with stand-ins on a real pseudo-terminal and with the real agent program against a local capture server; the two launchers under Wine 9.0;fsTypebits with copies of DejaVu Sans made by fontTools..debwhose desktop entrygio openfollows.<FFFD>(left out before, drawn now; two replacement characters in 0.59.1);font_ascent_descent.pdf(punctuation guessed from codes before, its heading drawn now);perf_text_cmap_mixed.pdf(blank before, both blocks now);issue8229.pdf("Roztovn nklad" before, "Rozúčtování nákladů" now, aspdftotextgives it);ArabicCIDTrueType.pdf(reads in the orderpdftotextgives and draws joined). 27 other PDFs give the same objects and message in both builds.%cases and exit codes are reasoned only.<FFFD>: 0.59.1 opens the label as a text object reading two replacement characters; 0.60.0 leaves it out and says so; this build draws it as a path that matches a poppler render of the same file, and says which font was kept as shapes.arial_unicode_en_cidfont.pdfandvertical.pdfopened with no type in 0.60.0 and now show it as shapes;noembed-jis7.pdfreads its kana; the Shift-JIS, EUC, GBK and UCS2 files read correctly; 13 ordinary PDFs give the same objects and the same message as before.examples/cjkfolder: Big5, Shift-JIS and vertical JIS type that read as Latin-1 bytes in 0.60.0 reads as Chinese and Japanese. Public .ai files: one with type only on its PDF page now opens with its 12 pieces of type; one with type on neither now says "Left out: type"; files with no type open as before.Not run: a real input method; anything on real Windows or macOS, so the Windows shell, the macOS shell and its opened-file event, the macOS menu change,
formpath.batunder realcmd.exeand a real npm shim are compiled or reasoned, not run; the reporter's own document; Illustrator, Photoshop or AutoCAD opening what FormPath writes; a DWG converter (none installed).Not done, and still open under #17:
bidi-js1.1.0 is the newest release); the log lists what differs from Unicode 17..aiwriter's title and gradient names outside ASCII: more than thirty public repositories searched, none holds a file that shows the form.i18n extracton the untouched tree adds 186 keys and drops 8 that are in use; that was so before this branch and is left.The three demos are not rebuilt and still say 0.59.0.
Merging
Merge with a merge commit so each commit and its signature stays. Do not squash.