Skip to content

Commit

Permalink
Rename LookupRecord to Action in context
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanUkhov committed Aug 30, 2024
1 parent 4986678 commit 26387e0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "opentype"
version = "0.37.1"
version = "0.38.0"
edition = "2021"
license = "Apache-2.0/MIT"
authors = [
Expand Down
44 changes: 22 additions & 22 deletions src/layout/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ table! {
pub Context3 { // SequenceContextFormat3
format (u16), // format
glyph_count (u16), // glyphCount
record_count (u16), // seqLookupCount
action_count (u16), // seqLookupCount

coverage_offsets (Vec<u16>) |this, tape, _| { // coverageOffsets
tape.take_given(this.glyph_count as usize)
},

records (Vec<LookupRecord>) |this, tape, _| { // seqLookupRecords
tape.take_given(this.record_count as usize)
actions (Vec<Action>) |this, tape, _| { // seqLookupRecords
tape.take_given(this.action_count as usize)
},

coverages (Vec<Coverage>) |this, tape, position| {
Expand Down Expand Up @@ -180,10 +180,10 @@ table! {
tape.take_given(this.forward_glyph_count as usize)
},

record_count (u16), // seqLookupCount
action_count (u16), // seqLookupCount

records (Vec<LookupRecord>) |this, tape, _| { // seqLookupRecords
tape.take_given(this.record_count as usize)
actions (Vec<Action>) |this, tape, _| { // seqLookupRecords
tape.take_given(this.action_count as usize)
},

backward_coverages (Vec<Coverage>) |this, tape, position| {
Expand All @@ -204,7 +204,7 @@ table! {
/// A context record.
pub Record { // SequenceRule
glyph_count (u16), // glyphCount
record_count (u16), // seqLookupCount
action_count (u16), // seqLookupCount

glyph_ids (Vec<GlyphID>) |this, tape| { // inputSequence
if this.glyph_count == 0 {
Expand All @@ -213,8 +213,8 @@ table! {
tape.take_given(this.glyph_count as usize - 1)
},

records (Vec<LookupRecord>) |this, tape| { // seqLookupRecords
tape.take_given(this.record_count as usize)
actions (Vec<Action>) |this, tape| { // seqLookupRecords
tape.take_given(this.action_count as usize)
},
}
}
Expand All @@ -239,7 +239,7 @@ table! {
/// A class context record.
pub ClassRecord { // ClassSequenceRule
glyph_count (u16), // glyphCount
record_count (u16), // seqLookupCount
action_count (u16), // seqLookupCount

indices (Vec<u16>) |this, tape| { // inputSequence
if this.glyph_count == 0 {
Expand All @@ -248,8 +248,8 @@ table! {
tape.take_given(this.glyph_count as usize - 1)
},

records (Vec<LookupRecord>) |this, tape| { // seqLookupRecords
tape.take_given(this.record_count as usize)
actions (Vec<Action>) |this, tape| { // seqLookupRecords
tape.take_given(this.action_count as usize)
},
}
}
Expand Down Expand Up @@ -294,10 +294,10 @@ table! {
tape.take_given(this.forward_glyph_count as usize)
},

record_count (u16), // seqLookupCount
action_count (u16), // seqLookupCount

records (Vec<LookupRecord>) |this, tape| { // seqLookupRecords
tape.take_given(this.record_count as usize)
actions (Vec<Action>) |this, tape| { // seqLookupRecords
tape.take_given(this.action_count as usize)
},
}
}
Expand Down Expand Up @@ -342,10 +342,10 @@ table! {
tape.take_given(this.forward_glyph_count as usize)
},

record_count (u16), // seqLookupCount
action_count (u16), // seqLookupCount

records (Vec<LookupRecord>) |this, tape| { // seqLookupRecords
tape.take_given(this.record_count as usize)
actions (Vec<Action>) |this, tape| { // seqLookupRecords
tape.take_given(this.action_count as usize)
},
}
}
Expand All @@ -367,11 +367,11 @@ table! {
}

table! {
/// A lookup context record.
/// A contextual action.
#[derive(Copy)]
pub LookupRecord { // SequenceLookupRecord
index (u16), // sequenceIndex
lookup_index (u16), // lookupListIndex
pub Action { // SequenceLookupRecord
position_index (u16), // sequenceIndex
lookup_index (u16), // lookupListIndex
}
}

Expand Down

0 comments on commit 26387e0

Please sign in to comment.