Skip to main content

harfrust/hb/
ot_shaper_arabic_table.rs

1/* == Start of generated table == */
2/*
3 * The following table is generated by running:
4 *
5 *   ./gen-arabic-table.py --rust ArabicShaping.txt UnicodeData.txt Blocks.txt
6 *
7 * on files with these headers:
8 *
9 * # ArabicShaping-17.0.0.txt
10 * # Date: 2025-08-14
11 * # Blocks-17.0.0.txt
12 * # Date: 2025-08-01
13 * UnicodeData.txt does not have a header.
14 */
15
16#![allow(unused_parens)]
17#![allow(clippy::unnecessary_cast, clippy::unreadable_literal, clippy::double_parens)]
18
19use crate::hb::unicode::Codepoint;
20
21use super::ot_shaper_arabic::hb_arabic_joining_type_t::{self, D, GroupAlaph, GroupDalathRish, L, R, T, U, X};
22
23#[allow(dead_code, non_upper_case_globals, clippy::allow_attributes_without_reason, missing_docs)]
24pub(crate) static _hb_arabic_joining_u8: [u8; 737]=
25[
26    0, 16,  2,  0,  0,  0,  3,  0,  4,  0,  0,  0,  0,  0,  0,  0,
27    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
28    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,  0,  0,  0,
29    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
30    0,  0, 96,135,  9,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
31    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
32    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
33    0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 10,  0,  0,  0,  0,  0,
34    0,  0,  0,  8, 16, 24, 32, 40, 48,  0, 56,  0, 64, 72, 80,  0,
35    0,  0,  0, 88, 96,104,  0,  0,  0,  0,  0,112,120,  0,  0,  0,
36    0,  0,  0,  0,128,  0,  0,  0,  0,  0,  0,  0,  0,  0,136,  0,
37    0,144,  0,  0,  0,  0,  0,152,  0,  0,  0,  0,  0,  0,160,168,
38  176,184,192,  0,  0,200,208,  0,  0,  0,  0,  0,  0,  0,  0,216,
39  224,  0,  0,  0,  0,  0,  0,  0,  0,  8,  9,  0,  0, 10, 11, 12,
40    1,  1, 13,  0,  0,  0, 14, 15,  1,  1,  2,  2,  4,  1,  1,  1,
41    1, 16, 17, 18,  3,  0, 19,  0, 20,  0, 21, 22, 23,  1, 24,  0,
42    0,  0, 25,  1, 26,  1, 27, 28,  4,  0, 29,  1,  1,  1, 30,  0,
43   31, 32,  5, 33, 34, 35, 36,  2,  2, 37, 38,  6,  0,  1, 39, 40,
44    5,  1,  7,  0,  0, 41,  0,  0,  0, 42, 43,  0,  0,  1,  1,  1,
45    1,  1,  1,  1,  1,  1,  1,  1,  7, 44,  1,  1,  1,  1, 45,  0,
46    0,  0, 46,  0,  0,  0, 47,  0,  0,  0,  0,  0,  0, 48,  6,  0,
47    0,  1,  1,  1,  1,  1,  1, 49,  0, 50, 51, 52, 53, 54, 55,  0,
48    0, 56, 57, 58,  0,  0, 59,  0,  0, 60,  1,  1,  1, 61,  0,  0,
49    0, 62,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 63,
50    1, 64,  0, 65,  0,  0,  0, 66,  1, 67,  0,  0,  0,  0,  0, 68,
51   69, 70, 71,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
52    3,  0,  3,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1,  1,  1,
53    1, 72, 73,  0,  0,  0,  0,  0,  0,119,119,119,119, 51, 51, 51,
54   51, 34, 34, 34, 34,119,119,  7,119, 34, 51, 51, 51, 35, 51, 51,
55   51,  0,119,119,119,115,119,119,119,  0,  0,  0,119,112,  7,119,
56  119,  3, 34, 34, 35, 35, 51, 51, 35, 34, 50, 51, 51, 50,115,119,
57  119,119,119,119, 51, 39, 34, 32, 34, 50, 35, 34, 34, 34, 34, 35,
58   35, 51, 34, 39,119,119,119,119, 34,119, 51,115, 55,119,119,119,
59  103,116, 51, 83, 37, 34, 51, 51, 50, 50, 53, 50, 83,119,119, 39,
60   51, 35, 34, 51, 51, 51, 35, 50, 51, 35, 35, 50, 51,119, 51, 51,
61   51, 51,115,119,119,119,115,119,119, 50, 51, 51, 34, 51, 51, 50,
62   34,114,119,119,119,  3, 51, 51, 32, 35,114,119,119, 34, 50, 51,
63    3, 48, 51, 51, 50, 51, 34,  2, 50, 35, 50, 51, 51,119,112,119,
64  119,119,119,119, 48,119,115,119,112,  0,  0, 96, 54,115,115,119,
65  119,119,119, 48,119,119,119,119,  7,119,119,119,  0, 51,  1,119,
66  119, 51, 51, 35, 32, 32,  2, 16, 34, 34, 50, 51, 19, 51, 51, 35,
67   51, 35,  0,114,119,119, 55, 51, 35, 35, 35, 34, 51, 35, 51, 50,
68   34, 35,119,119,119, 39, 34, 50,  3, 49, 51, 51, 51, 51, 50,119,
69  119,119, 50,115, 51, 51, 35, 51, 51, 51, 51,  3,119, 55, 51,114,
70  119, 51, 51, 34, 51, 51,119,119,119,  3, 51, 34,  2, 35, 50, 35,
71   51, 48, 34,  3,  0, 32, 19,119,119, 51, 51,119,119,119,103,119,
72  119,
73];
74
75#[allow(dead_code, unused_parens, trivial_numeric_casts, clippy::allow_attributes_without_reason, clippy::unseparated_literal_suffix, clippy::double_parens, clippy::unnecessary_cast)]
76#[inline(always)]
77fn _hb_arabic_joining_b4 (a: &[u8], i: usize) -> u8
78{
79  (a[i>>1]>>((i&1)<<2))&15
80}
81#[allow(dead_code, unused_parens, trivial_numeric_casts, clippy::allow_attributes_without_reason, clippy::unseparated_literal_suffix, clippy::double_parens, clippy::unnecessary_cast, missing_docs)]
82#[inline]
83pub(crate) fn _hb_arabic_joining_joining_type_u8 (u: usize) -> u8
84{
85  /* packtab: [2^4,2^3,2^3,2^3] */
86  if u<125260usize { (_hb_arabic_joining_b4(&_hb_arabic_joining_u8[441usize..],(((_hb_arabic_joining_u8[209usize+(((_hb_arabic_joining_u8[123usize+((((_hb_arabic_joining_b4(&_hb_arabic_joining_u8,(((((((u)>>3))>>3))>>3) as usize) as usize)) as usize)<<3) as usize+((((((u)>>3))>>3))&7) as usize) as usize]) as usize) as usize+((((u)>>3))&7) as usize) as usize]) as usize)<<3) as usize+((u)&7) as usize)) as u8 } else { 7 }
87}
88
89#[inline]
90pub(crate) fn joining_type (u: Codepoint) -> hb_arabic_joining_type_t
91{
92  match _hb_arabic_joining_joining_type_u8 (u as usize) {
93    0 => U,
94    1 => L,
95    2 => R,
96    3 => D,
97    4 => GroupAlaph,
98    5 => GroupDalathRish,
99    6 => T,
100    7 => X,
101    _ => unreachable! (),
102  }
103}
104
105
106/* == End of generated table == */