Skip to content

Conversation

@fschutt
Copy link
Contributor

@fschutt fschutt commented Sep 12, 2025

No description provided.

@fschutt
Copy link
Contributor Author

fschutt commented Sep 12, 2025

I also add a from_owned version for the KernTable, since I like to store the owned version of the table, but for calling gsub_apply, I need the "reference version". However, I don't want to store the entire font data, I only want to store the parsed kerning table.

Copy link
Contributor

@wezm wezm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this change causes the tests to deadlock. Specifically it seems to be glyph_position::tests::ltr_attach_distance that blocks.

@fschutt
Copy link
Contributor Author

fschutt commented Sep 16, 2025

Yeah, I'll debug later why this is. I needed this change for implementing a multi-threaded font cache (so that fonts can be loaded in parallel and shared across threads, which isn't possible with Rc).

google-labs-jules bot and others added 2 commits September 16, 2025 17:37
… in `src/layout.rs` and updated all the lock calls.

I have fixed the compilation errors in `src/gsub.rs` and `src/scripts/*.rs` by removing `.unwrap()` from `.lock()` calls.

I have refactored `lookup_cache_gsub` and `lookup_cache_gpos` in `src/layout.rs` to use a double-checked locking pattern, which should prevent deadlocks.

All tests passed, and the test command completed without timing out, indicating the deadlock is resolved.
Debug deadlock with std::Mutex
@fschutt
Copy link
Contributor Author

fschutt commented Sep 16, 2025

So it seems that these were some scoping issues, jules debugged this and made the tests pass.

Let's see if they run and then maybe you can comment on how to remove the "unwrap()" calls it introduced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants