From b06a3e00c978882c2dd3222affea6826283d367c Mon Sep 17 00:00:00 2001 From: OverflowCat Date: Tue, 5 May 2026 11:45:50 +0800 Subject: [PATCH 1/2] Add Tibetan numerals --- CHANGELOG.md | 1 + src/numeral_systems.rs | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dbaf2c..3b2587e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Trivially updated to Unicode 17.0.0 - Added numeral systems API under the `numeral-systems` feature flag +- Added Tibetan numerals to `numeral-systems`. ### New in `sym` diff --git a/src/numeral_systems.rs b/src/numeral_systems.rs index 35716c5..39ce4ac 100644 --- a/src/numeral_systems.rs +++ b/src/numeral_systems.rs @@ -442,6 +442,20 @@ declare_named! { /// > ०, १, २, ३, ४, ५, ६, ७, ८, ९, १०, ११ Devanagari = "devanagari" ("१"), + /// Decimal positional notation using + /// [Tibetan numerals](https://en.wikipedia.org/wiki/Tibetan_numerals). + /// + /// ## Representable Numbers + /// + /// All non-negative integers can be represented. + /// + /// ## Example + /// + /// The first twelve non-negative integers are represented as follows: + /// + /// > ༠, ༡, ༢, ༣, ༤, ༥, ༦, ༧, ༨, ༩, ༡༠, ༡༡ + Tibetan = "tibetan" ("༡"), + /// Decimal positional notation using /// [Bengali numerals](https://en.wikipedia.org/wiki/Bengali_numerals). /// @@ -816,6 +830,10 @@ impl NamedNumeralSystem { '०', '१', '२', '३', '४', '५', '६', '७', '८', '९', ]), + Self::Tibetan => NumeralSystem::Positional(&[ + '༠', '༡', '༢', '༣', '༤', '༥', '༦', '༧', '༨', '༩', + ]), + Self::Bengali => NumeralSystem::Positional(&[ '০', '১', '২', '৩', '৪', '৫', '৬', '৭', '৮', '৯', ]), @@ -1419,6 +1437,7 @@ mod tests { NamedNumeralSystem::EasternArabic => 277754701051910363703826860323053920831, NamedNumeralSystem::Persian => 6232158096065129450489636457808686806, NamedNumeralSystem::Devanagari => 327133969362282954753636774557232534052, + NamedNumeralSystem::Tibetan => 87580519645280744681237273097105390953, NamedNumeralSystem::Bengali => 79096832028418218544110224478554962928, NamedNumeralSystem::BengaliLetters => 269999388716378396079918080520770981179, NamedNumeralSystem::Symbols => 88780534058354093087932015985325954737, From 4b7a5b732cc6fe7d482822827e499ca7f3ef10ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=A1=A5=E1=A0=A0=E1=A1=B3=E1=A1=A4=E1=A1=B3=E1=A0=B6?= =?UTF-8?q?=E1=A0=A0=20=E1=A1=A5=E1=A0=A0=E1=A0=AF=E1=A0=A0=C2=B7=E1=A0=A8?= =?UTF-8?q?=E1=A1=9D=E1=A1=B4=E1=A0=A3=20=E7=8C=AB?= Date: Fri, 8 May 2026 20:11:13 +0800 Subject: [PATCH 2/2] Update CHANGELOG.md Co-authored-by: Malo <57839069+MDLC01@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b2587e..200b515 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ - Trivially updated to Unicode 17.0.0 - Added numeral systems API under the `numeral-systems` feature flag -- Added Tibetan numerals to `numeral-systems`. + - Compared to Typst 0.14.2, added Tibetan numerals to `numeral-systems`. ### New in `sym`