From 4d018404c607f87d800e6b421e2075f44ade7ccb Mon Sep 17 00:00:00 2001 From: Malo <57839069+MDLC01@users.noreply.github.com> Date: Thu, 24 Sep 2026 14:54:59 +0200 Subject: [PATCH 1/4] Bump MSRV to 1.92 --- .github/workflows/ci.yml | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0321283b..0a7745de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - - uses: dtolnay/rust-toolchain@e814c742d4444ce2f3f6abddea7faf00161ed941 # 1.88.0 + - uses: dtolnay/rust-toolchain@87eb139fed4b08a67bd1fa429a21d1f5d523e03e # 1.92.0 - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 - run: cargo test --workspace --all-features --no-run - run: cargo test --workspace --all-features --no-fail-fast @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - - uses: dtolnay/rust-toolchain@e814c742d4444ce2f3f6abddea7faf00161ed941 # 1.88.0 + - uses: dtolnay/rust-toolchain@87eb139fed4b08a67bd1fa429a21d1f5d523e03e # 1.92.0 with: components: clippy, rustfmt - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 diff --git a/Cargo.toml b/Cargo.toml index 527944ec..38686a18 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "codex" version = "0.3.0" -rust-version = "1.88" # also change in ci.yml +rust-version = "1.92" # also change in ci.yml authors = ["The Typst Project Developers"] edition = "2024" description = "Human-friendly notation for Unicode symbols." From 11b196cd2b6b492d44ba5d21110c0c8f31352004 Mon Sep 17 00:00:00 2001 From: Malo <57839069+MDLC01@users.noreply.github.com> Date: Thu, 24 Sep 2026 14:56:19 +0200 Subject: [PATCH 2/4] Add styling support for Unicode 18.0's LATIN SMALL LIGATURE LONG S WITH DESCENDER S --- src/styling.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/styling.rs b/src/styling.rs index 822225bb..3d0ce3eb 100644 --- a/src/styling.rs +++ b/src/styling.rs @@ -266,7 +266,7 @@ impl MathStyle { (_, true, None) if is_latin(c) | is_lower_greek(c) => MathStyle::BoldItalic, (_, true, None) if is_upper_greek(c) => MathStyle::Bold, (_, true, _) if is_digit(c) | matches!(c, 'Ϝ' | 'ϝ') => MathStyle::Bold, - (_, _, Some(true) | None) if matches!(c, 'ı' | 'ȷ' | 'ħ') => { + (_, _, Some(true) | None) if matches!(c, 'ı' | 'ȷ' | 'ħ' | '𝾕') => { MathStyle::Italic } (_, _, Some(true) | None) if is_hebrew(c) => MathStyle::Hebrew, @@ -472,8 +472,8 @@ mod conversions { /// The character given by adding `delta` to the codepoint of `c`. #[inline] - fn apply_delta(c: char, delta: u32) -> char { - std::char::from_u32((c as u32) + delta).unwrap() + fn apply_delta(c: char, delta: i32) -> char { + std::char::from_u32((c as u32).strict_add_signed(delta)).unwrap() } pub fn to_bold(c: char) -> char { @@ -519,6 +519,8 @@ mod conversions { // Dotless symbols (U+1D6A4..U+1D6A5) 'ı' => 0x1D573, 'ȷ' => 0x1D46E, + // Additional Latin symbol (U+1D6A6) + '𝾕' => -0x8EF, // Italic Greek symbols (U+1D6E2..U+1D714) 'Α'..='Ρ' => 0x1D351, 'ϴ' => 0x1D2FF, From cb76b6c276c1841b198395971b6807919ff81774 Mon Sep 17 00:00:00 2001 From: Malo <57839069+MDLC01@users.noreply.github.com> Date: Thu, 8 Oct 2026 15:12:50 +0200 Subject: [PATCH 3/4] Apply suggestions --- src/styling.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/styling.rs b/src/styling.rs index 3d0ce3eb..09e99236 100644 --- a/src/styling.rs +++ b/src/styling.rs @@ -67,7 +67,8 @@ pub enum MathStyle { Bold, /// Italic style. May be serif or sans-serif depending on the font. /// - /// Supported characters: latin, greek, dotless, and the extra ħ (U+0127). + /// Supported characters: latin, greek, dotless, and the extra ħ (U+0127) + /// and 𝾕 (U+1DF95). Italic, /// Bold italic style. May be serif or sans-serif depending on the font. /// @@ -519,7 +520,7 @@ mod conversions { // Dotless symbols (U+1D6A4..U+1D6A5) 'ı' => 0x1D573, 'ȷ' => 0x1D46E, - // Additional Latin symbol (U+1D6A6) + // Ligature long s (U+1D6A6) '𝾕' => -0x8EF, // Italic Greek symbols (U+1D6E2..U+1D714) 'Α'..='Ρ' => 0x1D351, @@ -880,7 +881,7 @@ mod conversions { 'Γ' => 0x1DAB, 'Π' => 0x1D9F, // Double-struck large operator (U+2140) - '∑' => return '⅀', // delta is negative + '∑' => -0xD1, // delta is negative // Mathematical Alphanumeric Symbols Block (U+1D400..U+1D7FF) // Double-struck symbols (U+1D538..U+1D56B) From 138f8874440021733c714ab96a5389772aa426d8 Mon Sep 17 00:00:00 2001 From: Malo <57839069+MDLC01@users.noreply.github.com> Date: Mon, 12 Oct 2026 11:18:36 +0200 Subject: [PATCH 4/4] Update Unicode version of styling module --- src/styling.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/styling.rs b/src/styling.rs index 09e99236..17055773 100644 --- a/src/styling.rs +++ b/src/styling.rs @@ -5,7 +5,7 @@ use std::iter::FusedIterator; /// The version of [Unicode](https://www.unicode.org/) that this version of the /// styling module is based on. -pub const UNICODE_VERSION: (u8, u8, u8) = (17, 0, 0); +pub const UNICODE_VERSION: (u8, u8, u8) = (18, 0, 0); /// A style for mathematical symbols. /// @@ -414,7 +414,7 @@ pub fn to_style(c: char, style: MathStyle) -> ToStyle { /// All functions in this module expect that characters have been normalized /// through [`conversions::normalize`]. /// -/// [Unicode Core Specification - Section 22.2, Letterlike Symbols]: +/// [Unicode Core Specification - Section 22.2, Letterlike Symbols]: /// [Letterlike Symbols]: /// [Mathematical Alphanumeric Symbols]: /// [Arabic Mathematical Alphabetic Symbols]: