From 34b55aa04e35b1a2a42e3169c1251ee7fcc74986 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/2] 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 66d965d28758d238b57984e4fa8ac4d7d529b46f 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/2] 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 1e777743..f7386c9a 100644 --- a/src/styling.rs +++ b/src/styling.rs @@ -265,7 +265,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, @@ -448,8 +448,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 { @@ -495,6 +495,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,