Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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."
Expand Down
8 changes: 5 additions & 3 deletions src/styling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
Expand Down
Loading