Skip to content

Commit

Permalink
Flatten
Browse files Browse the repository at this point in the history
  • Loading branch information
rsheeter committed Apr 19, 2023
1 parent 9df4b92 commit 3414eb0
Show file tree
Hide file tree
Showing 3 changed files with 214 additions and 98 deletions.
11 changes: 9 additions & 2 deletions fontc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,14 @@ fn add_finalize_static_metadata_ir_job(
.collect();
dependencies.insert(FeWorkIdentifier::InitStaticMetadata.into());

// Grant write to any glyph including ones we've never seen before so job can create them
// Finalize may create new glyphs so allow read/write to *all* glyphs
let read_access = Access::custom(|an_id: &AnyWorkId| {
matches!(
an_id,
AnyWorkId::Fe(FeWorkIdentifier::Glyph(..))
| AnyWorkId::Fe(FeWorkIdentifier::InitStaticMetadata)
)
});
let write_access = Access::custom(|an_id: &AnyWorkId| {
matches!(
an_id,
Expand All @@ -112,7 +119,7 @@ fn add_finalize_static_metadata_ir_job(
Job {
work: create_finalize_static_metadata_work().into(),
dependencies,
read_access: ReadAccess::Dependencies,
read_access: ReadAccess::Custom(read_access),
write_access,
},
);
Expand Down
Loading

0 comments on commit 3414eb0

Please sign in to comment.