diff --git a/crates/math-core/src/commands.rs b/crates/math-core/src/commands.rs index 531f34fd..6f56cfe0 100644 --- a/crates/math-core/src/commands.rs +++ b/crates/math-core/src/commands.rs @@ -28,7 +28,7 @@ static COMMANDS: phf::Map<&'static str, Token> = phf::phf_map! { "." => TextMode(TextToken::Accent(symbol::COMBINING_DOT_ABOVE.as_op().as_char())), ":" => MathOrTextMode(&Space(LatexUnit::Mu.length_with_unit(4.0)), '\u{205F}'), ";" => MathOrTextMode(&Space(LatexUnit::Mu.length_with_unit(5.0)), '\u{2004}'), - "=" => TextMode(TextToken::Accent(symbol::COMBINING_OVERLINE)), + "=" => TextMode(TextToken::Accent(symbol::COMBINING_OVERLINE.as_op().as_char())), ">" => MathOrTextMode(&Space(LatexUnit::Mu.length_with_unit(4.0)), '\u{205F}'), "AA" => TextMode(TextToken::Letter('Å')), "AE" => TextMode(TextToken::Letter('Æ')), @@ -142,7 +142,7 @@ static COMMANDS: phf::Map<&'static str, Token> = phf::phf_map! { "backsimeq" => Relation(symbol::REVERSED_TILDE_EQUALS), "backslash" => Ord(symbol::REVERSE_SOLIDUS), "backtrprime" => Ord(symbol::REVERSED_TRIPLE_PRIME), - "bar" => Accent(symbol::LOW_LINE, true, OpAttrs::STRETCHY_FALSE), + "bar" => Accent(symbol::COMBINING_MACRON, true, OpAttrs::empty()), "barwedge" => BinaryOp(symbol::NAND), "bcancel" => Enclose(Notation::DOWN_DIAGONAL), "because" => Relation(symbol::BECAUSE), diff --git a/crates/math-core/tests/snapshots/wiki_test__wiki007.snap b/crates/math-core/tests/snapshots/wiki_test__wiki007.snap index cdcdfdc4..8e73dfe6 100644 --- a/crates/math-core/tests/snapshots/wiki_test__wiki007.snap +++ b/crates/math-core/tests/snapshots/wiki_test__wiki007.snap @@ -20,6 +20,6 @@ expression: "\\check{a}, \\breve{a}, \\tilde{a}, \\bar{a}" , a - _ + ̄ diff --git a/crates/math-core/tests/snapshots/wiki_test__wiki112.snap b/crates/math-core/tests/snapshots/wiki_test__wiki112.snap index 76cccae9..8b02b586 100644 --- a/crates/math-core/tests/snapshots/wiki_test__wiki112.snap +++ b/crates/math-core/tests/snapshots/wiki_test__wiki112.snap @@ -10,7 +10,7 @@ expression: "\\hat a \\ \\bar b \\ \\vec c \\\\ \\overrightarrow{a b} \\ \\overl b - _ + ̄ diff --git a/crates/math-core/tests/snapshots/wiki_test__wiki212.snap b/crates/math-core/tests/snapshots/wiki_test__wiki212.snap index 79d97ebd..3505dbc9 100644 --- a/crates/math-core/tests/snapshots/wiki_test__wiki212.snap +++ b/crates/math-core/tests/snapshots/wiki_test__wiki212.snap @@ -6,7 +6,7 @@ expression: "|\\bar{z}| = |z|, |(\\bar{z})^n| = |z|^n, \\arg(z^n) = n \\arg(z)" | z - _ + ̄ | = @@ -18,7 +18,7 @@ expression: "|\\bar{z}| = |z|, |(\\bar{z})^n| = |z|^n, \\arg(z^n) = n \\arg(z)" ( z - _ + ̄ ) diff --git a/crates/mathml-renderer/src/symbol.rs b/crates/mathml-renderer/src/symbol.rs index 5518f9d5..01229740 100644 --- a/crates/mathml-renderer/src/symbol.rs +++ b/crates/mathml-renderer/src/symbol.rs @@ -363,8 +363,8 @@ pub const COMBINING_GRAVE_ACCENT: Rel = Rel::new('\u{300}', RelCategory::Default pub const COMBINING_ACUTE_ACCENT: Rel = Rel::new('\u{301}', RelCategory::Default); pub const COMBINING_CIRCUMFLEX_ACCENT: Rel = Rel::new('\u{302}', RelCategory::Default); pub const COMBINING_TILDE: Rel = Rel::new('\u{303}', RelCategory::Default); -// pub const COMBINING_MACRON: char = '\u{304}'; -pub const COMBINING_OVERLINE: char = '\u{305}'; +pub const COMBINING_MACRON: Rel = Rel::new('\u{304}', RelCategory::Default); +pub const COMBINING_OVERLINE: Rel = Rel::new('\u{305}', RelCategory::Default); pub const COMBINING_BREVE: Rel = Rel::new('\u{306}', RelCategory::Default); pub const COMBINING_DOT_ABOVE: Rel = Rel::new('\u{307}', RelCategory::Default); pub const COMBINING_DIAERESIS: Rel = Rel::new('\u{308}', RelCategory::Default); diff --git a/playground/LibertinusMath-Regular.woff2 b/playground/LibertinusMath-Regular.woff2 index 14e3bb65..688869c9 100644 Binary files a/playground/LibertinusMath-Regular.woff2 and b/playground/LibertinusMath-Regular.woff2 differ diff --git a/playground/NewCMMath-Book-prime-roundhand-vec.woff2 b/playground/NewCMMath-Book-prime-roundhand-vec.woff2 index 1aecf95d..5ce6ae41 100644 Binary files a/playground/NewCMMath-Book-prime-roundhand-vec.woff2 and b/playground/NewCMMath-Book-prime-roundhand-vec.woff2 differ diff --git a/playground/NotoSansMath-Regular-centered-diacritics-primes.woff2 b/playground/NotoSansMath-Regular-centered-diacritics-primes.woff2 index 02bb412a..de3b3401 100644 Binary files a/playground/NotoSansMath-Regular-centered-diacritics-primes.woff2 and b/playground/NotoSansMath-Regular-centered-diacritics-primes.woff2 differ diff --git a/playground/experiments.html b/playground/experiments.html index 2b464500..d32c609d 100644 --- a/playground/experiments.html +++ b/playground/experiments.html @@ -158,18 +158,18 @@ Experiments - Macron, stretchy=false + COMBINING MACRON, stretchy=false x - ¯ + ̄ - Macron, stretchy=true + COMBINING MACRON @@ -178,7 +178,7 @@ Experiments y z - ¯ + ̄ diff --git a/playground/test.html b/playground/test.html index 2399ee19..e0e398f7 100644 --- a/playground/test.html +++ b/playground/test.html @@ -32,7 +32,7 @@ x - _ + ̄ ,