Skip to content

Commit

Permalink
Merge pull request #678 from googlefonts/stabby
Browse files Browse the repository at this point in the history
Fix the order of BE kern gathering
  • Loading branch information
cmyr authored Jan 13, 2024
2 parents fc9584d + aec4bdf commit 8ef01ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 1 addition & 4 deletions fontbe/src/kern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,7 @@ impl Work<Context, AnyWorkId, Error> for KerningGatherWork {
}

fn read_access(&self) -> Access<AnyWorkId> {
AccessBuilder::new()
.variant(WorkId::GatherIrKerning) // until this runs there are no kern fragments to await
.variant(WorkId::KernFragment(0))
.build()
Access::Unknown // https://github.com/googlefonts/fontc/issues/647: don't enable until KernFragment's spawn
}

fn exec(&self, context: &Context) -> Result<(), Error> {
Expand Down
9 changes: 9 additions & 0 deletions fontc/src/workload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,15 @@ impl<'a> Workload<'a> {
for work in create_kern_segment_work(&kern_pairs) {
self.add(work.into(), true);
}

// https://github.com/googlefonts/fontc/issues/647: it is now safe to set read access on segment gathering
self.jobs_pending
.get_mut(&AnyWorkId::Be(BeWorkIdentifier::GatherBeKerning))
.expect("Gather BE Kerning has to be pending")
.read_access = AccessBuilder::<AnyWorkId>::new()
.variant(BeWorkIdentifier::KernFragment(0))
.build()
.into();
}

if let AnyWorkId::Fe(FeWorkIdentifier::Glyph(glyph_name)) = success {
Expand Down

0 comments on commit 8ef01ff

Please sign in to comment.