Skip to content

Commit

Permalink
Add changes to complex shaping
Browse files Browse the repository at this point in the history
  • Loading branch information
bluebear94 committed Aug 18, 2023
1 parent 247e240 commit 5efcdcb
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/complex/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ pub fn complex_categorize(

// Unicode-6.1 additions
| script::CHAKMA
| script::MIAO
| script::SHARADA
| script::TAKRI

Expand All @@ -292,6 +293,7 @@ pub fn complex_categorize(

// Unicode-8.0 additions
| script::AHOM
| script::MULTANI

// Unicode-9.0 additions
// | script::ADLAM
Expand All @@ -309,10 +311,15 @@ pub fn complex_categorize(
| script::GUNJALA_GONDI
// | script::HANIFI_ROHINGYA
| script::MAKASAR
| script::MEDEFAIDRIN
| script::OLD_SOGDIAN
// | script::SOGDIAN

// Unicode-12.0 additions
| script::ELYMAIC
| script::NANDINAGARI
| script::NYIAKENG_PUACHUE_HMONG
| script::WANCHO

// Unicode-13.0 additions
| script::CHORASMIAN
Expand Down
2 changes: 1 addition & 1 deletion src/complex/universal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ fn setup_topographical_masks(plan: &ShapePlan, buffer: &mut Buffer) {
let syllable = buffer.info[start].syllable() & 0x0F;
if syllable == SyllableType::IndependentCluster as u8 ||
syllable == SyllableType::SymbolCluster as u8 ||
syllable == SyllableType::HieroglyphCluster as u8 ||
syllable == SyllableType::NonCluster as u8
{
last_form = None;
Expand Down Expand Up @@ -402,7 +403,6 @@ const fn category_flag64(c: Category) -> u64 {
}

const BASE_FLAGS: u64 =
category_flag64(category::FM) |
category_flag64(category::FABV) |
category_flag64(category::FBLW) |
category_flag64(category::FPST) |
Expand Down
1 change: 1 addition & 0 deletions src/complex/universal_machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ pub enum SyllableType {
NumberJoinerTerminatedCluster,
NumeralCluster,
SymbolCluster,
HieroglyphCluster,
BrokenCluster,
NonCluster,
}
Expand Down
2 changes: 1 addition & 1 deletion src/complex/vowel_constraints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ pub fn preprocess_text_vowel_constraints(buffer: &mut Buffer) {
matched = 0x0DD8 == buffer.cur(1).glyph_id;
}
0x0D91 => match buffer.cur(1).glyph_id {
0x0DCA | 0x0DD9 | 0x0DDA | 0x0DDC | 0x0DDD => {
0x0DCA | 0x0DD9 | 0x0DDA | 0x0DDC | 0x0DDD | 0x0DDE => {
matched = true;
}
_ => {}
Expand Down
4 changes: 4 additions & 0 deletions src/tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ fn tags_from_language(
break;
}

if LANGUAGES[idx + i].tag.is_null() {
break;
}

if tags.is_full() {
break;
}
Expand Down

0 comments on commit 5efcdcb

Please sign in to comment.