Repository navigation
Conversation
Expose FnMut callbacks using Buffer and ShaperFont, and present substitution snapshots without changing live shaping state. Complete the tracing feature, CLI output, regression coverage, documentation, and no_std CI builds.
Closed
Member
Author
|
This should be ready for review. |
behdad
commented
Oct 13, 2026
| `false` from a skippable `start` message to skip that operation. Per-glyph and | ||
| recursion messages are informational and ignore the return value. Mutable closures | ||
| are supported; callbacks own their captures and must be `Send + Sync + 'static`. | ||
| Use `buffer.clear_message_function()` to remove a callback. |
Member
Author
There was a problem hiding this comment.
Should set_message_function instead take an option?
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.
Add opt-in HarfBuzz shaping messages through
Buffer::set_message_functionandhr-shape --trace. This completes Simon Cozens's implementation from #280 and rebases it onto the current public buffer and font APIs.tracingCargo feature, disabled by default. Supportno_stdwithlibm. Include the detailed per-glyph and recursion messages that HarfBuzz enables withHB_BUFFER_MESSAGE_MORE=1.FnMut + Send + Sync + 'staticcallbacks receiving the publicBuffer,ShaperFont, and message. Returningfalsefrom a skippable start message skips that operation; per-glyph and recursion notifications ignore the return value. Callbacks survive buffer reuse and can be replaced or removed.Audited message sites, callback return handling, and text serialization against HarfBuzz source at c82300aefb. Corrected normalization boundaries, recursion notifications, kerning boundaries and zero-based subtable numbers,
mortlabels, lookup skip reporting, tag formatting, message truncation, and trace line formatting. This was a source audit; no HarfBuzz runtime output comparison was performed.Validation: workspace tests pass with and without ICU (6,524 tests in each configuration), including 13 callback tests, CLI trace formatting and stream routing, and checks that tracing preserves shaping results across the existing corpus. Formatting and Clippy (
--all-features --all-targets, warnings denied) pass, including Clippy on Rust 1.99. Rust 1.85 workspace and embeddedno_stdbuilds pass with tracing enabled and disabled; C++ compatibility checks pass. CI builds both tracing configurations explicitly.Supersedes #280. Fixes #245.