Repository navigation
KC-102: pdfTeX microtype model (protrusion + font expansion) - #86
Merged
Merged
Conversation
New crate crates/microtype (no dependencies, never runs TeX): - config: parses microtype.cfg / mt-cmr.cfg (bundled unmodified, LPPL) and resolves per NFSS font the \lpcode/\rpcode/\efcode tables and \pdffontexpand limits exactly as microtype v3.2d does (font sets, list lookup order with family aliases, load= chains, T1 inheritance, \MT@scale rounding). Verified slot-for-slot against pdfTeX dumps for 96 fonts. - pdftex: protrusion (char_pw), char/kern stretch and shrink, the try_break shortfall rule, hpack's cal_expand_ratio and per-glyph expansion, transcribed from pdftex.web 1.40.27 and utils.c. - arith: pdfTeX/e-TeX integer arithmetic. - tests/common: reference pdfTeX line_break + post_line_break + hpack. - tests/oracle: 32 pdflatex fixtures (EC and Latin Modern, 10/11/12pt, none/protrusion/expansion/both). All 32: identical breaks, identical per-glyph expansion, identical margin kerns, glyph x error <= 0.00018pt. MT_MUTATE switches show each pdfTeX rule is needed. - CONTRACT.md: proposed hooks for paragraph-layout and render-pipeline, and the HW1/HW2 with/without-microtype delta (HW1: no break changes; HW2: two paragraphs reflow, 80 -> 79 lines). Implementation-Agent: Claude Opus 5 (subagent kabir-claude KC-102, mac-m5pro-kabir) Commit-Executor: Claude Code direct Git Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
Member
|
Merged to main via integration/2026-09-13c (Commander orchestrator-jaysen-claude); hermetic library, tests green. |
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.
New crate crates/microtype (owned paths only; no other crates touched).
cargo test in crates/microtype; regenerate fixtures with tests/oracle/generate.py (pdflatex oracle only).
🤖 Generated with Claude Code
https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu